On Sun, 9 May 2004, Jonah Petri wrote:

> • Did DateTime::TimeZone::offset_as_seconds at some point allow 2 digit
> offsets? (i can't find any evidence of this...)

No

> • Did postgres at some point output data with 4 (or 6) digit offsets?
> (Not that I can find or remember)

I dunno.

> • Has DateTime::Format::Pg::parse_timestamptz never worked? (one would
> hope not, but....)

Maybe with a different output format from Postgres.

> A couple possible fixes:
> • Alter DateTime::TimeZone::offset_as_seconds to accept 2 digit
> offsets.  This seems the easiest solution, and will add this capability
> to all of the DateTime modules.

This doesn't seem like a terrible good idea.

> • Alter DateTime::Format::Pg to pad the offset digits coming in from
> postgres.  This is also fairly good, though the code would be
> duplicated in DT::Fmt::ISO8601 (once the date + time parsing code is
> written).

I think this is the best solution.  DT::F::Pg could also just use
DT::F::ISO8601 to parse ISO format output.

For the record, DT::F::ISO8601 already has date + time parsing code, but
it doesn't handle time zones.

> • Alter my DBI layer to pad the timestamps coming out of postgres to 4
> digit offsets before handing them to
> DateTime::Format::Pg::parse_timestamptz.

No, don't do that.


-dave

/*=======================
House Absolute Consulting
www.houseabsolute.com
=======================*/

Reply via email to