{"thread":{"id":"12815","subject":"git-cvsserver: log dates ignore timezone","startedAt":"2008-03-23T10:36:40Z","lastAt":"2008-03-23T10:36:40Z","messageCount":1,"participants":["Bruno Haible"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"72731","messageId":"200803231136.40542.bruno@clisp.org","threadId":"12815","inReplyTo":null,"subject":"git-cvsserver: log dates ignore timezone","fromName":"Bruno Haible","fromEmail":"bruno@clisp.org","sentAt":"2008-03-23T10:36:40Z","receivedAt":"2008-03-23T10:36:40Z","isPatch":false,"sender":{"key":"bruno@clisp.org","avatar":null},"body":"Hi,\n\nIn the \"cvs log\" output produced by git-cvsserver, the revision dates lack\nthe time zone, making it appear that sometimes newer commits were done at\nolder dates. For example, in the gnulib repository, \"cvs log ChangeLog\" shows:\n\n   ----------------------------\n   revision 1.2444\n   date: 2008/03/20 09:24:13;  author: Eric;  state: Exp;  lines: +2 -3\n   ...\n   ----------------------------\n   revision 1.2443\n   date: 2008/03/20 15:50:57;  author: Simon;  state: Exp;  lines: +2 -3\n   ...\n   ----------------------------\n   revision 1.2442\n   date: 2008/03/20 06:52:53;  author: Eric;  state: Exp;  lines: +2 -3\n   ...\n\n15:50:57 is not between 06:52:53 and 09:24:13.\n\nThe corresponding \"git log ChangeLog\" shows the dates with timezone:\n\n   commit 8b7bf418dde380e1d311ee68338a75182f2f4080\n   Author: Eric Blake <ebb9@byu.net>\n   Date:   Thu Mar 20 09:24:13 2008 -0600\n   ...\n   commit 216173c7d70cbd66f8791b6710cb8f8c3bf6eef9\n   Author: Simon Josefsson <simon@josefsson.org>\n   Date:   Thu Mar 20 15:50:57 2008 +0100\n   ...\n   commit 8a1a492ae9389b6b450b2f8a32550e0ddbe3957a\n   Author: Eric Blake <ebb9@byu.net>\n   Date:   Thu Mar 20 06:52:53 2008 -0600\n\nThis happens at git-cvsserver.perl line 1710:\n            $revision->{modified} = sprintf('%04d/%02d/%02d %s', $3, $DATE_LIST->{$2}, $1, $4 ) if ( $revision->{modified} =~ /(\\d+)\\s+(\\w+)\\s+(\\d+)\\s+(\\S+)/ and defined($DATE_LIST->{$2}) );\n$revision->{modified}, originally \"20 Mar 2008 09:24:13 -0600\", is\ntransformed into \"2008/03/20 09:24:13\" by this line of code.\n\nThe date format used by the original \"cvs\" server program is:\n  - cvs 1.12.9 and newer use the format \"2008-03-20 15:24:13 +0000\",\n  - older cvs versions use the format   \"2008/03/20 15:24:13\"\nI.e. in both cases it shows the date in GMT time zone.\n\nCould git-cvsserver be changed to do the same thing? I.e. instead of\n\n   ----------------------------\n   revision 1.2444\n   date: 2008/03/20 09:24:13;  author: Eric;  state: Exp;  lines: +2 -3\n   ...\n   ----------------------------\n   revision 1.2443\n   date: 2008/03/20 15:50:57;  author: Simon;  state: Exp;  lines: +2 -3\n   ...\n   ----------------------------\n   revision 1.2442\n   date: 2008/03/20 06:52:53;  author: Eric;  state: Exp;  lines: +2 -3\n   ...\n\nit should output\n\n   ----------------------------\n   revision 1.2444\n   date: 2008/03/20 15:24:13;  author: Eric;  state: Exp;  lines: +2 -3\n   ...\n   ----------------------------\n   revision 1.2443\n   date: 2008/03/20 14:50:57;  author: Simon;  state: Exp;  lines: +2 -3\n   ...\n   ----------------------------\n   revision 1.2442\n   date: 2008/03/20 12:52:53;  author: Eric;  state: Exp;  lines: +2 -3\n   ...\n\nThis would make the times grow continually, and be in line with what the\n\"cvs\" program does. As mentioned above, all that needs to be changed is\nline 1710 of git-cvsserver.perl.\n\nBruno\n\n\n[1] http://cvs.savannah.nongnu.org/viewvc/ccvs/src/log.c?root=cvs&r1=1.95&r2=1.96\n"}]}