Re: [PATCH] pretty: Provide a strict ISO8601 date format
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Aug 28, 2014, 22:53 UTC
- Message-ID
- <xmqq61hc8bvq.fsf@gitster.dls.corp.google.com>
- In-Reply-To
- <1409248189-31409-1-git-send-email-bbolli@ewanet.ch>
Beat Bolli <bbolli@ewanet.ch> writes:
> It uses the '%aI' and '%cI' format specifiers or the '--date=iso-strict' > date format name.
OK.
> > See http://article.gmane.org/gmane.comp.version-control.git/255879 for > discussion.
Please think of a way to explain/justify your changes better before forcing readers to go online. In this case, I think what you wrote in the updates to the documentation would serve as a good basis for it (describe it backwards).
Show 9 quoted lines
> +The differences to the strict ISO 8601 format are: > + > + - a space instead of the `T` date/time delimiter > + - a space between time and time zone > + - no colon between hours and minutes of the time zone > + > ... > -`--date=iso` (or `--date=iso8601`) shows timestamps in ISO 8601 format. > +`--date=iso` (or `--date=iso8601`) shows timestamps in a ISO 8601-like format.
Should it be s/a ISO/an ISO/?
Show 7 quoted lines
> + else if (mode == DATE_ISO8601_STRICT) > + strbuf_addf(&timebuf, "%04d-%02d-%02dT%02d:%02d:%02d%+03d:%02d", > + tm->tm_year + 1900, > + tm->tm_mon + 1, > + tm->tm_mday, > + tm->tm_hour, tm->tm_min, tm->tm_sec, > + tz / 100, abs(tz % 100));
Wouldn't this misidentify a zone that is 30 minutes off of GMT, i.e. tz == -30? tz/100 would not be negative and "%+03d:" would happily show "+00:", no?