 #!/usr/bin/perl
 print "Content-type: text/html \n\n";
 my $dt;
 $dt="13/Feb/2020:06:50:22";
 $tm=dt_to_tm($dt);
 print "time_mark=",$tm,"\n";

 #########################################
  sub ip_to_num
  {
 #######################################
 # IP-address to a number conversion	#
 #######################################
 my @Lm;
 my ($s)=@_;
 @Lm=split/\./,$s;
 if($#Lm < 3) {return -1;}
 else    { return ((((($Lm[0]<<8)+$Lm[1])<<8)+$Lm[2])<<8)+$Lm[3];
         }
 }
 
########################################################
#     Date-Time conversion to TM  	(TM=time-mark)     #
#     additional output - mins from the day beginning  # 
########################################################
sub dt_to_tm

use Time::Local;
my $i;
my @mon=("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");
my $date_time=@_;

my @MMM=split(/\:/,$date_time);								  #
if($#MMM==3){			# date terms number control			  #
my $date=$MMM[0];										      #
my @NNN=split(/\//,$date);									  #
if(!(defined$NNN[0]))	{$NNN[0]=1;}						  #
my $day=$NNN[0];											  #
if(!(defined$NNN[1]))	{$NNN[1]=1;}						  #
my $month=$NNN[1];										      #
for($i=0;$i<12;$i++){if($month eq $mon[$i]){$month=$i;}}	  #
if(!(defined$NNN[2]))	{$NNN[2]=2;}						  #
my $year=$NNN[2];										      #
$year=$year-1900;										      #
if(!(defined$MMM[1]))	{$MMM[1]=1;}						  #
my $hours=$MMM[1];										      #
if(!(defined$MMM[2]))	{$MMM[2]=1;}						  #
my $minutes=$MMM[2];										  #
if(!(defined$MMM[3]))	{$MMM[3]=1;}						  #
my $seconds=$MMM[3];
my $cur_TIME=timelocal($seconds,$minutes,$hours,$day,$month,$year);
print " year=",$year," mon=",$month," day=",$day," hour=",$hours," min=",$minutes," sec=",$seconds,"\n";

return ($cur_Time);
}

########################################################
#     TM to Date-Time conversion   	(TM=time-mark)     #
########################################################
sub tm_to dt_to_tm
{

}
