[Catalyst] User timezones

Ian Wells ijw at cack.org.uk
Thu Jun 25 11:34:01 GMT 2009

2009/6/25 Moritz Onken <onken at houseofdesign.de>:
> which stores the time of creation incl. time zone (of your server)

A time column typically stores a time without the timezone.  If you
want to store the timezone you need a second column - otherwise you
declare the timezone in the column definition and you can safely
assume all times stored are in that timezone.  (I think I'm saying
what you *meant*, but it's not quite what you *wrote*.)

> To the original question:
> I'd say that the conversion between time zones belongs in the View. As you
> are
> doing it already with [% study.time.convertTZ(c.user) %]. I see that this
> means you have to type more

... but study.time stringifies the DateTime to a (by default) really
ugly date, so you need a formatting call anyway.  (Yes, you could
specify the format when you define the column, too, but then your
model is determining what format your view outputs - that's got issues
with separation of responsibility.)


More information about the Catalyst mailing list