Timezone

Tim Daneliuk tundra at tundraware.com
Sun Jul 29 21:02:20 EDT 2001


Richard van de Stadt wrote:
> 
> I run stuff on systems in various timezones.
> I need to display when certain files have been updated.
> ctime (time()) shows the current date and time, but without the timezone
> that you get to see e.g. by Unix' date command.
> 
> Is there a (Python) way to find out the timezone?
> 
> Richard.

import time

time.tzname

...will return a tuple containing the strings which name the timezone

time.timezone

...will return the offset from UTC in seconds

-- 
------------------------------------------------------------------------------
Tim Daneliuk
tundra at tundraware.com



More information about the Python-list mailing list