[Python-Dev] Draft PEP for time zone support.
regebro at gmail.com
Sat Dec 29 05:40:54 CET 2012
On Sat, Dec 29, 2012 at 2:23 AM, Steven D'Aprano <steve at pearwood.info>wrote:
> The PEP says:
> * New function :``timezone(name=None, db_path=None)``
> This function takes a name string that must be a string specifying a
> valid zoneinfo timezone, ie "US/Eastern", "Europe/Warsaw" or
> It isn't 100% clear to me from the PEP what a valid name string would be,
> but I assume that it will accept anything that the time.tzset function
> will accept:
No, valid names are the names of time zones in the zoneinfo database. There
isn't really any usecase for defining up your own rules as that would mean
that you want a time zone that doesn't exist, which seems a bit pointless.
(We have KeyError rather than UnknownKeyError, NameError rather than
> UnknownNameError, etc.)
Sure, but what would otherwise a KeyError be unless an unkown or
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-Dev