Re: What's cooking in git.git (Apr 2020, #01; Wed, 15)
- From
Danh Doan <congdanhqx@gmail.com>
- Date
- Apr 17, 2020, 13:36 UTC
- Message-ID
- <20200417133647.GA26701@danh.dev>
- In-Reply-To
- <xmqqr1wmwu2f.fsf@gitster.c.googlers.com>
On 2020-04-16 22:38:16-0700, Junio C Hamano <gitster@pobox.com> wrote:
Show 18 quoted lines
> Danh Doan <congdanhqx@gmail.com> writes: > > > On 2020-04-15 16:01:52-0700, Junio C Hamano <gitster@pobox.com> wrote: > >> * dd/iso-8601-updates (2020-04-15) 2 commits > >> - date.c: allow compact version of ISO-8601 datetime > >> - date.c: skip fractional second part of ISO-8601 > >> > >> The approxidate parser learns to parse seconds with fraction. > >> > >> Will merge to 'next'. > > > > I thought we haven't gained enough concious for "12:34:56.7.days.ago" > > Current code will treat it as "7 days ago at 12:34:56" > > New code will treat it as 12:34:56 (today?) > > Yup, it clearly is a regression, and I do not think there is an > agreement that the regression matters in real life. >
Well, I _think_ we should keep it in pu to see other's feedback for now. Even if we want to advance it to next, I would like to have this fixup for the documentation the first patch.
--------------8<------------- Subject: [PATCH] fixup! date.c: skip fractional second part of ISO-8601
Signed-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com> --- Documentation/date-formats.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/Documentation/date-formats.txt b/Documentation/date-formats.txt index 6f69ba2ddd..7e7eaba643 100644 --- a/Documentation/date-formats.txt +++ b/Documentation/date-formats.txt @@ -20,7 +20,10 @@ RFC 2822:: ISO 8601:: Time and date specified by the ISO 8601 standard, for example `2005-04-07T22:13:13`. The parser accepts a space instead of the - `T` character as well. The fractional part will be ignored. + `T` character as well. Fractional parts of a second will be ignored, + for example `2005-04-07T22:13:13.019` will be treated as + `2005-04-07T22:13:13` + + NOTE: In addition, the date part is accepted in the following formats: `YYYY.MM.DD`, `MM/DD/YYYY` and `DD.MM.YYYY`.
-- Danh