info-cvs
[Top][All Lists]
Advanced

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

Re: cvs log and UTC


From: Derek Robert Price
Subject: Re: cvs log and UTC
Date: Wed, 24 Mar 2004 16:19:43 -0500
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030624 Netscape/7.1

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Mark D. Baushke wrote:

> Blaney, Liza <address@hidden> writes:
>
> >I have been asked to "fix" this by my boss:
>
> Summary: It is not a bug and does not need to be fixed.
> (See also the advice for engineers to a PHB via the Dilbert.com site.)


This is debatable.

> >cvs log returns the timestamp of the file in Coordinated Univeral
> >Time.
>
> This is correct.
>
> >All other ways of looking at the timestamp return it in local time.
>
> I believe you to be mistaken. Could you please cite examples? I do not
> believe that cvs will ever OUTPUT time in localtime. If it does, it is
> probably a bug.
>
> Had you said that by default you are able to ENTER a timestamp for
> checkout (the -D switch) in localtime, then I would have to agree with
> you. Data entry will also accept '2004/03/22 21:11:06 UTC' as a
> datestamp and mean UTC instead of localtime.


This is what I definately consider a bug, or at least a serious
usability issue: when the time string output by `cvs log' is copied and
pasted into the argument for -D from any other command, it is
interpreted as localtime.  At the least, `cvs log' output should be
changed to contain the "UTC" string.

> I believe you will find that 'cvs log', 'cvs rlog', 'cvs diff',
> 'cvs rdiff', 'cvs annotate', 'cvs rannotate' are all using times and
> dates generated from the UTC representation of the change.


Yep.

> >Is there any quick, elegant way to get cvs log to display the date in
> >local time? (I think I know the answer.) Thanks.
>
> <PHB-workaround>
> Sure thing...
>
> Have your boss add the following line to his .profile
>
>      TZ=GMT; export TZ
>
> or the following line to his .cshrc
>
>      setenv TZ GMT
>
> and he will find that the output of cvs log will have dates very similar
> to the 'date' command he issues. Of course, this may not work in a
> Windows environment, but I am sure you get the idea.
>
> Or, you can teach your boss the 'date -u' command.
> </PHB-workaround>


Mark, I think you just proved a point in favor of changing the log time
output to localtime.  This is that most commands with output intended to
be read by humands will output time dependent on the value of TZ, and
CVS should follow this lead when its output is intended primarily to be
read by humans.  I would argue that annotate fits this category (and
rlog, of course), but diff and rdiff, by virtue of their output beign
mainly designed to be machine parsable and their format being defined
elsewhere, should not honor TZ.  The `cvs log' output is definately not
designed to be machine parsable, as you would likely know if you have
ever tried to parse it.

> In all seriousness, you should ask your boss if he really wants to
> confuse folks who need to use your cvs repository about what time
> a change was made by having it appear differently depending on the
> machine in the network they happened to be logged into at the time.
>
> I regularly login to machines in UTC-0800 UTC-0500 and UTC+0530 and it
> is even more exciting when some of those machines automagically switch
> to UTC-0700 UTC-0400 during daylight savings time. I expect the output
> to be the same regardless of the window in which I happen to type a
> 'cvs log' command. The only way to deal with world-wide development
> teams is to have a single time standard used for the important stuff
> and UTC is just the standard to use for cvs.


And you should set your TZ environment variable to "GMT" or "UTC" on all
these systems after this bug is fixed if that is what you really want to
see.

Derek
- --
                *8^)

Email: address@hidden

Get CVS support at <http://ximbiot.com>!
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
Comment: Using GnuPG with Netscape - http://enigmail.mozdev.org

iD8DBQFAYftuLD1OTBfyMaQRAjWyAJ4/GZyKrtIrZkCy/MVPmqBENc+8kACgvpf7
Gjhsu59iDFNqVqi/2j0ENLU=
=HBb9
-----END PGP SIGNATURE-----






reply via email to

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