git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Narebski <jnareb@gmail.com>
To: "Rhodes, Kate" <masukomi@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: ambiguous git-log date and timestamp syntax
Date: Sat, 01 Mar 2008 09:10:39 -0800 (PST)	[thread overview]
Message-ID: <m3d4qejroy.fsf@localhost.localdomain> (raw)
In-Reply-To: <715587AA-D485-4B31-A786-D26334506007@gmail.com>

"Rhodes, Kate" <masukomi@gmail.com> writes:

> The docs are a little vague on exactly what your options are when
> specifying dates. If someone can provide me some details on this I'll
> make a patch for the docs.
> 
> --since=date, --after=date
> 	Show commits more recent than a specific date.
> --until=date, --before=date
> 	Show commits older than a specific date.

Those are porcelain (meant for user) options.

> --max-age=timestamp, --min-age=timestamp
> 	Limit the commits output to specified time range.

Those are plumbing (meant for scripts) options.

For example git-rev-parse translates --since into --max-age, etc.

> From what I can tell it seems that dates can be specified relatively,
> e.g. "2 hours ago", or with any ISO 8601 or RFC 2822 date syntax. Is
> this correct, and are there any docs on specifying relative dates?

I don't know why git doesn't use getdate_r for this, instead rolling
out its own date parsing routines: approxidate*, parse_date. From what
I remember it should accept any date "date" (from coreutils) accepts,
but it does (from comments) for date to be in "C" locale.

So I'm sorry, but I cannot help you here...

> I can't find any details on what the "timestamp" format should be. Can
> someone point me in the right direction?

Timestamp is Unix date (epoch), i.e. number of seconds since
1970-01-01 00:00:00 UTC, the format git uses for dates in commit and
tag objects.
 
> -Kate == masukomi
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

-- 
Jakub Narebski
Poland
ShadeHawk on #git

  reply	other threads:[~2008-03-01 17:11 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-01 16:15 ambiguous git-log date and timestamp syntax Rhodes, Kate
2008-03-01 17:10 ` Jakub Narebski [this message]
2008-03-01 21:46   ` Linus Torvalds
2008-03-01 22:26     ` Jakub Narebski
2008-03-02  2:44       ` Johannes Schindelin
2008-03-02  9:40         ` Jakub Narebski
2008-03-02 14:40           ` Johannes Schindelin
2008-03-02  7:09       ` Florian Weimer
2008-03-02 14:11 ` [PATCH] Documentation: Remove --{min,max}-age option from git-log(1) Jakub Narebski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3d4qejroy.fsf@localhost.localdomain \
    --to=jnareb@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=masukomi@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).