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

2007-08-28 Thread Maurits van Rees
J Cameron Cooper, on 2007-08-27: > Maurits van Rees wrote: >> Hm, that should probably be "except DateTime.DateTime.DateError" but >> there is not really anything else that can go wrong here. > > A ConflictError can go wrong here, which is an additional and important > reason not to have a bare ex

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

2007-08-27 Thread J Cameron Cooper
Maurits van Rees wrote: Eric, on 2007-08-26: To work around this, I've modified the addition so that instead of adding 1 day, it adds 1.5 days. This extra half a day is removed by the theDateTime.earliestTime() call but is enough to overcome the DST addition problem. Ugly hack. I had the sa

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

2007-08-27 Thread Eric Thomas
On 8/27/07, Dieter Maurer <[EMAIL PROTECTED]> 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 i

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

2007-08-27 Thread Dieter Maurer
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 cas

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

2007-08-27 Thread Maurits van Rees
Eric, on 2007-08-26: > To work around this, I've modified the addition so that instead of adding 1 > day, it adds 1.5 days. This extra half a day is removed by the > theDateTime.earliestTime() call but is enough to overcome the DST addition > problem. Ugly hack. I had the same problem once in

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

2007-08-26 Thread Andreas Jung
--On 26. August 2007 19:12:18 + Eric <[EMAIL PROTECTED]> wrote: Dieter Maurer <[EMAIL PROTECTED]> writes: Eric Thomas wrote at 2007-8-25 07:18 -0500: > I've been having a site problem that I've tracked down to DateTime. > Simply enough, the code snippets below both try to add 31 days to

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

2007-08-26 Thread Eric
Dieter Maurer <[EMAIL PROTECTED]> writes: > > Eric Thomas wrote at 2007-8-25 07:18 -0500: > >I've been having a site problem that I've tracked down to DateTime. Simply > >enough, the code snippets below both try to add 31 days to the first day in > >October. I'm expecting this to result in the

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

2007-08-25 Thread Eric
> > > I've been having a site problem that I've tracked down to DateTime.  Simply enough, the code snippets below both try to add 31 days to the first day in October.  I'm expecting this to result in the first day of November. > >   > Good Example: > > >>> from DateTime import DateTime>>> star