You are not logged in.

#1 2007-12-11 15:54:04

mole
Member
Registered: 2007-02-17
Posts: 21

[solved] ntpdate always sets clock to UTC

I installed Arch from a 2007.05 CD, BIOS clock is manually set to local time, and in rc.conf I have

LOCALE="de_DE"
HARDWARECLOCK="localtime"
TIMEZONE="Europe/Berlin"

but hwclock --show says

Di 11 Dez 2007 16:35:14 UTC  -0.000751 Sekunden

Which is the correct local time, but i don't understand why it is considered as UTC instead of CET (=UTC+1)
Output of date is the same:

Di 11. Dez 16:35:15 UTC 2007

Now if I call ntpdate pool.ntp.org the time is corrected to the actual UTC

11 Dec 15:35:22 ntpdate[7466]: step time server 85.214.23.162 offset -3599.986650 sec

How can I set the system time to CET and make sure ntpdate won't mess it up? I already tried HARDWARECLOCK="UTC" (although I shouldn't, because of Windows dual boot), result is the same. Also no change after running tzselect. /etc/localtime is identical to /usr/share/zoneinfo/Europe/Berlin. Sytem is up to date.

Edit:
When I run tzselect I get

Therefore TZ='Europe/Berlin' will be used.
Local time is now:      Tue Dec 11 16:51:01 /usr/share/zoneinfo/Europe/Berlin 2007.
Universal Time is now:  Tue Dec 11 16:51:01 UTC 2007.

but Europe/Berlin != UTC, and this happens with all timezones.

Last edited by mole (2007-12-12 14:35:24)

Offline

#2 2007-12-12 11:25:00

mole
Member
Registered: 2007-02-17
Posts: 21

Re: [solved] ntpdate always sets clock to UTC

Okay, I think it's fixed now: While I had

HARDWARECLOCK="UTC"
TIMEZONE="CET"

in rc.conf, I reinstalled tzdata

pacman -Sy tzdata

even though the local version (2007i-2) was up to date, then I started

tzselect

and chose Europe/Berlin. This time the result was okay:

Local time is now:      Wed Dec 12 12:11:07 CET 2007.
Universal Time is now:  Wed Dec 12 11:11:07 UTC 2007.

Then I changed HARDWARECLOCK to "localtime" in rc.conf and rebooted. In the BIOS I saw that the time was correctly set to local time (CET). Now hwclock and date display the right time and ntpdate also works as expected.

[root@arch mole]# hwclock
Mi 12 Dez 2007 12:18:33 CET  -0.094477 Sekunden
[root@arch mole]# date
Mi 12. Dez 12:18:34 CET 2007
[root@arch mole]# ntpdate pool.ntp.org
12 Dec 12:18:37 ntpdate[4204]: adjust time server 81.169.180.26 offset -0.063674 sec

Offline

Board footer

Powered by FluxBB