[Catalyst] User timezones

Devin Austin devin.austin at gmail.com
Thu Jun 25 06:23:08 GMT 2009


I would store it in whatever user profile set up you have for each user.
you could simply create a column and add the GMT offset.

On Thu, Jun 25, 2009 at 12:19 AM, Christian Lackas <christian at lackas.net>wr=
ote:

> Hi Everybody,
>
> I wonder how you handle user-specific timezones in Catalyst.
>
> Our application is used by customers in various locations, and thus
> timezones. I would now like to be able to specify the user's timezone in
> his database entry and then show all times to her accordingly.
> Most of the time data is stored in the database (also show some
> filesystem dates at other places, and there are probably more sources,
> but let's concentrate on the database first).
> Is there a way to handle this transparently? If I use
> inflation/deflation (as does DBIx::Class::DateTime for instance),
> I could handle the conversion transparently, however, since the timezone
> depends on the user, I cannot define it in the DBIx add_columns()
> definition. And manually adjusting the timezone after the data leaves
> the Model is probably no good idea either (to easy to forget something
> or make a mistake).
>
> Is there any magic switch I could set (for instance if the user is
> authorized or the session restored) to automatically get the right time
> for the user?
>
> Christian
>
>
> _______________________________________________
> List: Catalyst at lists.scsys.co.uk
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive:
> http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
> Dev site: http://dev.catalyst.perl.org/
>



-- =

Devin Austin
http://www.codedright.net
http://www.dreamhost.com/r.cgi?326568/hosting.html - Host with DreamHost!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20090625/4a341=
9c1/attachment.htm


More information about the Catalyst mailing list