datetime module and timezone

John Gordon gordon at
Fri Feb 10 22:30:07 CET 2012

In <20120210222545.4cbe6924 at> Olive <diolu at> 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

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              B is for Basil, assaulted by bears
                                -- Edward Gorey, "The Gashlycrumb Tinies"

More information about the Python-list mailing list