[Zope] Re: Help with DateTime.earliestTime()

Eric Thomas eric at thomasfam.com
Mon Aug 27 16:31:29 EDT 2007

On 8/27/07, Dieter Maurer <dieter at handshake.de> wrote:
> Andreas Jung wrote at 2007-8-26 21:23 +0200:
> > ...
> >If you can: use Python's datetime module. DateTime is broken in many
> ways.
> If it handles daytime saving and addition by some float days -- it will
> not have any chance...
> If it does not handle daytime saving -- then it misses an essential
> use case...
> Some problems come from the complexity of the real world and
> not from a particular implementation....
> --
> Dieter

In this case it seems that the complexity is being added by the DateTime
implementation.  When given an int number of days and a DateTime that has no
time element, DateTime should not convert everything down to seconds and
account for DST that happens to occur during the period.

When adding days + days, I'd expect to get a result that only considers
days; not DST.
So I agree with your earlier post that DateTime should treat int and float
addition differently.  It should also probably look at the DateTime and
revert to integer math if there is no time element present.

- Eric
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.zope.org/pipermail/zope/attachments/20070827/ab95aaeb/attachment.htm

More information about the Zope mailing list