DateTime::Format::Epoch::Unix 0.10 review

Download
by rbytes.net on

License: Perl Artistic License
File size: 16K
Developer: Eugene van der Pijli
0 stars award from rbytes.net

DateTime::Format::Epoch::Unix is a Perl module that can convert DateTimes to/from Unix epoch seconds.

SYNOPSIS

use DateTime::Format::Epoch::Unix;

my $dt = DateTime::Format::Epoch::Unix->parse_datetime( 1051488000 );
# 2003-04-28T00:00:00

DateTime::Format::Epoch::Unix->format_datetime($dt);
# 1051488000

my $formatter = DateTime::Format::Epoch::Unix->new();
my $dt2 = $formatter->parse_datetime( 1051488000 );
$formatter->format_datetime($dt2);

This module can convert a DateTime object (or any object that can be converted to a DateTime object) to the number of seconds since the Unix epoch.

Requirements:
Perl

DateTime::Format::Epoch::Unix 0.10 keywords