On 4/10/2015 5:27 AM, Stuart Bishop wrote: >> P.S. The description of NonExistentTimeError in the PEP doesn't seem quite >> >right, as it currently says it will only be thrown if "is_dst=None", which >> >seems like a copy and paste error from the definition of AmbiguousTimeError. > The PEP is correct here. If you explicitly specify is_dst, you know > which side of the transition you are on and which offset to use. You > can calculate datetime(2000, 12, 31, 2, 0, 0, 0).astimezone(foo, > is_dst=False) using the non-DST offset and get an answer. It might not > have ever appeared on the clock on your wall, but it is better than a > punch in the face. If you want a punch in the face, is_dst=None > refuses to guess and you get the exception. So does this mean that consistent use of is_dst=False throughout the summer would allow for people that refuse to accept government regulation into their timekeeping, and are willing to be out of step with their neighbors, would be able to match their software to their wall-clock time? -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20150410/9552c825/attachment.html>
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4