Missing from pre-6: NCPfs DST-patch

Troels Arvin (rhl@www.studmed.ku.dk)
Fri, 15 Aug 1997 04:39:22 +0200


Missing from 2.0.31-pre6 is a patch which corrects a NCPfs bug related to
daylight-saving-hours.

The patch appeared on http://www.linuxhq.com/patch/20-p0375.html on April
8. I have heard about no problems with the patch.

----------------------------------------------------------------------------
-------
--- linux/fs/ncpfs/dir.c.original Sat Nov 30 11:21:21 1996
+++ linux/fs/ncpfs/dir.c Fri Apr 4 18:51:46 1997
@@ -1228,13 +1228,13 @@
static int
utc2local(int time)
{
- return time - sys_tz.tz_minuteswest*60;
+ return time - sys_tz.tz_minuteswest*60 + sys_tz.tz_dsttime*3600;
}

static int
local2utc(int time)
{
- return time + sys_tz.tz_minuteswest*60;
+ return time + sys_tz.tz_minuteswest*60 - sys_tz.tz_dsttime*3600;
}

/* Convert a MS-DOS time/date pair to a UNIX date (seconds since 1 1 70). */
----------------------------------------------------------------------------
-------

The patch seems to work well with pre6.

Greetings from Troels Arvin, Copenhagen, Denmark
http://www.mdb.ku.dk/tarvin/