Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

The date range specified by --since and --until seems not work,

$ git log --format="%cd %h" --since="2009-11-20 10:25:59" --until="2009-12-25 00:00:00" --date=iso .
2009-12-23 00:07:24 +0000 fa2261b
2009-12-23 00:07:20 +0000 0fe0295
2009-12-22 22:47:52 +0000 33e516c
2009-12-22 22:47:48 +0000 a5ed271
2009-12-22 15:28:35 +0000 eae904e
2009-12-21 05:05:32 +0000 874436f

$ git log --format="%cd %h" --since="2009-11-20 10:26:00" --until="2009-12-25 00:00:00" --date=iso .
(Empty output)

$ git log --format="%cd %h" --since="2009-12-21" --until="2009-12-24" --date=iso .
(Empty output)

I'm not sure I have typed the correct date literal, in git-log(1) it's said:

   --since=<date>, --after=<date>
       Show commits more recent than a specific date.

   --until=<date>, --before=<date>
       Show commits older than a specific date.

But it doesn't mention the syntax of <date>.

share|improve this question

You include "--date=iso" parameters, so you're probably using ISO 8601 standard date format -- the information you need on the ISO 8601 date format is available here:

  ISO 8601 - Numeric representation of dates and time
  http://www.iso.org/iso/support/faqs/faqs_widely_used_standards/widely_used_standards_other/date_and_time_format.htm

As per "YYYY-MM-DDThh:mm:ss" I think you just need to use the letter "T" between the date and time instead of a space.

But, there are some people who think that delimiters have to be removed, so you can also try removing the dashes (in dates) and colons (where times are also provided).

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .