[Zope3-dev] The Date Time and TimeZone question

Lennart Regebro lennart@torped.se
Sat, 16 Mar 2002 19:36:52 +0100


From: "Tim Peters" <tim@zope.com>

> What information-- exactly --constitutes "the timezone" in this view?

See my earlier answer to Guido. A timezone is anything that a timezone
convertion function recognizes as being a timezone. Fuzzy, I know. :-)
In practise, this would be a timezone information object. Such and object
would obviously have a possibility of containing DST information in one way
or another.

I think the confusion here arises from people believing that the timezone
shifts when DST is in effect. It doesn't. My timezone stays the same, even
though the offset changes.

> > I don't think it is half as complicated as you think.
>
> If you think about it twice as long, you will <wink>.

No, I won't. I have thought about this before, and written programs that
does date arithmatics across timezone boundaries and DST changes. The only
really complicated thing in this matter is that there is umpteen different
names for each timezone, which is a complete pain in the royal ass. And
also, if you want to take care of the fact that the on and off times for DST
changes from year to year, the conversion rules can get quite ridicoulous,
if you want to take care of historical changes, which Guidos comment about
timedate changes indicates.
(Windows doesn't, by the way).