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 <[email protected]>wrote: > 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: [email protected] > Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst > Searchable archive: > http://www.mail-archive.com/[email protected]/ > 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!
_______________________________________________ List: [email protected] Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/[email protected]/ Dev site: http://dev.catalyst.perl.org/
