Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Date::Parse - how to correctly parse dates between 1901 and 1969

by tangent (Vicar)
on Feb 19, 2018 at 22:55 UTC ( #1209514=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my @dates = (
        "1901-01-01 00:00:00",
    ...
        my $date = DateTime->from_epoch( epoch => $epoch );
        print $date->ymd, " ", $date->hms, "\n\n";
    }
    
  2. or download this
    1901-01-01 00:00:00 (978307200 seconds)
    2001-01-01 00:00:00
    ...
    
    1970-01-01 00:00:01 (1 seconds)
    1970-01-01 00:00:01
    
  3. or download this
    use Time::Local;
    
    ...
        my $date = DateTime->from_epoch( epoch => $epoch );
        print $date->ymd, " ", $date->hms, "\n\n";
    }
    
  4. or download this
    1901-01-01 00:00:00 (-2177452800 seconds)
    1901-01-01 00:00:00
    ...
    
    1970-01-01 00:00:01 (1 seconds)
    1970-01-01 00:00:01
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1209514]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (2)
As of 2022-07-01 11:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My most frequent journeys are powered by:









    Results (98 votes). Check out past polls.

    Notices?