Hello all,

I'm trying to do some light scripting around fossil diff / timeline, am a bit
confused by the behavior w/r/t time after reading the docs and seeing the
results of running some fossil cli commands, and I am hoping someone can point
me in the right direction.

My machine is configured to use the Eastern time zone, and if I run date with
and without utc, get the following.

$ date
Tue Dec  8 21:48:09 EST 2015
$ date --utc
Wed Dec  9 02:48:11 UTC 2015

Fossil is configured to use UTC (and has always been).

Running `fossil timeline` in my open checkout seconds after the above date
commands gives me the following (commit log messages redacted and the stream
truncated for brevity):

=== 2015-12-08 ===
13:53:53 [dad60bfa88]
13:24:09 [c2e12eff6c]
04:34:25 [86ec92ae71]
03:58:42 [82fd33b6d8]
=== 2015-12-07 ===
23:00:48 [4eda9a323d]
14:41:36 [931c310d4f]
03:53:00 [e26c9939bf]
02:22:37 [1aeb8fb31e]
...

These times are definitely being displayed in UTC, as expected.

Based on the docs here:

http://www.fossil-scm.org/index.html/doc/trunk/www/checkin_names.wiki

I would assume that if I were to run `fossil timeline 2015-12-08`, that I would
get 4eda9a323d as the first commit (that is, the last commit on 2015-12-07, or,
according to that page the "most recent check-in that occurs no later than the
timestamp given").  Instead I get this:

=== 2015-12-08 ===
04:34:25 [86ec92ae71]
03:58:42 [82fd33b6d8]
=== 2015-12-07 ===
23:00:48 [4eda9a323d]
14:41:36 [931c310d4f]
03:53:00 [e26c9939bf]
02:22:37 [1aeb8fb31e]
...

Which looks suspiciously as though it were interpreting the command line
argument as EST rather than UTC and converting it before filtering.

I get the same output if running `fossil timeline 2015-12-08T00:00:00Z` and the
same if I run without the Z.

I'm seeing the same behavior with the diff command as well (as far as I can
tell by reverse-engineering which changes were in which commits).

The output of `fossil version` gives:

This is fossil version 1.34 [62dcb00e68] 2015-11-02 17:35:44 UTC

Can anyone help me understand whether this is a bug in my understanding, a bug
in fossil, or something else?

Let me know if there is more information I can provide as well.

Many thanks!

Cheers,

Edmund
_______________________________________________
fossil-users mailing list
[email protected]
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

Reply via email to