DSM-G600, DNS-3xx and NSA-220 Hack Forum

Unfortunately no one can be told what fun_plug is - you have to see it for yourself.

You are not logged in.

Announcement

#1 2008-07-20 16:20:17

skydreamer
Member
From: At the Atlantic Coast
Registered: 2007-01-06
Posts: 232

Howto get around ntpd timezone peculiarity

I was trying to figure out how to get the ntpd working with the reference time server and finally it seems to be syncing the time OK.

First of all there seems to be a conflict between how the timezone is interpreted by the ntpd and the DNS-323 firmware. While GMT-0 in /etc/TZ is recognized properly by the D-link including the daylight saving setting, the ntpd obviously interprets it literally i.e. without the daylight setting, which is stored separately.

The only consistent way around is to set the timezone one hour back and to disable the daylight saving. Thus in the GMT zone you need to select GMT+1 and change the daylight saving to none.

And finally although not obligatory you can insert the following line in /mnt/HD_a2/fun_plug:
echo "GMT0IST,M3.5.0/1,M10.5.0" > /etc/TZ

This is for Ireland, you need to change the string to suit your own country.

Check your settings:
/ # date
Sun Jul 20 14:10:24 IST 2008

/ # ntpq -p -n
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
192.168.111.254 134.226.81.3     2 u   10   64    7    0.153    0.095   0.433
127.127.1.0     .LOCL.          10 l   42   64    3    0.000    0.000   0.008
/ #

The offset is in 10ms so for example offset of 600 means 6 second difference to the reference clock.

- SD

Offline

 

#2 2008-07-20 16:25:40

fonz
Member / Developer
From: Berlin
Registered: 2007-02-06
Posts: 1716
Website

Re: Howto get around ntpd timezone peculiarity

skydreamer wrote:

And finally although not obligatory you can insert the following line in /mnt/HD_a2/fun_plug:
echo "GMT0IST,M3.5.0/1,M10.5.0" > /etc/TZ

There's a start script for this: /ffp/start/adjtimex.sh
It will also try to improve the severe clock drift by adjusting the 'length of a day'. Without this, ntp will hit the 500 maximum drift on my dns.

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB