git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] Use time_t for timestamps returned by approxidate() instead of unsigned

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Jan 24, 2009, 16:58 UTC
Message-ID
<alpine.DEB.1.00.0901241757140.13232@racer>
In-Reply-To
<32c343770901240813k2eeb19b0q65b533f829cb44d4@mail.gmail.com>
Hi,
On Sat, 24 Jan 2009, Tim Henigan wrote:
Show 25 quoted lines
> On Sat, Jan 24, 2009 at 1:27 AM, Johannes Schindelin
> <Johannes.Schindelin@gmx.de> 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

Previous: Wincent ColaiutaNext: Tim Henigan
Message 6 of 8 in “Use time_t for timestamps returned by approxidate() instead of unsigned”
  1. Use time_t for timestamps returned by approxidate() instead of unsignedTim Henigan, Jan 22, 2009
  2. Markus HeidelbergJan 24, 2009
  3. Johannes SchindelinJan 24, 2009
  4. Tim HeniganJan 24, 2009
  5. Wincent ColaiutaJan 24, 2009
  6. Johannes SchindelinJan 24, 2009
  7. Tim HeniganJan 24, 2009
  8. Johannes SchindelinJan 24, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.