You are not logged in.
Pages: 1
That's my time configuration from rc.conf:
LOCALE="en_US.UTF-8"
DAEMON_LOCALE="no"
HARDWARECLOCK="localtime"
TIMEZONE="Europe/Moscow"
KEYMAP="us"
CONSOLEFONT=
CONSOLEMAP=
USECOLOR="yes"
Here's my hwclock output:
[alex@myhost ~]$ sudo hwclock --localtime
Sun 03 Jun 2012 07:55:36 AM MSK -0.984760 seconds
[alex@myhost ~]$ sudo hwclock --utc
Sun 03 Jun 2012 11:55:41 AM MSK -0.395457 seconds
Everything looks logical except one thing. Moscow's time is "UTC +4". Why does hwclock subtract 4 hours, not add?
Offline
Is there a reason you're using 'localtime' as your hardwareclock? Please switch to 'utc'.
Offline
carukia,
Of course, I've read this article. But still I don't understand why when utc = 08 00, localtime = 04 00. It must be 08+4 00
Offline
I'm in UTC+2 timezone and I have the same situation, despite using UTC as my hardwareclock. Using 'hwclock --utc' gives the correct time.
I'm not sure if you understand what the switches do:
-u, --utc
--localtime
Indicates that the Hardware Clock is kept in Coordinated Universal Time or local time, respectively. It is
your choice whether to keep your clock in UTC or local time, but nothing in the clock tells which you've cho‐
sen. So this option is how you give that information to hwclock.If you specify the wrong one of these options (or specify neither and take a wrong default), both setting and
querying of the Hardware Clock will be messed up.If you specify neither --utc nor --localtime, the default is whichever was specified the last time hwclock
was used to set the clock (i.e. hwclock was successfully run with the --set, --systohc, or --adjust
options), as recorded in the adjtime file. If the adjtime file doesn't exist, the default is UTC time.
{emphasis mine)
Can you post the output of
hwclock --debug
hwclock --localtime
Offline
I've changed localtime to UTC for hardwareclock as karol said. After that:
[alex@myhost ~]$ sudo hwclock --debug
Password:
hwclock from util-linux 2.21.2
Using /dev interface to clock.
Last drift adjustment done at 1338694960 seconds after 1969
Last calibration done at 1338694960 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: 2012/06/04 00:44:55
Hw clock time : 2012/06/04 00:44:55 = 1338770695 seconds since 1969
Mon 04 Jun 2012 04:44:55 AM MSK -0.860015 seconds
[alex@myhost ~]$ sudo hwclock --localtime
Mon 04 Jun 2012 12:45:01 AM MSK -0.641095 seconds
[alex@myhost ~]$ sudo hwclock --utc
Mon 04 Jun 2012 04:45:06 AM MSK -0.609841 seconds
Now it adds 8 hours to the utc time..
Last edited by Allok (2012-06-04 04:46:09)
Offline
Pages: 1