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

Re: [PATCH 1/1] Fix date checking in case if time was not initialized.

From
Mike Gorchak <mike.gorchak.qnx@gmail.com>
Date
Feb 25, 2013, 21:47 UTC
Message-ID
<CAHXAxrO4c=s0pjNpXK171HUbQT06jm-VAxNNK1DAqZEZfz6OtA@mail.gmail.com>
In-Reply-To
<7va9qsxjzk.fsf@alter.siamese.dyndns.org>
Show 5 quoted lines
>> So is_date() always return negative result for the text string where
>> date is placed before time like '2008-02-14 20:30:45'.
> Yes, it returns this -1 on other platforms, but...
>> It must fail on
>> other platforms as well.

It also fails under Linux, but real problem is not here, it is just an unoptimal date parser.

> ... the input '2008-02-14 20:30:45' still parses fine for others
> (including me).  That is what is puzzling.
> A shot in the dark: perhaps your time_t is unsigned?

Yeah, it was a headshot :) It really due to unsigned time_t. I will send two patches right now with fixes regarding unsigned time_t comparison.

Previous: Junio C HamanoNext: Junio C Hamano
Message 7 of 9 in “Fix date checking in case if time was not initialized.”
  1. 1/1 Fix date checking in case if time was not initialized.Mike Gorchak, Feb 25, 2013
  2. Junio C HamanoFeb 25, 2013
  3. Mike GorchakFeb 25, 2013
  4. Junio C HamanoFeb 25, 2013
  5. Mike GorchakFeb 25, 2013
  6. Junio C HamanoFeb 25, 2013
  7. Mike GorchakFeb 25, 2013
  8. Junio C HamanoFeb 25, 2013
  9. Mike GorchakFeb 26, 2013

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.