Skip Menu |

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

Report information
The Basics
Id: 130682
Status: resolved
Priority: 0/
Queue: DateTime-Format-ISO8601

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

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



Subject: support for YYYY-MM-DDThh:mm:ss.ss[+-]hh
Hi! Is there any reason that there is support for YYYY-MM-DDThh:mm:ss[+-]hh:mm YYYY-MM-DDThh:mm:ss[+-]hh YYYY-MM-DDThh:mm:ss.ss[+-]hh:mm but NOT for YYYY-MM-DDThh:mm:ss.ss[+-]hh i.e. a string with miliseconds and only an hour offset is not parsable: perl -MDateTime::Format::ISO8601 -E 'say DateTime::Format::ISO8601->parse_datetime("2019-10-09T21:07:10.42+02")' PostgreSQLs now() functions returns strings with fractions of seconds and an hour only time-zone: select now(); 2019-10-09 21:10:21.14294+02 I guess it wouldn't be too hard to implement, and I would supply a patch, if this format would be supported... Greetings, domm
Subject: Re: [rt.cpan.org #130682] support for YYYY-MM-DDThh:mm:ss.ss[+-]hh
Date: Wed, 9 Oct 2019 12:20:09 -0700
To: bug-DateTime-Format-ISO8601 [...] rt.cpan.org
From: Joshua Hoblitt <josh [...] hoblitt.com>
It was probably not a format explicitly listed in the spec but I think it should be a supported format.  A PR would be gladly accepted.
Subject: Re: [rt.cpan.org #130682] support for YYYY-MM-DDThh:mm:ss.ss[+-]hh
Date: Wed, 9 Oct 2019 21:32:12 +0200
To: Joshua Hoblitt via RT <bug-DateTime-Format-ISO8601 [...] rt.cpan.org>
From: domm <domm [...] cpan.org>
Hi! On Wed, Oct 09, 2019 at 03:21:29PM -0400, Joshua Hoblitt via RT wrote: Show quoted text
> It was probably not a format explicitly listed in the spec but I think > it should be a supported format.  A PR would be gladly accepted.
ok, great, than I'll prepare one. Is there a git repo of the code somewhere? I couldn't find it linked from the metacpan page... Greetings, domm -- #!/usr/bin/perl http://domm.plix.at for(ref bless{},just'another'perl'hacker){s-:+-$"-g&&print$_.$/}
Subject: Re: [rt.cpan.org #130682] support for YYYY-MM-DDThh:mm:ss.ss[+-]hh
Date: Wed, 9 Oct 2019 12:41:00 -0700
To: bug-DateTime-Format-ISO8601 [...] rt.cpan.org
From: Joshua Hoblitt <josh [...] hoblitt.com>
Yes, the metadata needs to be updated. https://github.com/jhoblitt/DateTime-Format-ISO8601
On 2019-10-09 14:15:48, DOMM wrote: Show quoted text
> Hi! > > Is there any reason that there is support for > > YYYY-MM-DDThh:mm:ss[+-]hh:mm > YYYY-MM-DDThh:mm:ss[+-]hh > YYYY-MM-DDThh:mm:ss.ss[+-]hh:mm > > but NOT for > YYYY-MM-DDThh:mm:ss.ss[+-]hh > > i.e. a string with miliseconds and only an hour offset is not > parsable: > > perl -MDateTime::Format::ISO8601 -E 'say DateTime::Format::ISO8601-
> >parse_datetime("2019-10-09T21:07:10.42+02")'
> > PostgreSQLs now() functions returns strings with fractions of seconds > and an hour only time-zone: > > select now(); > 2019-10-09 21:10:21.14294+02 > > I guess it wouldn't be too hard to implement, and I would supply a > patch, if this format would be supported... > > Greetings, > domm
I have no particular objection but I would note that there is a DT::F::Pg distro that might be a better choice if you just need to handle data from Pg.
Subject: Re: [rt.cpan.org #130682] support for YYYY-MM-DDThh:mm:ss.ss[+-]hh
Date: Wed, 9 Oct 2019 23:06:37 +0200
To: Dave Rolsky via RT <bug-DateTime-Format-ISO8601 [...] rt.cpan.org>
From: domm <domm [...] cpan.org>
Hi! On Wed, Oct 09, 2019 at 04:12:26PM -0400, Dave Rolsky via RT wrote: Show quoted text
> I have no particular objection but I would note that there is a > DT::F::Pg distro that might be a better choice if you just need to > handle data from Pg.
Well, actually the data is coming from a REST API that is backed by Postgres. And the API takes the string coming from postgres, does s/ /T/ to "convert" from RFC3339 to ISO8691, and passes the string on via JSON. And this string might contain fractional seconds with only an hour offset... Hence this feature request, which I will implement tomorrow. Greetings, domm -- #!/usr/bin/perl http://domm.plix.at for(ref bless{},just'another'perl'hacker){s-:+-$"-g&&print$_.$/}