[cvsnt] CVS Time Zone Bug

jchamlin at ibsys.com jchamlin at ibsys.com
Wed Jan 14 23:45:42 GMT 2004


Community technical support mailing list was retired 2010 and replaced with a professional technical support team. For assistance please contact: Pre-sales Technical support via email to sales@march-hare.com.


I've been using several versions of CVS on my two development machines (one
Win2K and one WinXP). I've been using the CVS command line tool version
1.11.5, TortoiseCVS 1.2.2 and 1.6.6, the CVS built into Eclipse 3.0M6, and
WinCVS 1.20. I've noticed a problem they all seem to have.

Eclipse 3.0M6 when checking out files correctly creates the Entires files
with a timestamp that matches that of the file on the server. It also
correctly notices which files are modified.
TortoiseCVS 1.2.2 which uses CVSNT 1.11.1.3 appears to work correctly.
TortoiseCVS 1.6.6 which uses CVSNT 2.0.11 appears to work correctly.
All others are broken (all non-CVSNT versions of CVS compiled for windows)
like the binary downloads from sourceforge, or WinCVS. They incorrectly
create the Entires file one hour less than the time on the server. Thus,
programs that work properly like Eclipse and TortiseCVS now show files as
modified which aren't.

I did some research and I bet the problem lies with this issue. It seems in
the earlier versions of NT the stat() and fstat() commands in Windows were
broken (they are supposed to return time in UTC, but they were still
adjusting for Daylight savings time). So I've read that the developers of
cvs hard-coded in a check "if on windows, and the daylight saving time is
checked, subtract an hour from the value returned by stat()". Anyway, I also
heard that Microsoft fixed the problem in NTSP3, and I bet the developers of
cvs never added in a check to remove their "fix" if sp3 was installed. So,
any version of cvs you get compiled for windows running on NTSP3 or later,
Win2K or WinXP boxes is going to be flawed.

So I tried an experiment. I turned off the "Automatically adjust clock for
daylight savings time checkbox". And here's the new behavior -- things seem
to get very interesting now.

Eclipse still works (creates Entires correctly and correctly shows which
ones are modified).

Both versions of TortoiseCVS appear to create some (but not all) of the
Entries files with the proper time, but they both fail now by reporting
files that are modified which really aren't. I think TortoiseCVS is writing
dates as "Tue Oct  9 14:03:01 2001" and CVS is writing dates as "Tues Oct 09
14:03:01 2001" (notice that Tortoise space pads and CVS 0 pads the leading
digit on the day-of-month field).

The standard non-CVSNT versions of CVS compiled for windows like the binary
downloads from sourceforge, or WinCVS now work properly (create Entires with
the right time) and report the correct files as modified -- so long as that
checkbox is off.

Hmm... frusterating. Anyone have a clue what's going on? I guess they're all
open source, I could go fix them all. ;-)

-J.C.




More information about the cvsnt mailing list
Download the latest CVSNT, TortosieCVS, WinCVS etc. for Windows 8 etc.
@CVSNT on Twitter   CVSNT on Facebook