in reply to Re^2: Converting epoch times after 2038
in thread Converting epoch times after 2038
Apparently, it does:
use DateTime qw( ); use DateTime::Format::Epoch qw( ); my $epoch = DateTime->new( year => 1970, month => 1, day => 1 ); my $formatter = DateTime::Format::Epoch->new( epoch => $epoch ); my $dt = $formatter->parse_datetime( 3700771200 ); print( $dt->strftime( '%x %X' ), "\n" ); # Apr 10, 2087 12:00:00 AM
Update: Better yet:
use DateTime::Format::Epoch::Unix qw( ); my $dt = DateTime::Format::Epoch::Unix->parse_datetime( 3700771200 ); print( $dt->strftime( '%x %X' ), "\n" ); # Apr 10, 2087 12:00:00 AM
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Converting epoch times after 2038
by kurre_vaxholm (Acolyte) on Apr 05, 2007 at 08:14 UTC | |
by jonadab (Parson) on Apr 05, 2007 at 10:21 UTC | |
by ikegami (Patriarch) on Apr 05, 2007 at 15:09 UTC |