[Zope3-dev] Re: [Python-Dev] Holes in time

Barry A. Warsaw barry@zope.com
Wed, 1 Jan 2003 22:42:02 -0500


>>>>> "GvR" == Guido van Rossum <guido@python.org> writes:

    GvR> The C standard library (following the original Unix treatment
    GvR> of timezones) has a solution for this: it adds a three-valued
    GvR> flag to the local time which indicates whether DST is in
    GvR> effect or not.  Normally, you can set this flag to -1 ("don't
    GvR> know") in which case the proper value is calculated from the
    GvR> DST rules.  But for ambiguous local times (the hour at the
    GvR> end of DST), setting it to 0 or 1 makes the times unambiguous
    GvR> again.  This would mean that we'd have to add an "isdst"
    GvR> field to datetimetz objects and ways to set it; it would
    GvR> default to -1 (or perhaps to the proper value based on DST
    GvR> rules) but .astimezone() could set it explicitly to 0 or 1 to
    GvR> differentiate between the two ambiguous times.

+1, but let's use True, False, and None. :)

-Barry