On Aug 30, 2005, at 5:10 AM, Lennart Regebro wrote:

Getting the timezone from request is probably impossible.

Correct. You can't get *the* timezone. You can get the possible timezones, on the basis of the Accept-Language header.

However, you
can do it with javascript:

<script type="text/javascript" language="javascript">
var tzo=(new Date().gettimezoneOffset()/60)*(-1);
// -->

or something like that. This could be hacked into the relevant
webpages, but you still need a form... Maybe you can set it when you
log in?

Yes, that's a reasonable solution for some apps, and generally a good approach to remember. As you said, though, it's difficult to do it in a non-hacky, general way. On the other hand, I might like to see if I can use the trick to have a timezone widget do a better job of finding an initial value.


Zope3-users mailing list

Reply via email to