date selectors using local time for comparison

Richard Hopkins <[email protected]>
Newsgroups gmane.comp.version-control.monotone.devel
Message-ID <[email protected]>
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).

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.

I expected the "5 minutes ago" to automatically convert it to UTC ready for comparison against the UTC value in the database.

It's also not specific to the "friendly" date selectors. Specifying in ISO 8601 format still requires me to convert to UTC before typing on command line; which is a bit confusing as "mtn log" shows me things in local time.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.