From: Johannes Schindelin Date: Wed, 18 Jun 2008 15:06:57 GMT Subject: Re: [PATCH] Fix approxidate("never") to always return 0 Message-ID: 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