Can someone explain this hwclock behavior. My system clock is UTC+1 and hardware clock in UTC. Setting my date and than using hwclock --systohc --utc, in order to have my RTC in UTC, reveals confusing results in hwclock.
Code:
paleksic ~ # date
Tue Dec 13 20:15:50 CET 2005
paleksic ~ # date --utc
Tue Dec 13 19:16:23 UTC 2005
paleksic ~ # hwclock --utc
Tue 13 Dec 2005 08:16:46 PM CET -0.793399 seconds
paleksic ~ # hwclock --localtime
Tue 13 Dec 2005 07:17:19 PM CET -0.572439 seconds
paleksic ~ # ls -l /etc/localtime·
lrwxrwxrwx 1 root root 35 Nov 13 12:09 /etc/localtime -> /usr/share/zoneinfo/Europe/Belgrade
paleksic ~ # hwclock --systohc --utc
paleksic ~ # hwclock --utc
Tue 13 Dec 2005 08:19:26 PM CET -0.610352 seconds
paleksic ~ # hwclock --localtime
Tue 13 Dec 2005 07:19:39 PM CET -0.803869 seconds
Why is it printing my local time with hwclock --utc and my system time with hwclock --localtime. Is this behavior OK for hwclock. IMHO it would be more logical to print results vice versa like in date command?
Code:
paleksic ~ # hwclock --debug
hwclock from util-linux-2.12r
hwclock: Open of /dev/rtc failed, errno=2: No such file or directory.
Using direct I/O instructions to ISA clock.
Last drift adjustment done at 1134501607 seconds after 1969
Last calibration done at 1134501607 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: 2005/12/13 19:23:36
Hw clock time : 2005/12/13 19:23:36 = 1134501816 seconds since 1969
Tue 13 Dec 2005 08:23:36 PM CET -0.466655 seconds
What /dev/rtc stands for. Some kernel module i'm missing?