Comment 23 for bug 1802233

Revision history for this message
Mike Ranweiler (mranweil) wrote :

I tried some test fw for the boston:

ubuntu@ltc-boston25:~$ sudo /sbin/hwclock --set --date "2019/06/10 12:55:00"; sudo /sbin/hwclock --verbose
[sudo] password for ubuntu:
hwclock from util-linux 2.33.1
System Time: 1560377530.955292
Trying to open: /dev/rtc0
Using the rtc interface to the clock.
Last drift adjustment done at 1560189300 seconds after 1969
Last calibration done at 1560189300 seconds after 1969
Hardware clock is on UTC time
Assuming hardware clock is kept in UTC time.
Waiting for clock tick...
ioctl(4, RTC_UIE_ON, 0): Invalid argument
Waiting in loop for time from /dev/rtc0 to change
...got clock tick
Time read from Hardware Clock: 2019/06/10 17:55:01
Hw clock time : 2019/06/10 17:55:01 = 1560189301 seconds since 1969
Time since last adjustment is 1 second
Calculated Hardware Clock drift is 0.000000 seconds
2019-06-10 12:55:00.022780-05:00
ubuntu@ltc-boston25:~$

But I still have:
ubuntu@ltc-boston25:~$ sudo /sbin/hwclock --set --date "2004/11/21 04:10:00"; sudo strace -e ioctl "/sbin/hwclock"
ioctl(4, RTC_UIE_ON) = -1 EINVAL (Invalid argument)
ioctl(4, RTC_RD_TIME, {tm_sec=0, tm_min=10, tm_hour=10, tm_mday=21, tm_mon=10, tm_year=104, ...}) = 0
<snip>
ioctl(4, RTC_RD_TIME, {tm_sec=1, tm_min=10, tm_hour=10, tm_mday=21, tm_mon=10, tm_year=104, ...}) = 0
ioctl(4, RTC_RD_TIME, {tm_sec=1, tm_min=10, tm_hour=10, tm_mday=21, tm_mon=10, tm_year=104, ...}) = 0
2004-11-21 04:10:00.018862-06:00
+++ exited with 0 +++
ubuntu@ltc-boston25:~$

But it generally seems to work - if I don't include any args it does set correctly still:
ubuntu@ltc-boston25:~$ sudo /sbin/hwclock --set --date "2019/06/10 12:55:00"; sudo /sbin/hwclock
2019-06-10 12:54:59.982163-05:00
ubuntu@ltc-boston25:~$

Anything else you suggest?