[Catalyst] DateTime Timezone

Tobias Kremer tobias at funkreich.de
Fri Dec 15 10:22:38 GMT 2006


Zitat von Chisel Wright <chisel at herlpacker.co.uk>:

> I tend to use the following in my schema classes to deal with timestamps
> in my app(s):

Yes, that's also what the DBIx::Class::InflateColumn::DateTime component which
I'm using for this purpose does:
http://search.cpan.org/~bricas/DBIx-Class-0.07003/lib/DBIx/Class/InflateColumn/DateTime.pm

Unfortunately I just found out that DateTime::Format::MySQL::parse_datetime
returns dates in the floating timezone (not UTC). Thus I'll now have to revert
to manual inflation to set_time_zone( 'UTC' ) on the date objects or subclass
D::F::MySQL :(

Hmm ... There must be a better way of dealing with DateTime, timezones and
MySQL ...

Ideas are very welcome :)

-- Tobias



More information about the Catalyst mailing list