6 Replies Latest reply: Feb 11, 2013 6:30 PM by wallarug RSS

Time Servers always +1hour for Sydney

wallarug Level 15

Any ideas??

 

I have set up the Raspberry Pi to use AU/Sydney time server but it is always wrong.

 

Could someone report this to a higher ranked person with magical powers that can fix this if I am not the only one experiening such issues.

  • 1. Re: Time Servers always +1hour for Sydney
    mcb1 Level 15

    Fergus

    I've struck something similar with other devices.

    Could the daylight saving time be affecting it?

     

     

    This sort of explains what I mean.

    http://www.timeanddate.com/library/abbreviations/timezones/au/est.html

     

     

    Mark

  • 2. Re: Time Servers always +1hour for Sydney
    wallarug Level 15

    That would be the source of the problem BUT, the time servers should correct this when a device syncs.  So  I say this is a problem on a time server somewhere rather than on my Raspberry Pi.

     

    Any Thoughts?

  • 3. Re: Time Servers always +1hour for Sydney
    Level 15

    It's unlikely that an incorrect ntp server would go unnoticed for long, especially if you're already using pool.ntp.org, so unless your image has only a single server configured then ntp shouldn't be a problem.

    Even assuming the RPF are running their own single server setup with that (and only that) configured in the official image there's enough people using it that any problem would be quickly noticed and corrected.

     

    So I think it's more likely that there's something wrong locally on your Pi. It could be the tz database, or the setup of the on-boot clock setting script not being appropriate for AU/Sydney, but you need to do a bit more investigation to determine what's happening.

     

     

    The way all of this normally works is that the ntp servers run on UTC and that's what they report. Often the systems clock or RTC will also run on UTC. It's then up to your system to know how to translate that to your localtime.

    This translation is normally accomplished by copying an appropriate file from /usr/share/zoneinfo/ to /etc/localtime. This all depends on the timezone database & ntp server being accurate.

    However there may also be a global TZ environmnet variable being set which could possibly result in a double correction for DST.

     

    You can try a different ntp server by looking at http://www.pool.ntp.org/en/use.html and using one of those and try the following commands to see if they can show a problem:

     

    date --utc

     

    ntpq -p

     

    ntpdate -u -q 0.pool.ntp.org 1.pool.ntp.org

     

    then compare the results against whatever ntp server(s) you have configured (usually in /etc/ntp.conf). Generally you should use three or more ntp servers, that way ntp can identify and ignore a server that's handing out an incorrect time. The output of the ntpdate command above should show the output from several different servers and the offset reported should be more or less zero. The ntpq -p command will show what servers you're currently using and their details - if the offsets shown from both ntpdate and ntpq are all close, usually close to zero, then it's likely that the ntp servers are fine.

     

    You can get a new timezone database fromhttp://www.iana.org/time-zones if you think the one you're using is wrong for your location or DST settings. However you will need to compile it before you can use it. Details of how to do that manually can be found about halfway down this page http://www.linuxfromscratch.org/lfs/view/7.2/chapter06/glibc.html

  • 4. Re: Time Servers always +1hour for Sydney
    wallarug Level 15

    I will look at this in more detail tomorrow. 

     

    I can tell you I am using a stock 2012-12-16 Raspbian image and configured the timezone through raspi-config. It has always been wrong even on images prior to this.  And BTW: My network time on all computers is right.

  • 5. Re: Time Servers always +1hour for Sydney
    Level 15

    Fergus, did you ever get to the bottom of this ?