TIL that you can specify the timezone in the definition for a datetype
column! How did I overlook this for all this time?! This is such a
good thing. Unfortunately, now I have to make sure it doesn't
interfere with all the workarounds I've put in place to deal with lack
of UTC timezone. Thanks for the tip!

Sadly, I don't have an answer to your question but I would find it
very, very useful as well. Perhaps the DateTime inflator would be a
good place to look and/or patch?


On Thu, Oct 18, 2012 at 12:34 AM, neil.lunn wrote:
I have a legacy database that has Date type data in the local timezone
rather than UTC. As such I have these statements in my class definitions:

data_type => "DATE",
timezone => 'America/Montreal',
locale => 'en_US',
default_value => undef,
is_nullable => 1,
size => 19,
While this works for DateTime inflation, it would be nicer :) to not have
the timezone information declared in each column. Or more practically, I
don't like this being hardcoded and would rather pick up from the current
timezone or config.

Anyone have any better approaches? Ideas?

List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
Searchable Archive:

Search Discussions

Discussion Posts


Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 2 of 2 | next ›
Discussion Overview
groupdbix-class @
categoriesperl, catalyst
postedOct 17, '12 at 1:34p
activeOct 18, '12 at 12:39a

2 users in discussion

Neil.lunn: 1 post Drew Taylor: 1 post



site design / logo © 2022 Grokbase