From: Jeff King <peff@peff.net>
To: Bastien Traverse <bt@esrevart.net>
Cc: git@vger.kernel.org
Subject: Re: [BUG] "git commit --date" format parsing
Date: Fri, 22 May 2015 18:06:10 -0400 [thread overview]
Message-ID: <20150522220610.GA21848@peff.net> (raw)
In-Reply-To: <555F2CBD.8050501@esrevart.net>
On Fri, May 22, 2015 at 03:18:53PM +0200, Bastien Traverse wrote:
> $ git --version
> git version 2.4.1
>
> $ uname -a
> Linux arch-clevo 4.0.4-1-ARCH #1 SMP PREEMPT Mon May 18 06:43:19 CEST
> 2015 x86_64 GNU/Linux
>
> $ mkdir test && cd test/
> $ git init
> $ touch test
> $ git add test
>
> 1. ISO 8601 (strict)
>
> $ git commit --date="2015-05-21T16∶31+02:00" -m "Test commit to check
> date format parsing"
> [master (root commit) fed9ae6] Test commit to check date format parsing
> Date: Thu May 21 02:00:00 2015 +0200
> 1 file changed, 0 insertions(+), 0 deletions(-)
> create mode 100644 test
>
> --> gets the date right but confuses the timezone for the time
OK, this is weird. When I tried to reproduce, I couldn't. But I had
typed in the date string myself while reading your email in another
window. And though I was sure that I had typed it correctly, just to be
double-plus-sure I copied and pasted your string. And it failed!
The date string in your email looks like this (using cut and paste):
$ echo 2015-05-21T16∶31+02:00 | xxd
00000000: 3230 3135 2d30 352d 3231 5431 36e2 88b6 2015-05-21T16...
00000010: 3331 2b30 323a 3030 0a 31+02:00.
Your "colon" is actually UTF-8 for code point U+2236 ("RATIO"). So git's
date parser does not recognize it, and punts to approxidate(), which
does all manner of crazy guessing trying to figure out what you meant.
-Peff
next prev parent reply other threads:[~2015-05-22 22:06 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-22 13:18 [BUG] "git commit --date" format parsing Bastien Traverse
2015-05-22 22:06 ` Jeff King [this message]
2015-05-23 23:24 ` [RESOLVED NOTABUG] " Bastien Traverse
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150522220610.GA21848@peff.net \
--to=peff@peff.net \
--cc=bt@esrevart.net \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).