timestamps on iso9660 filesystem

Cezary Sliwa (sliwa@orange.cft.edu.pl)
Mon, 23 Nov 1998 17:29:44 +0100 (CET)


It seems to me that the Linux kernel code for timestamps on iso9660
needs a minor fix. The daylight savings offset is incorrectly
taken into account, while this already included (?) in the timezone
code as read from the directory entry. While I am not sure
if it is compatible with other software to rely on the timezone code,
there is no doubt that it is the reasonable way to represent time.

--- linux/fs/isofs/util.c.orig Mon Nov 23 17:27:55 1998
+++ linux/fs/isofs/util.c Mon Nov 23 17:28:03 1998
@@ -126,8 +126,6 @@
days += day - 1;
crtime = ((((days * 24) + hour) * 60 + minute) * 60)
+ second;
- if (sys_tz.tz_dsttime)
- crtime -= 3600;

--- linux-2.0.36/fs/isofs/util.c.orig Mon Nov 23 17:23:34 1998
+++ linux-2.0.36/fs/isofs/util.c Mon Nov 23 17:23:49 1998
@@ -119,8 +119,6 @@
days += day - 1;
crtime = ((((days * 24) + hour) * 60 + minute) * 60)
+ second;
- if (sys_tz.tz_dsttime)
- crtime -= 3600;

/* sign extend */
if (tz & 0x80)
@@ -128,7 +126,7 @@

/* timezone offset is unreliable on some disks */
if (-48 <= tz && tz <= 52)
- crtime += tz * 15 * 60;
+ crtime -= tz * 15 * 60;
}
return crtime;
}

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/