bug-cvs
[Top][All Lists]
Advanced

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

Re: Weird characters in cvs log output


From: Mark D. Baushke
Subject: Re: Weird characters in cvs log output
Date: Fri, 09 Jul 2004 08:15:30 -0700

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

Hi Georg,

Georg Bischof <address@hidden> writes:

> when I work with different WIN Clients I get weird characters when
> checking the history
> cvs log <file>
> �-02 14:11:45 +0000;  author: xxxxxx;  state: Exp;
> 
> Thats leads to problem with Clients like WinCVS or tortiose so that
> they could not determine the Date correct.
> The same on a UNIX System displays everything correct.
> cvs Server  1.12.9 on debian/sarge
> 
> Any Hint?

As of cvs 1.12.9, the server will be printing the 'cvs log' time in
ISO 8601 format like this:

  date: 2004-07-09 14:32:53 +0000;  author: mdb;  state: Exp;

or (if the client supports display in local time) this:

  date: 2004-07-09 07:32:53 -0700;  author: mdb;  state: Exp;

(if you happen to be in the UTC=0700 timezone)
instead of the older format which would look like this:

  date: 2004/07/09 14:32:53;  author: mdb;  state: Exp;

Hmmm... There may be a bug in cvs 1.12.9 in that it will never actually
use a timezone other than UTC right now. A possible (untested) patch is
given after my .signature for this to hopefully make the code match the
comments... Derek? Is this what you intended the code to do?

I know that CVSNT-2.0.46 (released 2004-06-26) does not yet support
conversion of "date" tagged "MT" data to localtime, so I would have
expected the clients to just display the string without messing with the
format.

        -- Mark

ChangeLog:

2004-07-09  Mark D. Baushke  <address@hidden>

        * main.c (format_time_t): Use localtime() instead of gmtime() to
        display log time in a non-UTC (+0000) format to match source 
        comment.

Index: main.c
===================================================================
RCS file: /cvs/ccvs/src/main.c,v
retrieving revision 1.212
diff -u -p -r1.212 main.c
- --- main.c    29 May 2004 05:20:01 -0000      1.212
+++ main.c      9 Jul 2004 15:08:12 -0000
@@ -1219,7 +1219,7 @@ format_time_t (time_t unixtime)
 {
     static char buf[sizeof ("yyyy-mm-dd HH:MM:SS -HHMM")];
     /* Convert to a time in the local time zone.  */
- -    struct tm ltm = *(gmtime (&unixtime));
+    struct tm ltm = *(localtime (&unixtime));
 
     if (my_strftime (buf, sizeof (buf), "%Y-%m-%d %H:%M:%S %z", &ltm) == 0)
        return NULL;
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (FreeBSD)

iD8DBQFA7raS3x41pRYZE/gRAjxOAJ4z6uMExGHwSEp84n3yAAtcKYee6QCg4eEc
FLdaYb2oAe6OiPuo+KmcHBk=
=iKVI
-----END PGP SIGNATURE-----




reply via email to

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