[Top][All Lists]

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

Re: cvs log and UTC

From: Mark D. Baushke
Subject: Re: cvs log and UTC
Date: Wed, 24 Mar 2004 12:58:06 -0800

Hash: SHA1

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 site.)

> 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.

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.

> Is there any quick, elegant way to get cvs log to display the date in
> local time? (I think I know the answer.) Thanks.

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.

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.

        -- Mark
Version: GnuPG v1.2.3 (FreeBSD)


reply via email to

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