I've tried several approaches for handling timezones - initially we
just asked users to select their GMT offset from a select list.  I
knew in the back of my mind that there were some "other" timezones
that weren't an even number of hours off.  Sure enough, our third
customer was from GMT+5:30...   We then discovered that POSIX has it's
own (wrong) way of interpreting GMT+n timezones, which caused further
problems.

With all of the different timezones and daylight savings time offsets,
I think the only really practical solution if you need accurate time
is to determine one of the local timezones that pytz uses, and store
all your times in UTC.

What we're doing currently is taking the IP address of the visitor,
looking it up via GeoIP to get the physical location they're coming
from, and them mapping that to a timezone based on country and region.
In theory it's not 100% accurate, but in practice we haven't run into
any problems so far, and it's much more usable than making customers
select from a huge list of different timezones.

If there's interest, I can try to extract and post some of our code
that handles this.

-jason



On Apr 3, 12:05 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> What method are people using to discover the timezones of their
> clients?

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to turbogears@googlegroups.com
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to