From: Osipov, Michael (IN IT IN) Date: Wed, 13 Mar 2024 11:27:37 GMT Subject: log.date 'iso-strict' does not comply with ISO 8601-1:2020-12 Message-ID: <410d458c-ae5b-40cc-9c8e-97b016c74a76@siemens.com> Folks, I am running git version 2.43.0 and consider the following config: > $ git config --system --list > core.eol=native > log.date=iso-strict > color.ui=auto when a commit happens with a zero offset the following is displayed: > osipovmi@deblndw011x:~/var/Projekte/tomcat-native ((ba1454e15...)|BISECTING) > $ git log > commit ba1454e15619a44fe66d86f59c766c0cc25323eb (HEAD) > Author: Mark Thomas > Date: 2024-02-13T08:27:43+00:00 > > Fix link > This not right according to the standard in the original language version, namely in sections: * 4.3.13 Zeitverschiebung (time shift) (roughly translated from German): Z denotes that there is no shift from UTC. It also says that you either have an offset or use "Z" * 5.3.3 Uhrzeit in UTC (time in UTC) (roughly translated from German): ...the formats from sections ... must be used followed by the UTC marker "Z" without space. Throughout the definition neither +0000 for the basic format nor +00:00 for the extended format are used to denote a zero offset from UTC. The offending code snippet is here: https://github.com/git/git/blob/945115026aa63df4ab849ab14a04da31623abece/date.c#L344-L352 See also Java's Instant class [1] which is based on ISO 8601 as well is Java's SimpleDateFormat XXX [2] which will *always* print "Z" in case of a zero offset. I'd expect Git to comply with strict since this is why it has been introduced years ago instead of modifying 'iso'. Regards, Michael [1] https://docs.oracle.com/javase/8/docs/api/java/time/Instant.html [2] https://github.com/openjdk/jdk8u-dev/blob/fbb3392d744d1572239eeca082d7365a03897b8b/jdk/src/share/classes/java/text/SimpleDateFormat.java#L1291-L1306