[Zope3-dev] The Date Time and TimeZone question

Guido van Rossum guido@python.org
Mon, 18 Mar 2002 12:30:14 -0500


[Lennart]
> Well, when I say timezone, I in this case mean something that the
> timezone translation recognizes as a timezone. :-)

What timezone translation?  I'm not going to provide a timezone parser
for Python.  (Zope probably will provide one derived from the code in
Zope2, but I don't know much about it yet.)

[me]
> > No, that's not how it works.  In my design, 1 day is exactly
> > equivalent to 24 hours.
> 
> I don't see how that is possible with the description you have given
> of your solution.

Then the description is lacking.

> If you make computations on the broken-out fields without taking
> care of timezone information adding 1 day at a DST boundary would
> mean 23 or 25 hours. But, in your description adding 24 hours would
> always be equivalent to adding 1 day.

It would mean adding 23 or 25 hours when you reinterpret the source
and result in UTC.  But when stripped from tz info, i.e. interpreted
as naive time, it's 24 hours, and that's how I like to think of it.

> I personally think that it would be of great significance if we fix
> this problem, and it shouldn't even be very complicated. It does
> mean that you need to convert the datetime to UTC before adding
> minutes or hours, and then convert it back. But that would solve it.

What problem?

> The specs I have seen for timezone support on unix date back far
> beyond 1970.

But not far enough; Tim has answered this with a reference to the
specific standard already.

--Guido van Rossum (home page: http://www.python.org/~guido/)