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 belopolsky
Recipients Daniel Moisset, belopolsky, docs@python
Date 2016-10-07.17:55:11
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1475862911.11.0.464319402428.issue28386@psf.upfronthosting.co.za>
In-reply-to
Content
None is passed to tzinfo.dst() when it is called from time.dst() method.  This is documented in the relevant section: <https://docs.python.org/3.5/library/datetime.html#datetime.time.dst>.

I am not sure whether if it is worth repeating in the abstract tzinfo class documentation, but if we do, the same should be done for the utcoffset() and tzname() methods which also get None when called from namesake time methods.

While we are at it, we should also do something about "If utcoffset() does not return None, dst() should not return None either." mandate in the tzinfo.utcoffset() documentation. See <https://docs.python.org/3.5/library/datetime.html#datetime.tzinfo.utcoffset>.  This mandate is violated by the datetime.timezone class.
History
Date User Action Args
2016-10-07 17:55:11belopolskysetrecipients: + belopolsky, docs@python, Daniel Moisset
2016-10-07 17:55:11belopolskysetmessageid: <1475862911.11.0.464319402428.issue28386@psf.upfronthosting.co.za>
2016-10-07 17:55:11belopolskylinkissue28386 messages
2016-10-07 17:55:11belopolskycreate