[Zope3-Users] obtaining time zone from http request

Gary Poster gary at zope.com
Mon Aug 29 09:50:10 EDT 2005


On Aug 29, 2005, at 6:39 AM, Stephan Richter wrote:

> On Monday 29 August 2005 02:32, Alen Stanisic wrote:
>
>> My self.request.locale object is set but seems to be wrong
>>
>> str(self.request.locale.id)  =>  <LocaleIdentity (en, None, US,  
>> None)>
>>
>> while I'd expect it to be something like Australia/Sydney.
>>
>> Is this a default locale?
>>
>
> No, your browser seems to be set incorrectly. Check your browser  
> settings and
> the HTTP-ACCEPTED-LANGUAGES header.

And FWIW, once you get your browser settings correct, for the  
timezone part of the locale database, en-* is all the same--that is,  
if my locale is en-US, I get all en* locations (including Casablanca,  
Tokyo, and other interesting locations). :-)  I think you will too.

Gary



More information about the Zope3-users mailing list