2009/6/29 Christian Lackas <christ...@lackas.net>: > OK, as said before, I already had the feeling that it does not fit into > the model, however, there it would have been the most convenient.
As I say, you'll need a formatting function or functions to turn dates-as-objects into dates in your page, regardless of timezones. You can set up your formatter that that it's initailised withh a timezone, and then your translation from DB-zone to view-zone comes for free as you would have to do the formatting call anyway. So: Once, somewhere once you've discovered the user and know their timezone: my $user=... DateFormatter->output_tz($user->timezone); In your view, and I assume TT here and that you've set up DateFormatter as a plugin or similar: [% DateFormatter.as_datetime(my_row.birthday) %] About as simple as it's ever likely to be, with the added advantage that you have a date formatter with a number of functions to output dates in one of a limited number of formats, so that your app has a consistent appearance. -- Ian. _______________________________________________ List: Catalyst@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/