[Python-Dev] PEP 431 Updates (original) (raw)
Antoine Pitrou solipsis at pitrou.net
Mon Jan 28 11:26:25 CET 2013
- Previous message: [Python-Dev] PEP 431 Updates
- Next message: [Python-Dev] PEP 431 Updates
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi,
Le Mon, 28 Jan 2013 11:01:05 +0100, Lennart Regebro <regebro at gmail.com> a écrit :
This function takes a name string that must be a string specifying a valid zoneinfo time zone, i.e. "US/Eastern", "Europe/Warsaw" or "Etc/GMT".
Will non-ambiguous shorthands such as "Warsaw" and "GMT" be accepted?
The
isdst
parameter can beFalse
(default),True
, orNone
.
False
will specify that the given datetime should be interpreted as not happening during daylight savings time, i.e. that the time specified is after the change from DST.True
will specify that the given datetime should be interpreted as happening during daylight savings time, i.e. that the time specified is before the change from DST.None
will raise anAmbiguousTimeError
exception if the time specified was during a DST change over. It will also raise aNonExistentTimeError
if a time is specified during the "missing time" in a change to DST.
NonExistentTimeError can also be raised for is_dst=True and is_dst=False, no? Or am I misunderstanding the semantics?
Regards
Antoine.
- Previous message: [Python-Dev] PEP 431 Updates
- Next message: [Python-Dev] PEP 431 Updates
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]