datetime module and timezone

John Gordon gordon at panix.com
Fri Feb 10 16:30:07 EST 2012


In <20120210222545.4cbe6924 at bigfoot.com> Olive <diolu at bigfoot.com> writes:

> In the datetime module, it has support for a notion of timezone but is
> it possible to use one of the available timezone (I am on Linux). Linux
> has a notion of timezone (in my distribution, they are stored
> in /usr/share/zoneinfo). I would like to be able 1) to know the current
> timezone and 2) to be able to use the timezone available on the system.
> How can I do that?

I believe the current user's timezone is stored in the TZ environment
variable.

I don't understand your second question.  Are you asking for a list of
of all the possible timezone choices?

-- 
John Gordon                   A is for Amy, who fell down the stairs
gordon at panix.com              B is for Basil, assaulted by bears
                                -- Edward Gorey, "The Gashlycrumb Tinies"




More information about the Python-list mailing list