Skip Menu |

This queue is for tickets about the DateTime-Format-Epoch CPAN distribution.

Report information
The Basics
Id: 45506
Status: new
Priority: 0/
Queue: DateTime-Format-Epoch

People
Owner: Nobody in particular
Requestors: mschwern [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: 0.11
Fixed in: (no value)



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).