This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author techtonik
Recipients belopolsky, brian.curtin, docs@python, georg.brandl, napik, techtonik
Date 2011-01-11.09:55:44
SpamBayes Score 0.0015254836
Marked as misclassified No
Message-id <1294739747.17.0.9995254198.issue7229@psf.upfronthosting.co.za>
In-reply-to
Content
Classic user developer impedance mismatch. =)

I agree that Python should guard its users against crazy standards that creep into standard lib, because nobody had time to think about pythonic API.

I propose the following change:

http://docs.python.org/library/time.html#time.altzone
-  UTC offset of the local DST timezone if one is defined. Only use this if daylight is nonzero.
+  UTC offset of the current timezone with Daylight Savings Time (DST) correction. To check if DST is currently active, use `time.localtime(t).tm_isdst`

http://docs.python.org/library/time.html#time.daylight
-  Nonzero if a DST timezone is defined.
+  Flag indicating that current timezone has Daylight Savings Time (DST) offset. To check if DST is currently active, use `time.localtime(t).tm_isdst`

http://docs.python.org/library/time.html#time.timezone
-  UTC offset of the local (non-DST) timezone
+  UTC offset of the current timezone. It doesn't include Daylight Savings Time (DST) correction. See `time.altzone` for that.


BTW, isn't the following check redundant?
    if time.localtime(t).tm_isdst and time.daylight:
History
Date User Action Args
2011-01-11 09:55:47techtoniksetrecipients: + techtonik, georg.brandl, belopolsky, brian.curtin, napik, docs@python
2011-01-11 09:55:47techtoniksetmessageid: <1294739747.17.0.9995254198.issue7229@psf.upfronthosting.co.za>
2011-01-11 09:55:44techtoniklinkissue7229 messages
2011-01-11 09:55:44techtonikcreate