Movatterモバイル変換


[0]ホーム

URL:


Timezone

ChoppyChoppy_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 aPython script.  The reason I ask is because my script is required to read dateswith their associated timezones and transform them into GMT.  Python has afuntion called gmtime() in their time module however it only transforms the timebased on the current local timezone.  I solved this issue with C++ by setting anenvironment 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 ofdoing this in Python though.  Any help would be appreciated.ThanksChoppy


More information about the Python-listmailing list

[8]ページ先頭

©2009-2025 Movatter.jp