You are not logged in.

#1 2013-02-16 16:32:58

amiara
Member
Registered: 2013-01-16
Posts: 21

The neverending time zone issue

After rebooting from Windows, the time is off by 5:00 and nothing seems to fix it (short of a direct setting of the clock.) This is a very nagging issue, and I have gone through most of the posts regarding the issue with no luck. Here is the output of  "timedatecrtl"

 Local time: Sat, 2013-02-16 06:26:26 EST
  Universal time: Sat, 2013-02-16 11:26:26 UTC
        RTC time: Sat, 2013-02-16 11:26:26
        Timezone: America/Detroit
      UTC offset: -0500
     NTP enabled: yes
NTP synchronized: yes
 RTC in local TZ: no
      DST active: no
 Last DST change: EDT  EST, DST became inactive
                  Sun, 2012-11-04 01:59:59 EDT
                  Sun, 2012-11-04 01:00:00 EST
 Next DST change: EST  EDT, DST will become active
                  the clock will jump one hour forward
                  Sun, 2013-03-10 01:59:59 EST
                  Sun, 2013-03-10 03:00:00 EDT

At the time of running the command  the time was around 11:30 am EST. I am hoping NTPD sets the clock automatically after every boot as Windows seems to mess up the hardware clock. (I have fiddled with Windows side with no luck.) NTP does not seem to do anything even when doing "ntpd -qg" ...

Here is the status of ntpd

ntpd.service - Network Time Service
	  Loaded: loaded (/usr/lib/systemd/system/ntpd.service; enabled)
	  Active: active (running) since Sat, 2013-02-16 06:21:50 EST; 15min ago
	 Process: 1530 ExecStart=/usr/bin/ntpd -g -u ntp:ntp (code=exited, status=0/SUCCESS)
	Main PID: 1531 (ntpd)
	  CGroup: name=systemd:/system/ntpd.service
		  `-1531 /usr/bin/ntpd -g -u ntp:ntp

Last edited by amiara (2013-02-16 16:38:37)

Offline

#2 2013-02-16 16:52:30

aesiris
Member
Registered: 2012-02-25
Posts: 94

Re: The neverending time zone issue

amiara wrote:

After rebooting from Windows, the time is off by 5:00 and nothing seems to fix it (short of a direct setting of the clock.) This is a very nagging issue, and I have gone through most of the posts regarding the issue with no luck. Here is the output of  "timedatecrtl"

...
RTC in local TZ: no
... 

...

Set the hardware clock to local time zone

timedatectl set-local-rtc 1

Offline

#3 2013-02-16 16:53:12

Scimmia
Bug Wrangler
Registered: 2012-09-01
Posts: 5,070

Re: The neverending time zone issue

You need to fix the issue, not band-aid it with ntp.

What version of Windows? Did you try the registry hack in the ArchWiki for telling Windows that the clock is in UTC?

Offline

#4 2013-02-16 17:39:52

amiara
Member
Registered: 2013-01-16
Posts: 21

Re: The neverending time zone issue

@aesiris I have tried that and it does not have the desired effect. Besides I get that nice warning (This mode is not fully supported ...).  It just sets RTC time to be the same as local time (the wrong local time ...), but "ntpd -qg" still has no effect.

@Scimmia I am using Windows 7 and have tried that registry hack "something like RTC is universal" ... As much as I like a cure, I am convinced that there is none and will be happy with a band-aid (aka a working ntp)

Last edited by amiara (2013-02-16 17:43:19)

Offline

#5 2013-02-16 18:29:06

Scimmia
Bug Wrangler
Registered: 2012-09-01
Posts: 5,070

Re: The neverending time zone issue

How did you apply the registry change? If you entered it manually, are you positive you you didn't have any typos and created a dword entry? It's best to copy/paste the supplied reg file to avoid any of those issues. Did you also disable windows internet time sync?

NTP isn't working because the clock is too far off, it's a sanity check. Making ntp do the job is a bad thing, though, because it doesn't apply until the system is fully up. You end up with a situation where the system boots, then the clock goes way back in time, throwing everything off. Please don't do this.

If you absolutely must run Windows with a localtime RTC, you need to fix your linux setup to use it as well. Check /etc/adjtime, it should be three lines with the third one being "localtime".

Offline

#6 2013-02-16 20:09:36

amiara
Member
Registered: 2013-01-16
Posts: 21

Re: The neverending time zone issue

@Scimmia: Thanks. I reapplied the registry change through the .reg file, and it has not yet taken effect. (I am not sure whether Windows decides to write down the clock at each shutdown or just some of the times ... we will see.) I have not disabled time sync in Windows as I don't see a reason. I want windows to be able to sync time.

My question is really why ntp has no effect. That -g switch in "ntpd -qg" is supposed to force it to change the clock, no matter how off it is (?). I don't want it to sanity check on my behalf. Is there a way to force ntp to set the clock? I suspect there is something wrong with my ntp setup ... I have set the time manually (say off by 1 minute) and expected it to get fine-tuned, but doesn't seem to happen.

Last edited by amiara (2013-02-16 20:12:45)

Offline

#7 2013-02-16 22:46:37

Scimmia
Bug Wrangler
Registered: 2012-09-01
Posts: 5,070

Re: The neverending time zone issue

Sorry, I'm not going to help you abuse NTP. I already gave you everything you need to fix the real issues.

!bail

Offline

#8 2013-02-16 22:57:23

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 4,306

Re: The neverending time zone issue

amiara, does /var/lib/ntp/ntp.drift exist and isn't empty ?

(it should have a number in it)


Booting with apg Openrc, NOT systemd.
Automounting : not needed, i prefer pmount
Aur helpers : makepkg + my own local repo === rarely need them

Offline

#9 2013-02-17 22:16:17

amiara
Member
Registered: 2013-01-16
Posts: 21

Re: The neverending time zone issue

@Scimmia: Fair enough.

@Lone_Wolf: It has a number in it (7.496) Is there any diagnostics one can run on NTP to see what is going on?

Offline

#10 2013-02-18 11:02:12

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 4,306

Re: The neverending time zone issue

If ntp starts succesfully, you should see something like this in the logs :

Feb 18 10:58:02 localhost ntpd[1207]: ntpd 4.2.6p5@1.2349-o Tue Dec 18 22:48:42 UTC 2012 (1)
Feb 18 10:58:02 localhost ntpd[1208]: proto: precision = 0.254 usec
Feb 18 10:58:02 localhost ntpd[1208]: ntp_io: estimated max descriptors: 1024, initial socket boundary: 16
Feb 18 10:58:02 localhost ntpd[1208]: Listen and drop on 0 v4wildcard 0.0.0.0 UDP 123
Feb 18 10:58:02 localhost ntpd[1208]: Listen and drop on 1 v6wildcard :: UDP 123
Feb 18 10:58:02 localhost ntpd[1208]: Listen normally on 2 lo 127.0.0.1 UDP 123
Feb 18 10:58:02 localhost ntpd[1208]: Listen normally on 3 eth0 192.168.178.2 UDP 123
Feb 18 10:58:02 localhost ntpd[1208]: Listen normally on 4 lo ::1 UDP 123
Feb 18 10:58:02 localhost ntpd[1208]: Listen normally on 5 eth0 fe80::230:48ff:febb:2454 UDP 123
Feb 18 10:58:02 localhost ntpd[1208]: Listen normally on 6 eth0 2001:980:d230:1:230:48ff:febb:2454 UDP 123
Feb 18 10:58:02 localhost ntpd[1208]: peers refreshed
Feb 18 10:58:02 localhost ntpd[1208]: Listening on routing socket on fd #23 for interface updates

ntpq -p gives a list of the peers ntp uses to keep the clock synchronised.
The jitter and offset vaues must not be zero, and 1 of the peers should have a * before it.


Booting with apg Openrc, NOT systemd.
Automounting : not needed, i prefer pmount
Aur helpers : makepkg + my own local repo === rarely need them

Offline

#11 2013-04-14 15:39:06

amiara
Member
Registered: 2013-01-16
Posts: 21

Re: The neverending time zone issue

@Lone_Wolf, thanks. I forgot to check this thread for a while. The ntpq command is interesting. What if none of the peers has a star besides it? I have three of them and the jitter and offsets are nonzero for all of them.

Offline

#12 2013-04-14 17:27:20

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 4,306

Re: The neverending time zone issue

The * is the server ntp will  use first to synchronize, servers with + before them are second choice.
Servers with - before them are considered not stable enough (or your connection to them is not good enough).

I suggest you add some more servers in /etc/ntp.conf .

Here's my list for reference :
server ntp.xs4all.nl
server ntp2.xs4all.nl
server 0.nl.pool.ntp.org
server 1.nl.pool.ntp.org
server 2.nl.pool.ntp.org
server 3.nl.pool.ntp.org


The first 2 are ntp-servers run by my provider, the other 4 are chosen from the pool for the netherlands (the country where i live).

check http://support.ntp.org/bin/view/Servers/NTPPoolServers .
usually listing the country server pool and continent server pool works best. only add the worldwide pool if you can't get a good sync with country/continent pool.


Booting with apg Openrc, NOT systemd.
Automounting : not needed, i prefer pmount
Aur helpers : makepkg + my own local repo === rarely need them

Offline

Board footer

Powered by FluxBB