Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

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

Report information
The Basics
Id: 104125
Status: resolved
Priority: 0/
Queue: DateTime-Format-Strptime

People
Owner: Nobody in particular
Requestors: robertm [...] broadbean.com
Cc:
AdminCc:

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



Subject: DateTime::Format::Strptime not parsing some dates with the pattern %Y-%m-%d %H:%M:%S
Date: Thu, 30 Apr 2015 11:55:55 +0000
To: "bug-DateTime-Format-Strptime [...] rt.cpan.org" <bug-DateTime-Format-Strptime [...] rt.cpan.org>
From: Robert Marlton <robertm [...] broadbean.com>
Hi, If I run:- use DateTime::Format::Strptime; use Data::Dumper; my $date_parser = DateTime::Format::Strptime->new( pattern => '%Y-%m-%d %H:%M:%S', locale => 'en_UK', time_zone => 'Europe/London', ); my $datetime = '2014-03-30 01:00:00'; print DateTime::Format::Strptime->VERSION; print "\n" . $datetime . "\n"; my $application_time = $date_parser->parse_datetime($datetime); print Dumper($application_time); I get the following output:- 1.56 2014-03-30 01:00:00 $VAR1 = undef; For some reason it doesn't treat 2014-03-30 01:00:00 as a valid date/time. The only way I could find to get this date to parse was either by changing the date (I changed it to be the 31st March) or by removing the time element completely (and adjusting the pattern accordingly). Regards, Robert Marlton
Subject: Re: [rt.cpan.org #104125] DateTime::Format::Strptime not parsing some dates with the pattern %Y-%m-%d %H:%M:%S
Date: Thu, 30 Apr 2015 23:06:51 +1000
To: bug-DateTime-Format-Strptime [...] rt.cpan.org
From: Rick Measham <rick [...] measham.id.au>
Hi Robert, This is because there was no 1am on Mar 30, 2014 in London. Clocks went from 12:59 to 2:00am. - Rick On 2015-04-30 21:56, Robert Marlton via RT wrote: Show quoted text
> Thu Apr 30 07:56:11 2015: Request 104125 was acted upon. > Transaction: Ticket created by robertm@broadbean.com > Queue: DateTime-Format-Strptime > Subject: DateTime::Format::Strptime not parsing some dates with the pattern %Y-%m-%d %H:%M:%S > Broken in: (no value) > Severity: (no value) > Owner: Nobody > Requestors: robertm@broadbean.com > Status: new > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=104125 > > > > Hi, > > If I run:- > > use DateTime::Format::Strptime; > use Data::Dumper; > my $date_parser = DateTime::Format::Strptime->new( > pattern => '%Y-%m-%d %H:%M:%S', > locale => 'en_UK', > time_zone => 'Europe/London', > ); > my $datetime = '2014-03-30 01:00:00'; > print DateTime::Format::Strptime->VERSION; > print "\n" . $datetime . "\n"; > my $application_time = $date_parser->parse_datetime($datetime); > print Dumper($application_time); > > I get the following output:- > > 1.56 > 2014-03-30 01:00:00 > $VAR1 = undef; > > For some reason it doesn't treat 2014-03-30 01:00:00 as a valid date/time. The only way I could find to get this date to parse was either by changing the date (I changed it to be the 31st March) or by removing the time element completely (and adjusting the pattern accordingly). > > Regards, > Robert Marlton >
Download smime.p7s
application/pkcs7-signature 3.6k

Message body not shown because it is not plain text.