There is a new issue about the %z directive in strptime on the issue tracker: 
https://bugs.python.org/issue31800 (linked to a few related issues), and a 
linked PR expanding the definition of %z to match HH:MM: 
https://github.com/python/cpython/pull/4015

I think either adding a %:z directive or expanding the definition of %z would 
be pretty important, and I think there's a good case to be made for either one. 
To summarize the arguments for people on the mailing list:

The argument for expanding the definition of %z that I find strongest is that 
according to the linux man pages ( 
http://man7.org/linux/man-pages/man3/strptime.3.html ), while %z generates 
+-HHMM in strftime, strptime is supposed to match "An RFC-822/ISO 8601 standard 
timezone specification",and ISO 8601 uses +-HH:MM, so if we're following those 
linux pages, we should be accepting the version with the colon.

The argument that I find most compelling for adding a %:z directive are:

    1. maintains the symmetry between strftime and strptime
    2. allows users to be stricter about their datetime format
    3. has precedent in that GNU's `date` command accepts %z, %:z and %::z 
formats

Can we establish some consensus on which should be done so that it can be 
implemented?

Best,

Paul

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Datetime-SIG mailing list
[email protected]
https://mail.python.org/mailman/listinfo/datetime-sig
The PSF Code of Conduct applies to this mailing list: 
https://www.python.org/psf/codeofconduct/

Reply via email to