[ntp:questions] Re: Arcron DCF77 ref clock driver: problem with timezone and UTC

Ronan Flood ronan at noc.ulcc.ac.uk
Wed Mar 23 16:14:58 UTC 2005


"Eric Voisard" <evoisard at MAPS.ON.ieee.org> wrote:

> And apparently that's how it works. Yesterday I tried toggling the server
> between UTC and CET timezone and played with flag1. Here is what I got:
> 
> Timezone    ->    ntpd     =>    status
> 1) UTC    ->    flag1=0    =>    fail (offset ~1 hour)
> 2) UTC    ->    flag1=1    =>    fail (offset ~1 hour)
> 3) CET    ->    flag1=0    =>    fail (offset ~1 hour)
> 4) CET    ->    flag1=1    =>    success (offset ~0 hour)
> 
> If the server's timezone is CET, the driver and ntpd work as expected.
> When the timezone is UTC, it fails in any case in a way that I think is
> dubious, it should not fail in 2).

I think it should, as flag1=1 says "time from the clock is in my local
timezone", and your local timezone was UTC, but the clock output was
actually UTC+1.  Case 1 and 2 are equivalent -- might differ when you
are in CEST.

> I've played with other timezones as well, in example US/PST, but if the
> shift is too large, ntpd oddly fails to reach the clock (status= 8xxx)...
> It works within the range GMT-2 to GMT+5, but the offset increases in one
> hour increments. ntpd considers them all insane, except GMT-1 which is CET.

You mean GMT+1.  That's the only one I would expect to work, as it is
the only one which matches the clock.

> > One approach you could try is to adjust the time1 fudge factor,
> > "fudge 127.127.27.1 flag1 1 time1 -3600".  This is a hack and not
> > the right way to solve the problem, but might work ...
> 
> This is a pretty good idea, and it works! Thanks!

Check that it still works when you move into CEST, and back again.

> Though my HKW has same command set as the Arcron (e.g. "o" exists and does
> the same) since from what I understand, only the case changes. So, all
> Arcron should behave like my HKW, at least on Solaris/SPARC...

If it is certain that these clocks always return CET/CEST from DCF
for the "o" command, it seems to me that refclock_arc should know
that and adjust automatically to UTC without reference to the server
timezone and fudging.  It seems odd that no one else has seen this
problem, but maybe most/all DCF users have their servers in CET/CEST
and use flag1.

-- 
                      Ronan Flood <R.Flood at noc.ulcc.ac.uk>
                        working for but not speaking for
             Network Services, University of London Computer Centre
     (which means: don't bother ULCC if I've said something you don't like)



More information about the questions mailing list