Subject: | Does not work as a DateTime stringification formatter. |
$ perl -wle 'use DateTime; use DateTime::Format::Epoch; print
DateTime->now( formatter => "DateTime::Format::Epoch" )'
Mandatory parameter 'epoch' missing in call to DateTime::Format::Epoch::new
at /usr/local/perl/5.10.0/lib/site_perl/5.10.0/DateTime/Format/Epoch.pm
line 41
DateTime::Format::Epoch::new(undef) called at
/usr/local/perl/5.10.0/lib/site_perl/5.10.0/DateTime/Format/Epoch.pm line 77
DateTime::Format::Epoch::format_datetime('DateTime::Format::Epoch',
'DateTime=HASH(0x941460)') called at
/usr/local/perl/5.10.0/lib/site_perl/5.10.0/darwin-thread-multi-2level/DateTime.pm
line 778
DateTime::_stringify('DateTime=HASH(0x941460)', undef, '') called at -e
line 1
DateTime's stringification does not pass in any arguments when it
creates a formatter. It would be handy if it figured out a default
epoch, either just using the Unix epoch or by figuring it out by calling
gmtime(0).