git/list[1] front-page[2] threads[3] people[4] search[5] about
 

PATCH: Improved support for ISO 8601 timezones

From
Marcus Comstedt <marcus@mc.pp.se>
Date
May 17, 2010, 19:07 UTC
Message-ID
<1274123231-18482-1-git-send-email-marcus@mc.pp.se>
Hi.

I discovered that git's date parser does not understand "Z" to mean the "UTC" timezone. This is unfortunate, because the use of "Z" is prescribed by ISO 8601.

I made a small patch to add "Z" as an alias for "UTC", which enables standard ISO 8601 timestamps to be parsed correctly. Also, it fixes a bug that at least three characters of the timezone name had to match, which is of course impossible when the name of the timezone is shorter than three characters. There was already such a timezone before ("NT") which could not be selected due to the bug.

The second patch, which is perhaps less essential, adds support for the remaining numerical timezone indicators defined by ISO 8601 not already supported by git (only +-hhmm was supported, but ISO 8601 also specifies that +-hh:mm and +-hh are ok as well).

Thanks
  // Marcus
Next: Marcus Comstedt
Message 1 of 6 in “PATCH: Improved support for ISO 8601 timezones”
  1. Marcus ComstedtMay 17, 2010
  2. 1/2 Added "Z" as an alias for the timezone "UTC"Marcus Comstedt, May 17, 2010
  3. Jay SoffianMay 17, 2010
  4. 2/2 Accept the timezone specifiers [+-]hh:mm and [+-]hh in addition to [+-]hhmmMarcus Comstedt, May 17, 2010
  5. Junio C HamanoMay 19, 2010
  6. Marcus ComstedtMay 19, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.