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

People
Owner: Nobody in particular
Requestors: arunbear@gmail.com (no email address)
Cc:
AdminCc:

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



Subject: Incomplete support for ISO 8601 Time offsets
Date: Wed, 25 Nov 2015 12:06:13 +0000
To: bug-DateTime-Format-Strptime [...] rt.cpan.org
From: Arun Prasaad <arunbear [...] gmail.com>
Download (untitled) / with headers
text/plain 355b
Good day, it would seem that the offsets +hh:mm +hh are not supported by this module, but use of the "%z" pattern would require or imply such support. I'm attaching a test script that shows this problem. See also https://en.wikipedia.org/wiki/ISO_8601#Time_offsets_from_UTC Version of DateTime::Format::Strptime tested was: 1.61 kind regards, Arun
Download dt_strptime.t
text/x-perl 699b

Message body is not shown because sender requested not to inline it.

Download (untitled) / with headers
text/plain 865b
On Wed Nov 25 07:06:27 2015, arunbear@gmail.com wrote: Show quoted text
> Good day, > > it would seem that the offsets > > +hh:mm > +hh > > are not supported by this module, but use of the "%z" pattern would require > or imply such support. > > I'm attaching a test script that shows this problem. > > See also > https://en.wikipedia.org/wiki/ISO_8601#Time_offsets_from_UTC > > Version of DateTime::Format::Strptime tested was: 1.61
On my system, running "man strftime" gives me this output: %z The +hhmm or -hhmm numeric timezone (that is, the hour and minute offset from UTC). (SU) So this module seems to be doing what at least my glibc's version of strftime does. Is this different on other systems? This module is really not supposed to be anything like a full ISO8601 parser. There is one on CPAN - https://metacpan.org/release/DateTime-Format-ISO8601
RT-Send-CC: arunbear [...] gmail.com
Download (untitled) / with headers
text/plain 1.1k
On 2015-12-19 15:01:42, DROLSKY wrote: Show quoted text
> On Wed Nov 25 07:06:27 2015, arunbear@gmail.com wrote:
> > Good day, > > > > it would seem that the offsets > > > > +hh:mm > > +hh > > > > are not supported by this module, but use of the "%z" pattern would > > require > > or imply such support. > > > > I'm attaching a test script that shows this problem. > > > > See also > > https://en.wikipedia.org/wiki/ISO_8601#Time_offsets_from_UTC > > > > Version of DateTime::Format::Strptime tested was: 1.61
> > On my system, running "man strftime" gives me this output: > > %z The +hhmm or -hhmm numeric timezone (that is, the hour and > minute offset from UTC). (SU) > > So this module seems to be doing what at least my glibc's version of > strftime does. Is this different on other systems? > > This module is really not supposed to be anything like a full ISO8601 > parser. There is one on CPAN - https://metacpan.org/release/DateTime- > Format-ISO8601
But man strptime (on debian systems) says: %z An RFC-822/ISO 8601 standard timezone specification. Experiments show that +hh:mm and +hh are recognized by the C strptime. On freebsd systems only the +hhmm format is parsed.
Download (untitled) / with headers
text/plain 1.3k
On Sat Dec 19 15:39:56 2015, SREZIC wrote: Show quoted text
> On 2015-12-19 15:01:42, DROLSKY wrote:
> > On Wed Nov 25 07:06:27 2015, arunbear@gmail.com wrote:
> > > Good day, > > > > > > it would seem that the offsets > > > > > > +hh:mm > > > +hh > > > > > > are not supported by this module, but use of the "%z" pattern would > > > require > > > or imply such support. > > > > > > I'm attaching a test script that shows this problem. > > > > > > See also > > > https://en.wikipedia.org/wiki/ISO_8601#Time_offsets_from_UTC > > > > > > Version of DateTime::Format::Strptime tested was: 1.61
> > > > On my system, running "man strftime" gives me this output: > > > > %z The +hhmm or -hhmm numeric timezone (that is, the hour and > > minute offset from UTC). (SU) > > > > So this module seems to be doing what at least my glibc's version of > > strftime does. Is this different on other systems? > > > > This module is really not supposed to be anything like a full ISO8601 > > parser. There is one on CPAN - https://metacpan.org/release/DateTime- > > Format-ISO8601
> > But man strptime (on debian systems) says: > > %z An RFC-822/ISO 8601 standard timezone specification. > > Experiments show that +hh:mm and +hh are recognized by the C strptime. > > On freebsd systems only the +hhmm format is parsed.
Ah, good point. I will fix this when I get a round tuit but patches are welcome.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.