[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 13:36:43 -0800 |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Derek Robert Price <address@hidden> writes:
> 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.
So it seems. :-)
> > >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 have a minor quibble, the timezone should be numeric -0000 rather than
the alphabetic UTC. However, I agree that a timezone indication in the
output of cvs log and friends would be reasonable.
> > >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 won't deny it.
> 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 output of 'cvs diff' at least specifies the timezeone -0000 already.
> 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.
I have many thounsands of lines of perl, gawk and C spread across
multiple companies that parse the 'cvs log' and 'cvs rlog' output and I
understand the problem of trying to machine parse such output very
clearly.
I will also state that if a change to the output of 'cvs log' and 'cvs
rlog' to add the timezeone is performed, there is likely going to need
to be a compatibility switch for the old format to allow the transition
to be chosen by the cvs administrators.
> > 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.
I've done it before... :-)
-- Mark
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (FreeBSD)
iD8DBQFAYf9r3x41pRYZE/gRAn97AKDhnp/x8Q/87zVeZYkZsD1CokwxlACfVIik
HV+i7aDtPsFIgeSRuCboO2c=
=P0bJ
-----END PGP SIGNATURE-----
- cvs log and UTC, Blaney, Liza, 2004/03/24
- Re: cvs log and UTC, Derek Robert Price, 2004/03/24
- Re: cvs log and UTC, Larry Jones, 2004/03/24
- Re: cvs log and UTC, Mark D. Baushke, 2004/03/24
- Re: cvs log and UTC, Derek Robert Price, 2004/03/24
- Re: cvs log and UTC, Derek Robert Price, 2004/03/24
- RE: cvs log and UTC, Donald Sharp \(sharpd\), 2004/03/24
- Re: cvs log and UTC, Paul Sander, 2004/03/24
- Re: cvs log and UTC, Mark D. Baushke, 2004/03/24
- Re: cvs log and UTC, Frederic Brehm, 2004/03/25