|
|
Message-ID: <Pine.BSM.4.64L.2506062122150.12010@herc.mirbsd.org> Date: Fri, 6 Jun 2025 21:25:00 +0000 (UTC) From: Thorsten Glaser <tg@...bsd.de> To: musl@...ts.openwall.com cc: Rafał Miłecki <rafal@...ecki.pl> Subject: Re: [PATCH] strptime: support "Z" value for the %z field descriptor Rafał Miłecki dixit: >Field descriptor %z was added and described as an output of Austin Group >tracker issues 879 & 1727. It is documented as: "The offset from UTC in >the ISO 8601:2004 standard format (<tt>+hhmm</tt> or <tt>-hhmm</tt>)." Funny thing, because ISO 8601 specifies something else than that, unless you write it as 20250606T232251+0200. Pity that they chose to word the documentation like that (actually formatting %z without the colon is, however, correct, of course). You need the GNU extension %:z to *actually* format an ISO 8601 timestamp: 2025-06-06T23:22:51+02:00 >It seems a bit vague as ISO 8601:2004 allows more formats than those >specified ones. One of allowed values is "Z" which represents UTC. On ingress (strptime, and the likes), yes, please do also accept ‘Z’. bye, //mirabilos -- “It is inappropriate to require that a time represented as seconds since the Epoch precisely represent the number of seconds between the referenced time and the Epoch.” -- IEEE Std 1003.1b-1993 (POSIX) Section B.2.2.2
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.