[Datetime-SIG] PEP-495 - Strict Invalid Time Checking

Alexander Belopolsky alexander.belopolsky at gmail.com
Tue Aug 25 20:49:21 CEST 2015

On Tue, Aug 25, 2015 at 1:56 PM, Stuart Bishop <stuart at stuartbishop.net>

> What would be even nicer is if users didn't have to use localize at all:
> >> datetime.now(tz=pytz.timezone('US/Eastern'))

This is certainly one of the main goals of PEP 495.  Note that
datetime.now() will never produce an invalid datetime and will always set
the fold attribute correctly in the (two-)fold case if
pytz.timezone('US/Eastern') follows PEP guidelines.  Therefore there is no
need for the third fold value in this case.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/datetime-sig/attachments/20150825/c4e7b549/attachment.html>

More information about the Datetime-SIG mailing list