[Zope] Comparing two dates WITH time?
Gregor Hoffleit
flight@mathi.uni-heidelberg.de
Wed, 5 Jul 2000 12:17:35 +0200
I guess this problem is just an incarnation of the open bug #1204
(cf. http://classic.zope.org:8080/Collector/1204/view), "DateTime has
bad problems with daylight saving times".
A patch for is available as http://www.zope.org/Members/hathawsh/DateTime.py
but it is not included in the CVS version.
Essentially, this bug says that DateTime conversions and rendering tends to
be wrong, when your're in a daylight saving time zone (e.g. 'Sommerzeit').
Gregor
On Wed, Jul 05, 2000 at 07:38:35AM +0200, Nils Jeppe wrote:
> How do I compare two dates that include full timestamps?
>
> If I try date_updated <= ZopeTime() it works only for dates that do not
> include times... as soon as you have a time in the date_updated field,
>
> If the date_updated contains only a date (200/07/04 for example) it works
> flawlessly. What am I doing wrong?
>
> (Note that if I set the date_updated to yesterday with a time, it works
> also. is this a bug, or what? My logic would tell me that 2000/07/04
> 12:00:00 GMT+1 is smaller than 2000/07/04 11:59:00 GMT+1).
>
>
> Please someone tell me what's going on, I am beinning to feel that I am
> either asking too stupid questions, or I have problems no-one has any clue
> about. I am not sure what'd frighten me more... ;-)