git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Rodrigo Fernandes <rtfrodrigo@gmail.com>
Cc: Junio C Hamano <gitster@pobox.com>,
	Git Mailing List <git@vger.kernel.org>,
	Duy Nguyen <pclouds@gmail.com>
Subject: Re: [BUG REPORT] Git log pretty date
Date: Mon, 2 Jun 2014 23:46:19 -0400	[thread overview]
Message-ID: <20140603034619.GA18176@sigill.intra.peff.net> (raw)
In-Reply-To: <CACJZPBtJZ+gDvtHnRwi8JOO7rFAg=pPBvEQ=-FwKnp9Gr+FStw@mail.gmail.com>

On Fri, May 30, 2014 at 09:08:57AM +0100, Rodrigo Fernandes wrote:

> Do you have any idea how does github understand that is a bug and
> fixes it automatically?
> (I'm saying this because on Github the date is correct).

I looked into this. The dates you see on GitHub's web UI are actually
parsed by Rugged/libgit2. The libgit2 parser is slightly more forgiving
in this instance; if it sees a broken timezone, it will leave the
timestamp intact, and only omit the timezone. Whereas git says "no, it's
broken, and the timestamp cannot be trusted".

I think both are equally valid strategies, and I do not even think it is
a problem that they diverge between the two implementations. I'd be OK
with a patch to make git handle errors in each independently, assuming
it is not too invasive.

-Peff

  reply	other threads:[~2014-06-03  3:46 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-29 10:29 [BUG REPORT] Git log pretty date Rodrigo Fernandes
2014-05-29 10:50 ` Duy Nguyen
2014-05-29 16:16   ` Jeff King
2014-05-29 18:57     ` Junio C Hamano
2014-05-29 19:49       ` Jeff King
2014-05-29 19:57         ` Rodrigo Fernandes
2014-05-30  8:08           ` Rodrigo Fernandes
2014-06-03  3:46             ` Jeff King [this message]
2014-06-03  6:23               ` Dennis Kaarsemaker
2014-06-03  6:45                 ` Jeff King
2014-05-29 11:07 ` Dennis Kaarsemaker
2014-05-29 12:24   ` Rodrigo Fernandes
2014-05-29 12:52     ` Duy Nguyen

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140603034619.GA18176@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=pclouds@gmail.com \
    --cc=rtfrodrigo@gmail.com \
    /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.
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 NNTP newsgroup(s).