Fw: [Zope] DateTime() BUG!

Andreas Jung Andreas Jung" <andreas@andreas-jung.com
Tue, 8 May 2001 08:03:23 -0400


----- Original Message -----
From: "Kai Hofmann" <hofmann@isl.org>>
> From my point this is not correct, because of the following points:
>
> 1) within the enddate there is no time defined - so it is NOT possible to
> compare the time - following your argument - the result should be a TYPE
> ERROR, because its not possible to compare a date/time pair with a date

<DISAGREE>
When you enter a new date property to an object then this date is converted
to an instance of DateTime (see PropertyManager and Converts module).
The DateTime constructor  assumes 00:00 when now time is given in the date
string. This is a common used semantics.
</DISAGREE>

> 2) A date only describes a whole day - so comparing it with a date/time
pair
> should always result in a compare of the dates only - because the time is
> out of interest here (its always within the date range).

see above...
When you only want to handle with dates you should avoid using the
DateTime()
constructor for comparision issues because it uses the current time.


Andreas