Article View: comp.os.linux.development.system
Article #24A whacky DATE bug in Linux - SOLVED!
From: Ron House
Date: Mon, 28 Sep 1998 00:00
Date: Mon, 28 Sep 1998 00:00
29 lines
2492 bytes
2492 bytes
Thanks to all the kind people who volunteered their suggestions to help me with this problem. I have now found the solution. It was Doug Moir who put me onto the right answer with this suggeestion: >There is a bug in the program clock(8) (often found in /sbin)----- it >miscounts a timezone offset and confuses seconds with minutes or some >such.------- get a new version of the clock program. I wanted to find out whether this was the problem. Luckily, Harald Hoffmann told me how to set and inquire about the kernel's internal variable, sys_tz: >sys_tz can be set with settimeofday(). >Try this C program: Harald's program didn't quite work, but the failure of the clock program to set sys_tz was indeed the cause, as gettimeofday() reported the timezone offset as 0. I devised a program based on Harald's to apply a -10 hour correction (as Australia is east of Grenwich). Anyone with this problem west of there should apply a positive correction. Unfortunately I seem to have failed to copy the directory with the program, so I'll post it tomorrow. -- Ron House house@usq.edu.au You can only be right if you have the courage to be wrong.
Technical Details
Message-ID:
<360F010E.70255666@usq.edu.au>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<3601D4F7.247C8BC2@usq.edu.au> <3607ABBA.1952C377@uq.net.au> <36087C67.3313582C@usq.edu.au> <360bc2f5.0@198.161.96.27>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f5392,12de531511895886 X-Google-Attributes: gidf5392,public X-Google-Thread: 10c696,12de531511895886 X-Google-Attributes: gid10c696,public X-Google-Thread: faa64,12de531511895886 X-Google-Attributes: gidfaa64,public X-Google-Thread: 100c5f,12de531511895886 X-Google-Attributes: gid100c5f,public X-Google-Thread: f9382,12de531511895886 X-Google-Attributes: gidf9382,public X-Google-Thread: ff9be,12de531511895886 X-Google-Attributes: gidff9be,public X-Google-Thread: f9b51,12de531511895886 X-Google-Attributes: gidf9b51,public X-Google-Thread: 102983,12de531511895886 X-Google-Attributes: gid102983,public From: Ron House <house@usq.edu.au> Subject: A whacky DATE bug in Linux - SOLVED! Date: 1998/09/28 Message-ID: <360F010E.70255666@usq.edu.au> X-Deja-AN: 395488823 Content-Transfer-Encoding: 7bit References: <3601D4F7.247C8BC2@usq.edu.au> <3607ABBA.1952C377@uq.net.au> <36087C67.3313582C@usq.edu.au> <360bc2f5.0@198.161.96.27> Content-Type: text/plain; charset=us-ascii Organization: University of Southern Queensland Mime-Version: 1.0 Newsgroups: comp.os.linux.development.system,comp.os.linux.development.apps,comp.os.linux.setup,alt.linux,alt.os.linux,comp.os.linux,comp.os.linux.questions,aus.computers.linux