Re: [PATCH] pretty: Provide a strict ISO8601 date format

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Beat Bolli <bbolli@xxxxxxxxx> 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).

> +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/?

> +	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?
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]