DateTime and TimeZone
I installed zope 2.7.6 on a windows 2000 machine. This machine is set to the pacific timezone. When I run python from the command line, and check DateTime, I get:
from DateTime import DateTime DateTime() DateTime('2005/09/06 23:55:29.620 GMT-7')
The 'GMT-7' is the Mountain timezone. The actual time should read DateTime('2005/09/06 23:55:29.620 GMT-8') for the Pacific timezone. What controls the default timezone behavior of DateTime on Windows? How can I get this working correctly? Thanks, Mark -- Mark Gibson <mark@dimensional.com>
It seems that since the Pacific timezone is in daylight savings time, the correct offset is -7. So.... nevermind. On Tue, 2005-09-06 at 00:53, Mark Gibson wrote:
I installed zope 2.7.6 on a windows 2000 machine. This machine is set to the pacific timezone.
When I run python from the command line, and check DateTime, I get:
from DateTime import DateTime DateTime() DateTime('2005/09/06 23:55:29.620 GMT-7')
The 'GMT-7' is the Mountain timezone. The actual time should read DateTime('2005/09/06 23:55:29.620 GMT-8') for the Pacific timezone.
What controls the default timezone behavior of DateTime on Windows? How can I get this working correctly?
Thanks, Mark -- Mark Gibson <mark@dimensional.com>
Mark Gibson wrote at 2005-9-6 00:53 -0600:
...
from DateTime import DateTime ... What controls the default timezone behavior of DateTime on Windows?
"DateTime" gets it from Python and Python gets it from the operating system (its C runtime library). Under *nix, the environment variable "TZ" can be used to control the timezone. -- Dieter
participants (2)
-
Dieter Maurer -
Mark Gibson