Hi everyone,
is there a (easy) way to display timestamps (which come from the database
including the timezone offset - postgresql type timestamptz) according to a
user timezone setting?
So I have a member record which gives me the user timezone (either as string
like "America/Los Angeles" or as GMT offset, i.e. -8). Now I'd like to have
all dates/times displayed take that into account in order to display the time
as "user local time" - i.e. I post something (assume it's a forum) in Pacific
timezone and someone on the eastcoast sees the entry - but I want him to see
that in his local time.
Anyone done anything like this? I figure I can add a function to the stdvars
namespace (tg.localized_time for example). All I'd need is a method that
actually formats/calculates a datetime according to locale and timezone.
Any pointers are greatly appreciated.
Thanks
Uwe
--
Open Source Solutions 4U, LLC 1618 Kelly St
Phone: +1 707 568 3056 Santa Rosa, CA 95401
Cell: +1 650 302 2405 United States
Fax: +1 707 568 6416
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---