Improved date support

Matt Mackall mpm at selenic.com
Wed Dec 13 03:16:22 UTC 2006


On Tue, Dec 12, 2006 at 09:04:58PM -0600, TK Soh wrote:
> On 12/6/06, Matt Mackall <mpm at selenic.com> wrote:
> >The date handling support in tip has been greatly improved. Commands
> >that take dates can now handle things like:
> >
> >  Dec 12       (this year)
> >  3:30pm       (today)
> >  5/1/99       (May 1 1999)
> >  1999-5-1     (same)
> >
> >The log, update, and revert commands now accept a date option. For
> >log, this specifies a date range like so:
> >
> >  <Dec 12      (before December 12th, inclusive)
> >  >3:30pm      (after 15:30 local time)
> >  May 5 to Jun 2
> >  2005         (only changes in 2005)
> >  -5           (in the last five days)
> >  Dec 8        (everything on December 8th)
> 
> Is the date UTC? I tried on the latest crew and got this:

No. It's localtime unless you add a timezone. "hg help dates" is a
little clearer about this than my message. Dec 12 in SGT runs from
Dec 11 16:00 UTC to Dec 12 16:00 UTC

> % hg log -d "Dec 12"
> date:        Tue Dec 12 11:39:05 2006 +0100

Dec 12 10:39 UTC

> date:        Mon Dec 11 16:40:42 2006 -0800

Dec 12 04:40 UTC

> date:        Mon Dec 11 16:32:45 2006 -0800

Dec 12 04:32 UTC

> date:        Mon Dec 11 18:09:52 2006 +0100

Dec 11 17:09 UTC

All looks good.

-- 
Mathematics is the supreme nostalgia of our time.



More information about the Mercurial-devel mailing list