View previous topic :: View next topic |
Author |
Message |
ayeyes Tux's lil' helper
Joined: 03 Dec 2017 Posts: 104
|
Posted: Fri Mar 30, 2018 5:01 am Post subject: Hardware clock not updated. Two hours behind. |
|
|
Running Chrony, and my system time is correct at boot, but my hardware clock is two hours behind.
I have deleted hwclock from the default runlevel, and it isn't started by any other.
In my hwclock I have
Code: | clock_hctosys="NO"
clock_systohc="YES" |
Got this in my kernel:
Code: | Device Drivers --->
[*] Real Time Clock --->
[*] Set system time from RTC on startup and resume
(rtc0) RTC used to set the system time
[*] Set the RTC time based on NTP synchronization
(rtc0) RTC used to synchronize NTP adjustment
[*] /sys/class/rtc/rtcN (sysfs)
[*] /proc/driver/rtc (procfs for rtc0)
[*] /dev/rtcN (character devices)
<*> PC-style 'CMOS' |
hwclock --verbose
Code: | hwclock from util-linux 2.32
System Time: 1522385689.630061
Trying to open: /dev/rtc0
Using the rtc interface to the clock.
Last drift adjustment done at 1522385687 seconds after 1969
Last calibration done at 1522385687 seconds after 1969
Hardware clock is on UTC time
Assuming hardware clock is kept in UTC time.
Waiting for clock tick...
...got clock tick
Time read from Hardware Clock: 2018/03/30 04:54:50
Hw clock time : 2018/03/30 04:54:50 = 1522385690 seconds since 1969
Time since last adjustment is 3 seconds
Calculated Hardware Clock drift is 0.000000 seconds
2018-03-30 06:54:49.622830+02:00 |
If I set my hardware clock in bios, my software clock is two hours ahead at boot, until Chrony adjusts it.
Code: | hwclock from util-linux 2.32
System Time: 1522387311.320628
Trying to open: /dev/rtc0
Using the rtc interface to the clock.
Last drift adjustment done at 1522386345 seconds after 1969
Last calibration done at 1522386345 seconds after 1969
Hardware clock is on UTC time
Assuming hardware clock is kept in UTC time.
Waiting for clock tick...
...got clock tick
Time read from Hardware Clock: 2018/03/30 07:21:52
Hw clock time : 2018/03/30 07:21:52 = 1522394512 seconds since 1969
Time since last adjustment is 8167 seconds
Calculated Hardware Clock drift is 0.000000 seconds
2018-03-30 09:21:51.310272+02:00
|
|
|
Back to top |
|
|
bunder Bodhisattva
Joined: 10 Apr 2004 Posts: 5947
|
Posted: Fri Mar 30, 2018 5:35 am Post subject: |
|
|
what is your timezone?
i would recommend setting systohc and hctosys to the same value (probably yes), and possibly setting clock to local (instead of utc, i don't remember what the default is). _________________
Neddyseagoon wrote: | The problem with leaving is that you can only do it once and it reduces your influence. |
banned from #gentoo since sept 2017 |
|
Back to top |
|
|
ayeyes Tux's lil' helper
Joined: 03 Dec 2017 Posts: 104
|
Posted: Fri Mar 30, 2018 6:05 am Post subject: |
|
|
Thank you for the reply.
It's Europe/Amsterdam. Sat it to local and both to yes, and ran Code: | hwclock --systohc --localtime | .
Code: |
hwclock from util-linux 2.32
System Time: 1522389665.514197
Trying to open: /dev/rtc0
Using the rtc interface to the clock.
Last drift adjustment done at 1522389458 seconds after 1969
Last calibration done at 1522389458 seconds after 1969
Hardware clock is on local time
Assuming hardware clock is kept in local time.
Waiting for clock tick...
...got clock tick
Time read from Hardware Clock: 2018/03/30 06:01:06
Hw clock time : 2018/03/30 06:01:06 = 1522382466 seconds since 1969
Time since last adjustment is -6992 seconds
Calculated Hardware Clock drift is 0.000000 seconds
2018-03-30 06:01:05.497768+02:00 |
My current time is 08:xx:xx.
When I had
Code: | Device Drivers --->
[*] Real Time Clock --->
[ ] Set system time from RTC on startup and resume
[ ] Set the RTC time based on NTP synchronization
[*] /sys/class/rtc/rtcN (sysfs)
[*] /proc/driver/rtc (procfs for rtc0)
[*] /dev/rtcN (character devices)
<*> PC-style 'CMOS' |
and hwclock to start at boot at runlevel default, and local in hwclock with both to yes, both hardware time and software time was correct. |
|
Back to top |
|
|
bunder Bodhisattva
Joined: 10 Apr 2004 Posts: 5947
|
Posted: Fri Mar 30, 2018 6:11 am Post subject: |
|
|
Europe/Amsterdam would appear to be utc+2 at the moment, is your timezone being set correctly?
what does `date +%Z` say? _________________
Neddyseagoon wrote: | The problem with leaving is that you can only do it once and it reduces your influence. |
banned from #gentoo since sept 2017 |
|
Back to top |
|
|
ayeyes Tux's lil' helper
Joined: 03 Dec 2017 Posts: 104
|
Posted: Fri Mar 30, 2018 6:12 am Post subject: |
|
|
date +%Z says CEST. |
|
Back to top |
|
|
bunder Bodhisattva
Joined: 10 Apr 2004 Posts: 5947
|
Posted: Fri Mar 30, 2018 7:31 am Post subject: |
|
|
That sounds right... if you sync with ntp and reboot it should keep the time correctly... unless I'm missing something. _________________
Neddyseagoon wrote: | The problem with leaving is that you can only do it once and it reduces your influence. |
banned from #gentoo since sept 2017 |
|
Back to top |
|
|
|