Messages in this thread | | | From | "Petr Vandrovec Ing. VTEI" <> | Date | Tue, 24 Nov 1998 17:28:21 MET-1 | Subject | Re: kernel knowledge of localtime (user-level implememntation) |
| |
A sun wrotes something like that: > ... set tz_zone to 0 and tz_west to correct value. Then inform kernel > ... when value changes
Unfortunately, it is much more complicated than it looks. Filesystem have to deal with every possible timestamp from past - for example filesystem (ncpfs) has to know whether at "Apr 4, 1981" was DST active or not. And even worse, this is NOT local time, but local time of destination system. During testing of ncpfs over UDP I tested it in configuration where Linux ran in U.K. and Netware here in Czech Republic. We are GMT+0100, but U.K. is GMT+0000, so every file was marked one hour in future (or 2 when DST). This simple example means that: a) every network protocol (and every filesystem) which stores timestamps in localtime is broken b) if you want to do it correctly, you must implement complete DST and timezone code from libc into kernel c) unfortunately, you must be able to set DST & TZONE per mountpoint, not globally per kernel b2) or you can declare that filesystem stores date/time in GMT and that every client expecting localtime is broken... Unfortunately, in ncpfs you have to patch NetWare server because of date for "create" is taken from server clock (you can disable DST & TZONE on server :-) ), not from client request.
Implementation of steps (b+c) welcomed on my @email. Timeframe is next DST change, which is around March 27th, 1999 for me :-) Best regards, Petr Vandrovec vandrove@vc.cvut.cz P.S.: TZ code does not cause major problems for me - I have my mirror stored on NetWare and exported through ncpfs. There is only one problem, files mirrored when DST active are remirrored after DST ends because of "remote file is 1 hour newer than local copy, regetting" :-( And during summer it produces harmless message "remote file is 1 hour older than local copy!" :-(
- 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/
| |