Help for this page

Select Code to Download


  1. or download this
    my $datestr = '2017-02-10 08:12:57';
    my $unixtime = timelocal(reverse split /[:\s-]+/, $datestr);
    
  2. or download this
    my ($sec, $min, $hour, $mday, $mon, $year) = reverse split /[:\s-]+/, 
    +$datestr;
    print "sec:$sec min:$min hr:$hour mday:$mday mon:$mon year:$year\n";