LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   NTP and Daylight Savings Time (http://www.linuxquestions.org/questions/linux-software-2/ntp-and-daylight-savings-time-378463/)

jrdioko 10-30-2005 08:12 PM

NTP and Daylight Savings Time
 
I'm really surprised I can't find this anywhere, but I've been all over google and the NTP doc site and can't find anything. I'm using ntpd and it didn't adjust my clock for daylight savings time. I've read that it does it slowly so as to not throw off processes that rely on time, but it's been over 12 hours and it's still exactly an hour ahead of the actual time. Is there a setting somewhere I missed to tell it about daylight savings?

lyle_s 10-30-2005 09:27 PM

Is your hardware clock set to UTC or local time?

Lyle.

jrdioko 10-30-2005 09:34 PM

I'm pretty sure it's local time, although I'm not 100% sure. "date -u" correctly shows UTC, if that means anything.

lyle_s 10-30-2005 09:49 PM

Post the output of:

cat /etc/hardwareclock

Things work a lot smoother if you set your hardware clock to UTC. Daylight savings time changes work automatically.

NPT doesn't care about your time zone of if you've switched to or from daylight savings time; it only concerns itself with UTC.

Lyle.

jrdioko 10-30-2005 10:05 PM

localtime

So how does the time change work then if NTP doesn't do it? What was that I read about it making small adjustments until the change was complete?

The few reasons I think I had for keeping it stored as localtime: 1) I saw something in the kernel config asking how it was stored, and I've had enough of kernel recompiles lately, 2) If I remember correctly, it's easy to run into a situation with Windows and Linux fighting over the time if the hardware is set to UTC, as in adjusting it to different times each time you reboot (I rarely use Windows but I keep it on the computer for certain apps that don't work otherwise and would rather not have to deal with that).

So is there no way to make it work automatically the way it's currently set up?

lyle_s 10-30-2005 10:45 PM

glibc takes care of converting UTC to localtime; it has a database of timezone information it consults to present you with the correct local time. The correct local time could be different for different users logging into your machine from around the world. I guess it does some kind of workaround if your hardwareclock set to localtime.

I don't think there is a way to make it work automatically without setting it to UTC. Go on, it won't hurt much. Windows at least asks before it changes the time; just click "No" when it asks if you ever boot into Windows. The time will be wrong in Windows though. I think modern versions of Windows can work with the hardware clock set to UTC anyway.

Even if you have CONFIG_APM_RTC_IS_GMT set to yes, it won't be that big of a deal (your clock might be out by a few seconds after your computer wakes up.) Next time remember not to set this. This only affects Advanced Power Management (APM.)

Lyle.

berbae 10-31-2005 03:54 AM

If you have a dual boot machine linux/windows and the linux clock RTC is set to local time, let windows do the change of time and reboot after that into linux.
It is the simpler way to fix this matter.

jrdioko 10-31-2005 10:33 PM

Ok that works. Still, I read something about ntpd handling it and making the change slowly so it doesn't mess anything up... was I just interpreting that wrong?

berbae 11-01-2005 09:25 AM

I think what you read was about adjusting the speed of the system clock slowly if it is too slow or too fast. It is not about DST change of time.


All times are GMT -5. The time now is 03:16 AM.