Skip Menu |

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

Report information
The Basics
Id: 53268
Status: resolved
Priority: 0/
Queue: DateTime-Format-Natural

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

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



Subject: test failure: 'time_zone' parameter ... not one of the allowed types (t/07-parse_datetime.t)
$ perl -Ilib t/07-parsedatetime.t 1..2 The 'time_zone' parameter (undef) to DateTime::new was an 'undef', which is not one of the allowed types: scalar object at /usr/local/lib/perl/5.8.8/DateTime.pm line 176 DateTime::new('undef', 'time_zone', 'undef', 'year', 2006, 'month', 11, 'day', 24, ...) called at lib/DateTime/Format/Natural.pm line 538 DateTime::Format::Natural::_get_datetime_object('DateTime::Format::Natural=HASH(0x5f0cb0)') called at lib/DateTime/Format/Natural.pm line 237 DateTime::Format::Natural::parse_datetime('DateTime::Format::Natural=HASH(0x5f0cb0)', 'now') called at t/07-parse_datetime.t line 30 main::compare_strings('now', '24.11.2006 01:13:08') called at t/07-parse_datetime.t line 21 main::compare('ARRAY(0x504f20)') called at lib/DateTime/Format/Natural/Test.pm line 32 DateTime::Format::Natural::Test::_run_tests(1, 'ARRAY(0xce40c0)', 'CODE(0xce3da0)') called at t/07-parse_datetime.t line 14 # Looks like your test exited with 9 before it could output anything.
Still broken in 0.83. DateTime::new() $self->{datetime}->time_zone->name seems to be returning undef(). See attached patch.
Subject: Natural.patch
--- lib/DateTime/Format/Natural.pm 2010-01-17 22:17:59.000000000 -0800 +++ /tmp/Natural.pm 2010-01-17 22:17:54.000000000 -0800 @@ -482,7 +482,7 @@ my $self = shift; my $dt = DateTime->new( - time_zone => $self->{datetime}->time_zone->name, + time_zone => $self->{datetime}->time_zone, year => $self->{datetime}->year, month => $self->{datetime}->month, day => $self->{datetime}->day_of_month,
Applied in v0.83_01.