On Sun, 24 Apr 2022 at 13:41, Eugene Triguba <[email protected]> wrote:
>
> Should `strptime`, when passed a %Z format specifier, parse more than just 
> GMT, UTC, and the local time zone given that we now have the IANA database in 
> the stdlib via PEP 615 since Python 3.9?
>
> The regex for the %Z specifier appears to come from TimeRE and always has 
> GMT, UTC, and then the local time zone.
>
> >>> from _strptime import TimeRE
> >>> t = TimeRE()
> >>> t['Z']
> '(?P<Z>cst|gmt|utc|cdt)'
>

For any timezone at all? That'd be ambiguous for BST, CST, and a bunch
of others. Timezone abbreviations aren't unique.

For a select set? Maybe, but then there'd need to be a way to choose
which ones you want to recognize, which might still end up being too
small and/or too large.

ChrisA
_______________________________________________
Datetime-SIG mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/datetime-sig.python.org/
The PSF Code of Conduct applies to this mailing list: 
https://www.python.org/psf/codeofconduct/

Reply via email to