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: 91458
Status: resolved
Priority: 0/
Queue: DateTime-Format-Strptime

People
Owner: Nobody in particular
Requestors: davidpyke [...] gmail.com
Cc:
AdminCc:

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



Subject: bug in timezone regex
Date: Mon, 16 Dec 2013 22:26:02 -0500
To: bug-datetime-format-strptime [...] rt.cpan.org
From: David Pyke Le Brun <davidpyke [...] gmail.com>
hello, according to http://en.wikipedia.org/wiki/ISO_8601 "The offset from UTC <http://en.wikipedia.org/wiki/UTC_offset> is given in the format ±[hh]:[mm], ±[hh][mm], or ±[hh]. ...." this module only supports the 2nd format. if you change the regex on line 998 from $regex =~ s|%z|([+-]\\d{4})|g; to $regex =~ s|%z|([+-]\\d\\d:?\\d\\d)|g; you get the 1st and 2nd formats. i hope with a little bit more effort, all of the time formats could be supported. an alternative would be to offer a way to modify the regex used something like my $parser = DateTime::Format::Strptime->new( pattern => '%Y-%m-%dT%T%z',); $parser->{z} = "([+-]\\d{4})"; thoughts? David
On Mon Dec 16 22:26:12 2013, davidpyke@gmail.com wrote: Show quoted text
> hello, > > according to > http://en.wikipedia.org/wiki/ISO_8601
IS8601 is its own rather large format. See https://metacpan.org/release/DateTime-Format-ISO8601 Show quoted text
> "The offset from UTC <http://en.wikipedia.org/wiki/UTC_offset> is given in > the format ±[hh]:[mm], ±[hh][mm], or ±[hh]. ...." > > this module only supports the 2nd format.
I think loosening this up a bit would be reasonable so it at least supports a colon.
Subject: Re: [rt.cpan.org #91458] Resolved: bug in timezone regex
Date: Wed, 7 May 2014 11:08:16 +0100
To: bug-DateTime-Format-Strptime [...] rt.cpan.org
From: David Pyke Le Brun <davidpyke [...] gmail.com>
great thanks.. it looks good. i'll make sure to update and remove my local modified version. On 5 May 2014 02:36, Dave Rolsky via RT < bug-DateTime-Format-Strptime@rt.cpan.org> wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=91458 > > > According to our records, your request has been resolved. If you have any > further questions or concerns, please respond to this message. >