Skip to content
Advertisement

Confusion about how linux and ntpd deal with time

I am running an NTP-Server on my lubuntu 15.04 box. The server uses the local system clock as its only time source.

/etc/ntp.conf

driftfile /var/lib/ntp/ntp.drift
server 127.127.1.0 prefer
restrict 127.127.1.0
fudge 127.127.1.0 stratum 10

Timezone of the server is GMT+1 (due to summertime it results in UTC+2 at the moment). When I set the clock using date I see the time is 00:00:00 which is fine.

user@ubuntu:$ sudo  date --set=00:00:00
Mi 7. Okt 00:00:00 GMT+1 2015
user@ubuntu:$ date
Mi 7. Okt 00:00:02 GMT+1 2015

If a ntp-client queries the time it gets 01:00:00 as the value of the transmit timestamp. Why? As ntp relies on UTC I would expect it to report 22:00:00.

Advertisement

Answer

I was able to solve it. Due to the possix standard the signs of GMT in zoneinfo/Etc/ are exactly the opposite of what one would expect. When I say berlin (germany) is in GMT+1 the filename is zoneinfo/Etc/GMT-1.

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement