[Zope3-dev] Dates and times

Chris Withers chrisw@nipltd.com
Thu, 21 Nov 2002 11:01:09 +0000


Shane Hathaway wrote:
> 1) If you're in a timezone with daylight savings, sometimes 23:00 plus 4 
> hours is 02:00, 02:30, 03:00, 03:30, or 04:00. 

No its not. I'm purely refering to abstract 'times'. These should not be 
influenced by DST for exactly the reasons you describe.

> 2) It is just as easy to use a datetime(tz) and a timedelta to perform 
> this calculation.  You may get a different answer depending on whether 
> you use a datetime or a datetimetz. (I think--Guido, is this correct?)

Hmmm... that's true, but doesn't help when dealing with abstract times. That 
said, I don't know how often you'd want to deal with abstract times.

> History has proven that it is very hard to write a general date/time 
> class.

Yup, hence why I was just talking about something that stores a time, with no 
fiddley bits ;-)

> Zope tried it and failed, because so many people's expectations 
> were violated by correct time zone handling.  Sun tried to achieve it in 
> Java, and came very close, but they still ended up confusing people.

Hmmm... :-( Time sucks, shall we decimialise it?

cheers,

Chris