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

Re: [PATCH] parse_date(): fix parsing 03/10/2006

From
AMAndrew Morton <akpm@osdl.org>
Date
Apr 5, 2006, 06:16 UTC
Message-ID
<20060404231606.219a4cc5.akpm@osdl.org>
In-Reply-To
<7vodzg4l5n.fsf@assigned-by-dhcp.cox.net>
Junio C Hamano <junkio@cox.net> wrote:
Show 12 quoted lines
>
> The comment associated with the date parsing code for three
>  numbers separated with slashes or dashes implied we wanted to
>  interpret using this order:
> 
>  	yyyy-mm-dd
>  	yyyy-dd-mm
>  	mm-dd-yy
>  	dd-mm-yy
> 
>  However, the actual code had the last two wrong, and making it
>  prefer dd-mm-yy format over mm-dd-yy.

But there was a second problem. Once the parsing had misbehaved, Len managed to create a commit which was six months in the future:

commit 8313524a0d466f451a62709aaedf988d8257b21c
Author: Bob Moore <robert.moore@intel.com>
Date:   Tue Oct 3 00:00:00 2006 -0400
    ACPI: ACPICA 20060310

Will your fix prevent that from happening? If not, perhaps some basic sanity checking might be appropriate.

Previous: Junio C HamanoNext: Junio C Hamano
Message 2 of 8 in “parse_date(): fix parsing 03/10/2006”
  1. parse_date(): fix parsing 03/10/2006Junio C Hamano, Apr 5, 2006
  2. Andrew MortonApr 5, 2006
  3. Junio C HamanoApr 5, 2006
  4. Andrew MortonApr 5, 2006
  5. date parsing: be friendlier to our European friends.Junio C Hamano, Apr 5, 2006
  6. Sam RavnborgApr 5, 2006
  7. Junio C HamanoApr 5, 2006
  8. David WoodhouseJul 14, 2006

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.