remiah has asked for the wisdom of the Perl Monks concerning the following question:

Hello perlmonk.

I tried to use DateTime::Format::Manip. But it fails on 01conversions.t test script. Google showed me there are men who met the same situation but I couldn't get clue to solve this. It fails on first test and below is the output.

not ok 1 - Parse Date 'March 23, 2003'
#   Failed test 'Parse Date 'March 23, 2003''
#   at 01conversions.t line 73.
#          got: '2003-03-22T09:00:00.000000000 EST
# '
#     expected: '2003-03-23T00:00:00.000000000 EST
# '

When it tries to parse date string 'March 23, 2003', parse_datetime subroutine seems to try to ajust hour from 0 to 9. May be this is because initial TimeZone and EST differs at set_time_zone subroutine at DateTime.pm, but I couldn't dig it deeper.

I wonder someone at this monastery has some clue to this problem.

I installed it from cpanplus, version of module is "DateTime-Format-DateManip-0.04". perl 5.12.2, FreeBSD 8.2

Regards.

  • Comment on DateTime::Format::Manip fails test script

Replies are listed 'Best First'.
Re: DateTime::Format::Manip fails test script
by Anonymous Monk on Apr 18, 2012 at 08:34 UTC

    I tried to use DateTime::Format::Manip ... I wonder someone at this monastery has some clue to this problem.

    FWIW, Bug #55771 for DateTime-Format-DateManip: Failing since 2010-03-14 reveals Date::Manip is has changed while DateTime::Format::Manip hasn't kept up, so DateTime::Format::Manip needs a update to use the latest Date::Manip interface, apparently Date::Manip has improved significantly, so much of the cruft in DateTime::Format::Mani can be removed (that timezone stuff).

    See Date::Manip::DM6

    Not that I see why you'd use both :)

      Thanks for good links!!

      Not that I see why you'd use both :)

      Because, in coerce example of Moose (http://www.stonehenge.com/merlyn/LinuxMag/col95.html), the author of this article used DateTime::Format::DateManip. I was fascinated by this example and I would like to try this with replacing DateTime with Date::Manip.