dorijan
Posts: 6
Joined: Tue Aug 14, 2012 12:31 pm

Whats wrong with my date

Wed Sep 19, 2012 1:21 am

Hi to all..

I thought Raspbian is using NTP to sync my clock. But this is not happening...
pi@raspberrypi ~ $ date
Pet Kol 24 12:31:46 CEST 2012
(it is 24.8.2012)

my timezone is right

pi@raspberrypi ~ $ cat /etc/timezone
Europe/Zagreb

I also have internet access

pi@raspberrypi ~ $ ping http://www.google.com
PING http://www.google.com (208.117.229.183) 56(84) bytes of data.
64 bytes from cache.google.com (208.117.229.183): icmp_req=1 ttl=48 time=5.81 ms


Also:
pi@raspberrypi ~ $ ntpq -p
remote refid st t when poll reach delay offset jitter
==============================================================================
161.53.160.4 .INIT. 16 u - 512 0 0.000 0.000 0.000


Does anyone know what is wrong?
Thank you

User avatar
joan
Posts: 14936
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: Whats wrong with my date

Wed Sep 19, 2012 7:28 am

It's a service I use without wondering how it works.

However shouldn't you have more than one clock source?

Code: Select all

joan@mercury:~$ ntpq -p
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
+trust.nobody.at 193.171.23.163   2 u    1   64  377   41.469   -5.896   1.440
+ntp1.karneval.c 195.113.144.201  2 u   60   64  377   37.085   -5.778   0.804
-intserv-new.net 130.149.17.21    2 u   56   64  377   38.190   -5.458   0.835
*panoramix.linoc 193.67.79.202    2 u   61   64  377   28.055   -6.010   0.731
Perhaps you could manually set some clock sources?

morgad
Posts: 21
Joined: Sun Jan 29, 2012 10:24 pm
Contact: Website

Re: Whats wrong with my date

Wed Sep 19, 2012 7:46 pm

Try commenting out the 'server' line in your /etc/ntp.conf and replacing it with -

Code: Select all

pool pool.ntp.org iburst preempt
(you might need a

Code: Select all

tos minclock 3 maxclock 4
as well)

This will automatically replace unreachable clock sources with new ones from the pool.
The pool command is a new feature of recent ntp versions.

If that does not work please post your full ntp.conf file in case there is a problem somewhere else.

best regards
Dave

alfonso82
Posts: 10
Joined: Wed Nov 21, 2012 12:55 am

Re: Whats wrong with my date

Thu Nov 22, 2012 12:36 am

Hello I just got my pi a few weeks ago and I´m having the same problems with my NTP configuracion, did you found a solution for this issue dorijan? or is anyone out there that knows whats is wrong?

plugwash
Forum Moderator
Forum Moderator
Posts: 3614
Joined: Wed Dec 28, 2011 11:45 pm

Re: Whats wrong with my date

Fri Nov 23, 2012 4:17 am

do you have -g specified in /etc/default/ntp ?

alfonso82
Posts: 10
Joined: Wed Nov 21, 2012 12:55 am

Re: Whats wrong with my date

Sun Nov 25, 2012 2:42 am

Hi plugwash and thank you for replying, and the answer to your question is yes, this is what it shows in the /etc/default/ntp file.

Code: Select all

NTPD_OPTS='-g'
and that is it.

Return to “Raspberry Pi OS”