Help for this page

Select Code to Download


  1. or download this
    use strict;
    use warnings;
    ...
        my $tp = Time::Piece->strptime( $date, q{%Y-%m-%d %T} );
        say $date, q{ -> epoch }, $tp->epoch();
    }
    
  2. or download this
    1960-12-31 23:59:59 -> epoch -283996801
    1966-06-24 09:44:00 -> epoch -111161760
    ...
    1901-01-01 00:00:00 -> epoch -2177452800
    1900-01-01 00:00:00 -> epoch -2208988800
    Error parsing time at /usr/lib/x86_64-linux-gnu/perl/5.22/Time/Piece.p
    +m line 469.