bug-cvs
[Top][All Lists]
Advanced

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

Weird timezone handling


From: Stepan Kasal
Subject: Weird timezone handling
Date: Fri, 7 Oct 2005 15:45:57 +0200
User-agent: Mutt/1.4.1i

Hello,
  I have tried several times to understand the timezone issues with
cvs server/client, but I always gave up.

The report below probably contains at least one bug description,
though I'm not sure which of the contradicting examples is wrong and
which is OK...

Though I discovered this during my work with "cvs log" and
"cvs diff -Ddate1 -Ddate2", it can be demonstrated with commands "rlog"
and "rdiff" against an anonymous repository.

Let's set
cvsrep="cvs -d :pserver:anoncvs@anoncvs.gnome.org:/cvs/gnome"

Below is an excerpt from the output of
        $cvsrep rlog gnumeric/ChangeLog
(If I use TZ=UTF iwith the command, the time stamps in the output are
still the same.)

----------------------------
revision 1.4094
date: 2005/09/10 16:56:50;  author: skasal;  state: Exp;  lines: +3 -0
Revert a change from 2005-08-27, it was probably a mistake.
----------------------------
revision 1.4093
date: 2005/09/10 16:12:41;  author: skasal;  state: Exp;  lines: +1 -1
typo
----------------------------
revision 1.4092
date: 2005/09/10 12:00:14;  author: skasal;  state: Exp;  lines: +8 -0
Add go_shell_argv_to_glib_encoding_free.
----------------------------

1)============
If I run
TZ=UTF $cvsrep rdiff -D2005-09-10" "{12:01,16:30} gnumeric/ChangeLog

the output starts with:

Index: gnumeric/ChangeLog
diff -u gnumeric/ChangeLog:1.4092 gnumeric/ChangeLog:1.4093
--- gnumeric/ChangeLog:1.4092   Sat Sep 10 08:00:14 2005
+++ gnumeric/ChangeLog  Sat Sep 10 12:12:41 2005

This is almost correct, only the dates printed are shifted by 4 hours.

With
         TZ=UTF cvs di -D2005-09-10" "{12:01,16:30} ChangeLog

in my checked out directory (a non-public read-write repository), I get

diff -u -r1.4092 -r1.4093
--- ChangeLog   10 Sep 2005 12:00:14 -0000      1.4092
+++ ChangeLog   10 Sep 2005 16:12:41 -0000      1.4093

which is exactly what I expect.

2)============
When I use the same commands with TZ=CEST (which is my timezorne, +0200),
ie.:
TZ=CEST $cvsrep rdiff -D2005-09-10" "{14:01,18:30} gnumeric/ChangeLog
and TZ=CEST cvs di -D2005-09-10" "{14:01,18:30} ChangeLog

I get the following results:

diff -u gnumeric/ChangeLog:1.4092 gnumeric/ChangeLog:1.4094
--- gnumeric/ChangeLog:1.4092   Sat Sep 10 08:00:14 2005
+++ gnumeric/ChangeLog  Sat Sep 10 12:56:50 2005

diff -u -r1.4092 -r1.4094
--- ChangeLog   10 Sep 2005 12:00:14 -0000      1.4092
+++ ChangeLog   10 Sep 2005 16:56:50 -0000      1.4094

With $cvsrep and in my checked out tree, respectively.
This is not the change which I expected, because the interval given was the
same as in my previous example.

3)============
If I omit the TZ setting altogether, the result changes again, though it
should be identical to TZ=CEST (at least).
ie.:
$cvsrep rdiff -D2005-09-10" "{14:01,18:30} gnumeric/ChangeLog
and   cvs di -D2005-09-10" "{14:01,18:30} ChangeLog

then the output is identical to the results in 1).
This means that my command was interpreted correctly.

=================
$ cvs ver
Client: Concurrent Versions System (CVS) 1.11.20 (client/server)
Server: Concurrent Versions System (CVS) 1.11.2 (client/server)


Summary:
I'm afraid this is a bit confused.  I think there are several questions:

Why the command line is not interpreted correctly in case 2)?

Why the "rdiff" output uses dates like "Sat Sep 10 08:00:14 2005", which
is probably in -0400 (the timezone of the server?), while "diff" uses
always UTC (-0000)?

Why cannot the output use the client's time zone, in all cases?
(Perhaps including the output of "cvs log".)

Is there a documentation which would explain this dark issue to me?

Thank you for any help,
        Stepan Kasal




reply via email to

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