Messages in this thread | | | Date | Mon, 15 Nov 1999 12:21:34 +0100 | From | Jan Echternach <> | Subject | Re: Bug in fat-fs code: file date/time wrong |
| |
On Mon, Nov 15, 1999 at 02:19:04AM -0600, Joe Zbiciak wrote: > What I'm saying is this: The conversions that the kernel performs must > mirror exactly the conversions that user-space performs so that the
The kernel must correctly convert between file system time zone and UTC. And user mode stuff (ls, touch etc.) must correctly convert between UTC and display time zone.
> The easiest way to make up for the deficiencies in FAT is to not > use it at all (as you note). :-)
I'm using FAT (I have DOS installed on the same system), but ignore the file modification times. I don't need them. They're always wrong on my system anyway, because the CMOS clock is set to UTC, but the Linux kernel interprets the times as local time, which means that they're off by one or two hours, depending on DST.
The perfect solution requires that the kernel knows how to convert between file system time zone (which can be different for different file systems) and UTC. IMHO most of this should be handled by mount(1), controlled by a mount option for the file system time zone. The kernel gets only a simple translation table (something like 1970-01-01 - 1970-04-11: +6 hours, 1970-04-12 - 1970-09-30: +7 hours, 1970-10-01 - 1971-04-10: +6 hours etc).
The current solution is not perfect, but maybe it's already good enough.
-- Jan
- 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/
| |