Roger Oberholtzer wrote:
On Sat, 2011-07-16 at 10:22 +0200, Per Jessen wrote:
Carlos explained this issue very well. Now you need to examine why your system clock is off by two(?) hours when it is started. (Two hours discrepancy is not an inaccuracy, it is a clock that has been wrongly set).
The two hours is because the hardware clock is set to UTC time. That is two hours from local time in Sweden. So one question I have that I have not brought up (isn't the current question enough to keep us busy? :) ) is why when ntp fails does the system seem to ignore the system timezone?
ntp isn't concerned about timezones - timezones are really for interaction with humans only. Let ntp keep the time in UTC, then you (or your systems) apply your local timezone whenever you need to work with the time.
I have been assuming that the system does in fact set the time according to the timezone (in the hwclock startup script).
I'm not sure, but I don't think so. There's probably someone here who understands hwclock better than I do.
Then, when the ntp startup script is run, it does it's own thing which involves setting the time back to the hardware time, expecting to correct it when a time server is found. As no time server is found, step one of the ntp startup process is all that happens, leaving the time in the original hardware state.
The ntp init-script does essentially two things: 1) sets time when available 2) start ntp - will exit if time is not sane.
Once again, the difference between the hardware clock and local time is because the hardware clock is in UTC time. It is not really wrong. I would have thought that was the preferred method on Linux. Things like daylight savings time switching only happen if the hardware clock is in UTC time.
Right. Your system sounds like it is running exactly like mine. Where exactly do you see the wrong time? And what is the wrong time, i.e. why is it wrong? -- Per Jessen, Zürich (15.7°C) -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org