From: "Dmitry V. Levin" <ldv@altlinux•org>
To: Nguyen Thai Ngoc Duy <pclouds@gmail•com>
Cc: git@vger•kernel.org
Subject: Re: git rev-parse --since=1970-01-01 does not work reliably
Date: Tue, 1 Nov 2011 16:44:34 +0400 [thread overview]
Message-ID: <20111101124434.GB22229@altlinux.org> (raw)
In-Reply-To: <20111031231320.GA3857@do>
[-- Attachment #1: Type: text/plain, Size: 1275 bytes --]
On Tue, Nov 01, 2011 at 06:13:20AM +0700, Nguyen Thai Ngoc Duy wrote:
> On Mon, Oct 31, 2011 at 08:17:09PM +0400, Dmitry V. Levin wrote:
> >
> > git rev-parse --since=1970-01-01 (and other git commands that take
> > date string arguments like --since) may fail when --since=1970-01-01 is
> > given. Whether it fails or not depends on current time and timezone data.
> > For example, "TZ=Europe/Paris git rev-parse --since=1970-01-01" fails two
> > hours a day (between 00:00 and 02:00 CET), and those who use more eastern
> > timezones are even less lucky. In artificial timezones like UTC-24 it
> > always fails:
> >
> > $ TZ=UTC-24 git rev-parse --since=1970-01-01
> > --max-age=18446744073709523490
>
> Out of curiosity, why do you need to work with a time so close to that
> date?
There is an utility that used to invoke "git log --since='1970-01-01 UTC'"
by default, and I was unlucky enough to use it during these hours of
failure. The utility is now fixed (it no longer calls git log with
--since option unless explicitly instructed to do so), and I hope git
is going to be fixed as well.
BTW, the timezone specifier (UTC) in "git rev-parse --since='1970-01-01 UTC'"
seems to be completely ignored by date string parser.
--
ldv
[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]
next prev parent reply other threads:[~2011-11-01 12:44 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-31 16:17 git rev-parse --since=1970-01-01 does not work reliably Dmitry V. Levin
2011-10-31 23:13 ` Nguyen Thai Ngoc Duy
2011-11-01 12:44 ` Dmitry V. Levin [this message]
2011-11-03 12:36 ` Nguyen Thai Ngoc Duy
2011-11-03 23:37 ` Nguyen Thai Ngoc Duy
2011-11-04 0:36 ` Junio C Hamano
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=20111101124434.GB22229@altlinux.org \
--to=ldv@altlinux$(echo .)org \
--cc=git@vger$(echo .)kernel.org \
--cc=pclouds@gmail$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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