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

[PATCH 0/2] approxidate and future ISO-like times

From
Jeff King <peff@peff.net>
Date
Nov 13, 2014, 11:03 UTC
Message-ID
<20141113110325.GD8329@peff.net>
In-Reply-To
<20141113093606.GC8329@peff.net>
On Thu, Nov 13, 2014 at 04:36:06AM -0500, Jeff King wrote:
Show 22 quoted lines
> On Thu, Nov 13, 2014 at 11:27:06AM +1100, Colin Smith wrote:
> 
> > Apologies if this has already been raised or PEBCAK, but I've noticed
> > a bug where git log with certain date ranges breaks things. It appears
> > to be any --since date with a --until date in the future between
> > 2014-12-01 and 2014-12-09. Dates from 2014-12-10 appear to work, and
> > so does the date 2015-12-01.
> 
> Ugh. Approxidate strikes again:
> 
>   for i in 2014-11-01 2013-12-01 2014-12-01; do
>     ./test-date approxidate $i
>   done
> 
> produces:
> 
>   2014-11-01 -> 2014-11-01 09:35:19 +0000
>   2013-12-01 -> 2013-12-01 09:35:19 +0000
>   2014-12-01 -> 2014-01-12 09:35:19 +0000
> 
> The first two are right, but the fourth one is not.  It's probably
> something simple and stupid.

Less simple and stupid than I thought, but I think I have a fix. It is not about December specifically, but about the date being in the future. The first patch is a cleanup to help us more accurately test the bug; the interesting bits are in the second one.

  [1/2]: pass TIME_DATE_NOW to approxidate future-check
  [2/2]: approxidate: allow ISO-like dates far in the future
-Peff
Previous: Jeff KingNext: Jeff King
Message 3 of 11 in “Bug: git log showing nothing when using --since and --until flags with specific dates”
  1. Colin SmithNov 13, 2014
  2. Jeff KingNov 13, 2014
  3. 0/2 approxidate and future ISO-like timesJeff King, Nov 13, 2014
  4. 1/2 pass TIME_DATE_NOW to approxidate future-checkJeff King, Nov 13, 2014
  5. 2/2 approxidate: allow ISO-like dates far in the futureJeff King, Nov 13, 2014
  6. Junio C HamanoNov 13, 2014
  7. Jeff KingNov 13, 2014
  8. Jeff KingNov 13, 2014
  9. Junio C HamanoNov 13, 2014
  10. Jeff KingNov 14, 2014
  11. Junio C HamanoNov 14, 2014

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.