On Wed, 1 Jan 2003, Guido van Rossum wrote:
+1, but let's use True, False, and None. :)
This is a typical example of where bool is wrong.
No it isn't.
Google for "double daylight savings", and you'll understand why. So it would make more sense to use: 3600, 0, and None.
Unless congressman Sherman proposes to move the clock forward and/or back more than once a year, this is not necessary: the flag only indicates *whether* DST is in effect or not; to know *how much* the DST adjustment is you should call the tzinfo's dst() method. The conventional value of one hour of is never implied in any of these calculations -- that's always up to the tzinfo object. (However, it's assumed that dst() returns a positive number -- otherwise it wouldn't be daylight *savings*. On the southern hemisphere, the seasons are reversed, but DST still moves the clock forward by some amount, not back.)
Congressman Sherman is totally irrelevant. In 1945, Britain used GMT+1 until April 2nd, then GMT+2 until July 15th, then went back GMT+1 until October 7th, and then GMT the rest of he year. Again in Britain, in 1947, DST extended from March 16th to November 2nd, with double DST from April 13th to August 10th. /Paul