Re: clock -w writes bogus date
Bill Wohler writes:
-> Package: util-linux
-> Version: 2.5-5
->
-> "clock -w" is screwing up the CMOS clock. See:
->
-> # cat /etc/timezone
-> US/Pacific
-> # clock -r
-> Wed Aug 28 00:52:27 1996
-> # date
-> Wed Aug 28 00:51:54 PDT 1996
-> # clock -w
-> # clock -r
-> Mon Aug 11 00:07:58 2031
-> # clock -wu
-> Segmentation fault (core dumped)
-> # clock -r
-> <hangs: goes into tight loop>
->
-> Is there anything here I'm missing (e.g., related
-> programs/packages/settings)? The segmentation violation and hanging
-> of clock -r is worth a bug report to be sure, but could the -w
-> failure be a mis-configuration of the timezone or Universal time on
-> my part? I had answered "no" to the Universal time question at
-> install (due to !@#$# DOS). I just ran tzconfig to change
-> /etc/timezone from Factory to US/Pacific thinking that was my
-> problem.
->
This appears to be a bug in clock from util-linux. Using "clock" from
this package with the Real time clock enabled in the kernel will cause
a segfault. I ran into this same problem, and worked around it by
building a hernel with the RTC disabled. Hadn't gotten around to
submitting a bug report yet. The workarounds seem to be:
1) set the system clock to UTC.
2) downgrade util-linux, or
3) build a kernel with the RTC disabled
-Larry
--
Larry Daffner | Linux: Unleash the workstation in your PC!
vizzie@airmail.net / http://web2.airmail.net/vizzie/
Whenever you find yourself on the side of the majority, it is time to
pause and reflect." - Mark Twain
Reply to: