[Zope3-dev] The Date Time and TimeZone question

Tim Peters tim@zope.com
Sat, 16 Mar 2002 13:05:22 -0500


[Lennart Regebro]
> ...
> I don't see the need of *storing* the state of DST at all.

This means you don't have use cases that require it, or are staying at such
an abstract level that you haven't worked through concrete use cases yet, or
are folding a reversible notion of DST into your notion of what "a timezone"
is.

> A timezone aware DateTime object stores two things:
> 1. The date and time in UTC.
> 2. The timezone.

What information-- exactly --constitutes "the timezone" in this view?  For
example, is it a number?  A collection of numbers?  A string?  A function
pointer?  For example, if you believe it's a single number, like minutes
east of UTC, it's impossible to determine whether DST is in effect.  Keep in
mind that, e.g. "75 degrees west of the prime meridian" defines a line
extending from pole to pole, and not all locations on that line follow the
same DST rules.  So, add an hour to such an object, and it's impossible to
know what the result should "look like" in the local time of the object's
creator.

But you haven't said what "the timezone" means to you, so maybe you've got
something else in mind (but if so, it's not clear what).

> ...
> I can see there is a long discussion about this. I missed out the start
> of it, but to be brutally honest

No need to be brutal <wink>.

> I don't think it is half as complicated as you think.

If you think about it twice as long, you will <wink>.