monotone-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Monotone-devel] date selectors using local time for comparison


From: Stephen Leake
Subject: Re: [Monotone-devel] date selectors using local time for comparison
Date: Mon, 08 Oct 2012 20:22:03 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (windows-nt)

Richard Hopkins <address@hidden> writes:

> I've run into an issue recently using the date selectors, try this
>
> $ mtn db init --db=test.db
> $ echo hello > test.txt
> $ mtn add test.txt
> $ mtn commit
> $ mtn log -r"l:5 minutes ago"
>
> I would expect to see revision I've just committed, however, nothing
> will be matched. The database shows the dates being in UTC (using
> sqlite3).

That's bad; the user input time should be converted to UTC before being
compared. I thought it was, back when this was added.

> Changing the query to
>
> $ mtn log -r"l:65 minutes ago"
>
> returns the commit because in the UK we are currently 1 hour ahead of UTC.
>
> What I'm confused about though is that adding the "5 minutes ago" test
> to "check_later_and_earlier_selectors" returns the correct revisions;
> in a separate terminal it returns nothing.

Hm. The tests must set some env variable so all times are UTC; that
would be required for consistency, with testers in several time zones.
But we should have at least one test that sets a different time zone, to
test stuff like this.

-- 
-- Stephe



reply via email to

[Prev in Thread] Current Thread [Next in Thread]