neglecting daylight savings
Ben Finney
ben+python at benfinney.id.au
Thu Nov 11 20:35:21 EST 2010
Neil Berg <nberg at atmos.ucla.edu> writes:
> I am trying to convert UTC to PST and want to neglect daylight savings
> even for the days that are in PDT, not PST.
Then you don't want “PST”. That name entails all the rules of the time
zone. If that's not what you want, don't ask timezone libraries for it.
Similarly for the timezone named “America/Los_Angeles”; if you ask for
that you are explicitly asking for all the time changes that zone
entails. If you don't want it, don't ask for it.
If you want exactly the same offset all the time, regardless of
government DST silliness, ask for it: “UTC-8”, for example, or whatever
the fixed offset from UTC you want.
--
\ “Outside of a dog, a book is man's best friend. Inside of a |
`\ dog, it's too dark to read.” —Groucho Marx |
_o__) |
Ben Finney
More information about the Python-list
mailing list