lkml.org 
[lkml]   [2020]   [Jan]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [bugreport] "hwclock -w" reset time instead of setting the right time
On Thu, 2 Jan 2020 at 16:08, Karel Zak <kzak@redhat.com> wrote:
>
> Can you try "hwclock -w -v" to get more details?
>
> For example on my workstation:
>
> # ./hwclock -w -v
> hwclock from util-linux 2.35-rc1-20-63f8
> System Time: 1577963091.683987
> Trying to open: /dev/rtc0
> Using the rtc interface to the clock.
> Last drift adjustment done at 1531914946 seconds after 1969
> Last calibration done at 1531914946 seconds after 1969
> Hardware clock is on UTC time
> Assuming hardware clock is kept in UTC time.
> RTC type: 'rtc_cmos'
> Using delay: 0.500000 seconds
> missed it - 1577963091.684767 is too far past 1577963091.500000 (0.184767 > 0.001000)
> 1577963092.500000 is close enough to 1577963092.500000 (0.000000 < 0.002000)
> Set RTC to 1577963092 (1577963091 + 1; refsystime = 1577963091.000000)
> Setting Hardware Clock to 11:04:52 = 1577963092 seconds since 1969
> ioctl(RTC_SET_TIME) was successful.
> Not adjusting drift factor because the --update-drift option was not used.
> New /etc/adjtime data:
> 0.000000 1577963091 0.000000
> 1577963091
> UTC
>

# hwclock -w -v
hwclock from util-linux 2.35-rc1-20-63f8
System Time: 1577964536.796672
Trying to open: /dev/rtc0
Using the rtc interface to the clock.
Last drift adjustment done at 1577950892 seconds after 1969
Last calibration done at 1577950892 seconds after 1969
Hardware clock is on UTC time
Assuming hardware clock is kept in UTC time.
RTC type: 'rtc_cmos'
Using delay: 0.500000 seconds
missed it - 1577964536.797135 is too far past 1577964536.500000
(0.297135 > 0.001000)
1577964537.500000 is close enough to 1577964537.500000 (0.000000 < 0.002000)
Set RTC to 1577964537 (1577964536 + 1; refsystime = 1577964536.000000)
Setting Hardware Clock to 11:28:57 = 1577964537 seconds since 1969
ioctl(RTC_SET_TIME) was successful.
Not adjusting drift factor because the --update-drift option was not used.
New /etc/adjtime data:
0.000000 1577964536 0.000000
1577964536
UTC

Demonstration: https://youtu.be/Yx27IH2opEc

--
Best Regards,
Mike Gavrilov.

\
 
 \ /
  Last update: 2020-01-02 12:55    [W:0.055 / U:9.216 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site