[See the comment in cvs.texinfo (Common options) for lots more details on date formats. A couple reactions to the patch: (1) it affects only "cvs log", and it might be better to think in terms of a more comprehensive solution (for example, centralize CVS date output into a new function, which allows callers to specify the format, e.g. "short" or "long"); (2) we should not make an incompatible change like this without plenty of notice. Probably the only good way to handle the compatibility issue is to let the user choose the date format, as suggested in the cvs.texinfo comment. -kingdon, Dec 1997] Date: Sun, 14 Dec 1997 14:26:51 -0500 From: Greg Hudson To: bug-cvs@prep.ai.mit.edu Subject: Date parsing and RCS dates >Submitter-Id: net >Originator: Greg Hudson >Organization: MIT >Confidential: no >Synopsis: getdate.y doesn't understand RCS dates >Severity: non-critical >Priority: low >Category: cvs >Class: change-request >Release: cvs-1.9 >Environment: System: NetBSD the-light-fantastic 1.2 NetBSD 1.2 (LIGHT) #2: Mon Apr 7 17:36:19 EDT 1997 root@the-light-fantastic:/u1/marthag/src/sys/arch/i386/compile/LIGHT i386 >Description: cvs uses getdate.y to parse dates. getdate.y handles a whole bunch of date formats, but does not, unfortunately, understand the format used by RCS. It interprets a date like 1997/12/14 as month 1997, day 12, in year 14, and of course flags that as an error in Convert(). I'm not sure if I like the idea of fixing this problem in getdate.y, but it's very regrettable. Perhaps the right answer is to change how dates are displayed in the nifty new built-in "cvs log" command. 1997-12-14 should do fine. >How-To-Repeat: >Fix: My suggested fix is a trivial change, of course. *** log.c 1997/12/14 19:19:53 1.1 --- log.c 1997/12/14 19:20:27 1.2 *************** *** 1289,1295 **** &sec); if (year < 1900) year += 1900; ! sprintf (buf, "%04d/%02d/%02d %02d:%02d:%02d", year, mon, mday, hour, min, sec); cvs_output (buf, 0); --- 1289,1295 ---- &sec); if (year < 1900) year += 1900; ! sprintf (buf, "%04d-%02d-%02d %02d:%02d:%02d", year, mon, mday, hour, min, sec); cvs_output (buf, 0);