[Zope3-dev] mini-RFC: times and timezones

Garrett Smith garrett at mojave-corp.com
Fri Feb 25 18:17:15 EST 2005


Martijn Faassen wrote:
> Gary Poster wrote:
> [snip]
>> Other observations:
>> - Working internally with utc datetimes is considered best
>>  practice[4]. The Zope 3 code base does store UTC dates, just
>> without a timezone. 
> 
> My gut feeling is that it would make sense to store UTC only and
> convert on intput and output.

Are you suggesting we store the timzone=UTC with the datetime value
(tz-aware) or store the datetime without a timezone (tz-naive), as we do
currently?

> My gut feeling is based on similar pattern as the one used with
> unicode strings. Mixing unicode and non-unicode strings can lead to
> bugs at random places in the codebase and to ugly hackery to suppress
> such bugs. It can be seen with Zope 2 unicode aware code.
> 
> There are some use cases for timezone independent datetime, such as
> having an appointment across the atlantic and not wanting to see it's
> at 3 am while it's really at 9 am. This can be fixed by judicious use
> of display hints too; you could have a datetime display in the
> timezone it is saved in. This requires an explicit storing of
> timezone information in this particular case, but that may be
> worthwhile. 
> 
> Regards,
> 
> Martijn
> 
> _______________________________________________
> Zope3-dev mailing list
> Zope3-dev at zope.org
> Unsub:
>
http://mail.zope.org/mailman/options/zope3-dev/garrett%40mojave-corp.com



More information about the Zope3-dev mailing list