Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the DateTime CPAN distribution.

Report information
The Basics
Id: 79847
Status: rejected
Priority: 0/
Queue: DateTime

People
Owner: Nobody in particular
Requestors: pavel.richter [...] 2ring.com
Cc:
AdminCc:

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



Subject: Invalid local time for date in time zone: Asia/Yerevan
Perl 5.14.2-13 Debian SID, Perl 5.10 windows 2003 I get error for function called with specific date and zone Asia/ Yerevan. For other time or same time and other time zone is all OK. my $dt = DateTime->new( year => 1981, month => 4, day => 1, hour => 0, minute => 0, second => 0, time_zone => 'Asia/Yerevan' ); Invalid local time for date in time zone: Asia/Yerevan at /usr/share/perl5/DateTime/TimeZone.pm line 198 DateTime::TimeZone::_span_for_datetime ('DateTime::TimeZone::Asia::Yerevan=HASH(0x9f20294)', 'local', 'DateTime=HASH(0x9f89900)') called at /usr/share/perl5/DateTime/ TimeZone.pm line 157 DateTime::TimeZone::offset_for_local_datetime ('DateTime::TimeZone::Asia::Yerevan=HASH(0x9f20294)', 'DateTime=HASH (0x9f89900)') called at /usr/lib/perl5/DateTime.pm line 930 DateTime::_offset_for_local_datetime('DateTime=HASH (0x9f89900)') called at /usr/lib/perl5/DateTime.pm line 375 DateTime::_calc_utc_rd('DateTime=HASH(0x9f89900)') called at / usr/lib/perl5/DateTime.pm line 263 DateTime::_new('DateTime', 'hour', 0, 'minute', 0, 'second', 0, 'month', 4, ...) called at /usr/lib/perl5/DateTime.pm line 207 DateTime::new(undef, 'year', 1981, 'month', 4, 'day', 1, 'hour', 0, ...) called at ./diag_CDRConnection.pl line 290
Subject: Re: [rt.cpan.org #79847] Invalid local time for date in time zone: Asia/Yerevan
Date: Tue, 25 Sep 2012 10:11:55 -0500 (CDT)
To: Pavel Richter via RT <bug-DateTime [...] rt.cpan.org>
From: Dave Rolsky <autarch [...] urth.org>
On Tue, 25 Sep 2012, Pavel Richter via RT wrote: Show quoted text
> > my $dt = DateTime->new( > year => 1981, > month => 4, > day => 1, > hour => 0, > minute => 0, > second => 0, > time_zone => 'Asia/Yerevan' > ); > > Invalid local time for date in time zone: Asia/Yerevan
What this error means is that there was a DST transition at that time, so there was no local midnight on 198-04-01 in that time zone. This is not a bug, it's intentional. -dave /*============================================================ http://VegGuide.org http://blog.urth.org Your guide to all that's veg House Absolute(ly Pointless) ============================================================*/
Subject: Re: [rt.cpan.org #79847] Invalid local time for date in time zone: Asia/Yerevan
Date: Tue, 25 Sep 2012 10:12:46 -0500 (CDT)
To: Pavel Richter via RT <bug-DateTime [...] rt.cpan.org>
From: Dave Rolsky <autarch [...] urth.org>
See https://metacpan.org/module/DateTime#Invalid-Local-Times for a bit more detail. /*============================================================ http://VegGuide.org http://blog.urth.org Your guide to all that's veg House Absolute(ly Pointless) ============================================================*/
From: pavel.richter [...] 2ring.com
Thank you. Dne Út 25.zář.2012 11:12:59, autarch@urth.org napsal(a): Show quoted text
> See https://metacpan.org/module/DateTime#Invalid-Local-Times for a bit > more detail. > > /*============================================================ > http://VegGuide.org http://blog.urth.org > Your guide to all that's veg House Absolute(ly Pointless) > ============================================================*/