Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl
    use strict;
    ...
    $year += 1900;
    $mon++;
    printf "%02d:%02d:%02d %04d-%02d-%02d\n", ($hour,$min,$sec,$year,$mon,
    +$mday);
    
  2. or download this
    #!/usr/bin/perl
    use strict;
    ...
    print "epoch seconds: $seconds.\n";
    ($year,$month,$day, $hour,$min,$sec) = Time_to_Date($seconds);
    printf "%02d:%02d:%02d %04d-%02d-%02d\n", ($hour,$min,$sec,$year,$mont
    +h,$day);