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

Re: [PATCH v2] date: make "iso-strict" conforming for the UTC timezone

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 13, 2024, 22:42 UTC
Message-ID
<xmqqmsr169e5.fsf@gitster.g>
In-Reply-To
<20240313222922.11170-1-dev+git@drbeat.li>
"Beat Bolli" <bb@drbeat.li> writes:
Show 9 quoted lines
> ISO 8601-1:2020-12 specifies that a zero timezone offset must be denoted
> with a "Z" suffix instead of the numeric "+00:00". Add the correponding
> special case to show_date() and a new test.
>
> This changes an established output format which might be depended on by
> scripts. The original patch 466fb6742d7f (pretty: provide a strict ISO
> 8601 date format, 2014-08-29) mentioned XML parsers as its rationale,
> which generally have good parsing support, so this change should be
> fine.
"fine." -> "fine for that particular usecase."

Unlike in 2005, we no longer write our features only for our own single use case that motivated it. I do not think it is possible to make this change without breaking some real script, and admitting this is a breaking change and we are knowingly doing so is probably better in the longer term.

Saying "this should be fine" in the log will give future developers room to consider reverting it, and while they are free to make such a decision based on the reality at their time in the future, we should give them a data point from our point of view: we know it may break somebody but we are still doing so knowingly as upside to adhere to a published standard and help those users who adhere to the same standard is more valuable then the unfortunate script that bended themselves to match our earlier mistake.

Thanks.
Previous: Beat BolliNext: Beat Bolli
Message 6 of 10 in “log.date 'iso-strict' does not comply with ISO 8601-1:2020-12”
  1. Osipov, Michael (IN IT IN)Mar 13, 2024
  2. date: make "iso-strict" conforming for the UTC timezoneBeat Bolli, Mar 13, 2024
  3. Junio C HamanoMar 13, 2024
  4. Osipov, Michael (IN IT IN)Mar 13, 2024
  5. date: make "iso-strict" conforming for the UTC timezoneBeat Bolli, Mar 13, 2024
  6. Junio C HamanoMar 13, 2024
  7. date: make "iso-strict" conforming for the UTC timezoneBeat Bolli, Mar 13, 2024
  8. Junio C HamanoMar 13, 2024
  9. Osipov, Michael (IN IT IN)Mar 13, 2024
  10. Kristoffer HaugsbakkMar 13, 2024

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.