From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: Olivier Marin <dkr+ml.git@free.fr>
Cc: Junio C Hamano <gitster@pobox.com>,
Git Mailing List <git@vger.kernel.org>,
Olivier Marin <dkr@freesurf.fr>
Subject: Re: [PATCH] Fix approxidate("never") to always return 0
Date: Wed, 18 Jun 2008 16:06:57 +0100 (BST) [thread overview]
Message-ID: <alpine.DEB.1.00.0806181550190.6439@racer> (raw)
In-Reply-To: <1213720497-9093-1-git-send-email-dkr+ml.git@free.fr>
Hi,
On Tue, 17 Jun 2008, Olivier Marin wrote:
> diff --git a/date.c b/date.c
> index a74ed86..1a4eb87 100644
> --- a/date.c
> +++ b/date.c
> @@ -682,10 +682,8 @@ static void date_am(struct tm *tm, int *num)
>
> static void date_never(struct tm *tm, int *num)
> {
> - tm->tm_mon = tm->tm_wday = tm->tm_yday
> - = tm->tm_hour = tm->tm_min = tm->tm_sec = 0;
> - tm->tm_year = 70;
> - tm->tm_mday = 1;
> + time_t n = 0;
> + localtime_r(&n, tm);
I would have reused local_tzoffset() and been explicit about the used
date, but your version is shorter.
Ciao,
Dscho
prev parent reply other threads:[~2008-06-18 15:09 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-15 23:20 Bug with approxidate("never")? Olivier Marin
2008-06-17 16:34 ` [PATCH] Fix approxidate("never") to always return 0 Olivier Marin
2008-06-18 15:06 ` Johannes Schindelin [this message]
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=alpine.DEB.1.00.0806181550190.6439@racer \
--to=johannes.schindelin@gmx.de \
--cc=dkr+ml.git@free.fr \
--cc=dkr@freesurf.fr \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.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