[Cvsnt] Fw: CVSNT possible DST bug

Torsten Martinsen torsten at image.dk
Thu May 2 08:38:55 BST 2002


I believe the current CVSNT may have a bug related to Daylight Savings time:

When I do

    [ edit test.txt ]
    cvs commit test.txt

and the file *contains revision markers* (e.g. $Id$), the modification time of the file is incorrectly set to be four hours in the past. My local timezone is two hours ahead of GMT, which made me suspicious. When I then inspected the code in wnt_utime(), I found this:

    UnixTimeToFileTime ( uf->actime, &fAt, TRUE);
    UnixTimeToFileTime ( uf->modtime, &fWt, TRUE);
    LocalFileTimeToFileTime ( &fAt, &At );
    LocalFileTimeToFileTime ( &fWt, &Wt );

which seems to be wrong: the time received from the server is in GMT, so the function to use must be FileTimeToLocalFileTime(), not LocalFileTimeToFileTime(). Applying this fix seems to solve the problem.

(FYI, this is all when using :pserver:).

-Torsten

_______________________________________________
Cvsnt mailing list
Cvsnt at cvsnt.org
http://www.cvsnt.org/cgi-bin/mailman/listinfo/cvsnt



More information about the cvsnt mailing list