From: Johannes Schindelin Date: Sat, 24 Jan 2009 16:58:08 GMT Subject: Re: [PATCH] Use time_t for timestamps returned by approxidate() instead of unsigned Message-ID: In-Reply-To: <32c343770901240813k2eeb19b0q65b533f829cb44d4@mail.gmail.com> Hi, On Sat, 24 Jan 2009, Tim Henigan wrote: > On Sat, Jan 24, 2009 at 1:27 AM, Johannes Schindelin > wrote: > > > > On Thu, 22 Jan 2009, Tim Henigan wrote: > > > > > Use time_t for timestamps returned by approxidate() instead of > > > unsigned long. All references to approxidate were checked as well > > > as references to OPT_DATE. > > > > Hmm. I vaguely remember Linus mentioning recently that unsigned long > > is the appropriate data type for the Unix Epoch... > > You are correct. I just found a post on this list where Linus > specifically rejected a similar patch from another contributor. A quote > from https://kerneltrap.org/mailarchive/git/2008/11/6/4014124: > > " "time_t" is one of those totally broken unix types. The standards > say that it's an "arithmetic" type, but leaves it open to be just > about anything. Traditionally, it's a signed integer (bad), and in > theory it could even be a floating point value, I think. > > And in _all_ such cases, it's actually better to cast it to > "unsigned long" than keep time in a system-dependent format that is > most likely either _already_ "unsigned long", or alternatively > broken." Thanks. I should have searched that post myself, but I was too tired... > Should I update the GitWiki page to remove this Janitor task or do you > keep it as a test to see if people are properly searching the mail > archives? Yes, please! > Sorry to waste your time on the patch review. Sorry that we wasted your time by letting that page go stale... Ciao, Dscho