Path: utzoo!attcan!uunet!mcvax!hp4nl!mhres!jv From: jv@mhres.mh.nl (Johan Vromans) Newsgroups: comp.sources.bugs Subject: Flame: Problem with zoo: restoring times Message-ID: <2884@mhres.mh.nl> Date: 15 Feb 89 20:36:11 GMT References: <2880@mhres.mh.nl> <5698@bsu-cs.UUCP> Organization: Multihouse N.V., The Netherlands Lines: 37 In article <5698@bsu-cs.UUCP> dhesi@bsu-cs.UUCP (Rahul Dhesi) writes: >The code that stores the timezone into the archive is in function >newdir() in file zooadd2.c: > > long gettz(); > direntry->tz = (uchar) (gettz() / (15 * 60)); /* seconds => 15-min units */ > >The gettz() function, found in bsd.c and sysv.c, must return the >timezone, in seconds west of GMT, as a long value. The above code >scales this value to to 15-minute units, casts the result to unsigned ^^^^^^^^ >char (which is typedef'd as uchar), and assigns it to direntry->tz. Flame On! Did you ever notice that the world does not stop at Greenwich? In other words: how about timezones that are EAST of GMT? WET = Western European Time equal to GMT MET = Middle European Time is GMT + 1 hour EET = Eastern European Time is GMT + 2 hours Another Flame On! Why do you adjust file times according to timezones? A file created at 12:00 GMT will have its time stamped 12:00 GMT whatever timezone it was created, archived or extracted. File times are stored internally relative to GMT. When stored this way, they should be retrieved this way. No need to change it. Both Flames Off! Apart from this problem, zoo appears to be a good program. -- Johan Vromans jv@mh.nl via european backbone (mcvax) Multihouse [A-Za-z ]* [NB]V uucp: ..!mcvax!mh.nl!jv Gouda - The Netherlands phone: +31 1820 62944