Timezone
Choppy
Choppy_member at newsranger.com
Wed Apr 4 12:04:15 EDT 2001
I was wondering whether anyone knew if it's possible to change the timezone in a
Python script. The reason I ask is because my script is required to read dates
with their associated timezones and transform them into GMT. Python has a
funtion called gmtime() in their time module however it only transforms the time
based on the current local timezone. I solved this issue with C++ by setting an
environment variable "TZ" to the appropriate timezone and running the _tzset()
standard C library function to reset the current timezone. I don't see a way of
doing this in Python though. Any help would be appreciated.
Thanks
Choppy
More information about the Python-list
mailing list