Time is wrong even when using NTP

Post new topic   Reply to topic    DD-WRT Forum Index -> General Questions
Author Message
niclasc
DD-WRT Novice


Joined: 08 Aug 2014
Posts: 11

PostPosted: Fri Aug 08, 2014 20:52    Post subject: Time is wrong even when using NTP Reply with quote
I have a LP-LINK WDR4300 running the latest version of DD-WRT v24-sp2 (06/23/14) std - build 24461

I have enabled NTP and selected the right timezone and entered a valid NTP server.

The time syncs but it's 2 hours behind.

If the time is 09:00 then the router says 07:00

How can I fix this?

According to some sites there should be a setting for daylight savings time, But I have so such settings
Sponsor
mittelhessen
DD-WRT User


Joined: 26 Jan 2012
Posts: 458

PostPosted: Sat Aug 09, 2014 7:12    Post subject: Reply with quote
If time is syncing correctly it doesn't seem to be a problem with the ntp-server. It morely sounds like a problem with the timezone. Have you tried other timezones just for testing (e. g. +1 or -1 h of your timezone)?

As i read here in the forum, there seems to be very much problems with bulid 24461. Please have a look at:

http://www.dd-wrt.com/phpBB2/viewtopic.php?t=263149

If you can't fix your problem and if it seems to be a bug, post in in this thread above.
niclasc
DD-WRT Novice


Joined: 08 Aug 2014
Posts: 11

PostPosted: Sat Aug 09, 2014 9:30    Post subject: Reply with quote
OK, now I tried to change the timezone but no change in time. The time is always 2hours behind.

So the time settings seems to not work as expected.

Any idea when the next build is out?
mittelhessen
DD-WRT User


Joined: 26 Jan 2012
Posts: 458

PostPosted: Mon Aug 11, 2014 7:44    Post subject: Reply with quote
sm00x wrote:

The problem with NTP and timezones exists everywhere.


I can't confirm this! I'm using three Linksys WRT54G(L) as Routers/Access Points and none of this has a problem with getting the correct time from the ntp-server or using the correct timezone which i setted. The only "problem" is, that the time is only polled at a router restart, so there's no periodic resync. Time drifts away some seconds every day so this might be a problem if you don't restart your router e. g. one time per week. But: i solved this beahavior with a custom script so that the time get'S a sync every night.

@niclasc: Have you restarted your router after changing the setting?
niclasc
DD-WRT Novice


Joined: 08 Aug 2014
Posts: 11

PostPosted: Mon Aug 11, 2014 8:41    Post subject: Reply with quote
mittelhessen wrote:
sm00x wrote:

The problem with NTP and timezones exists everywhere.


I can't confirm this! I'm using three Linksys WRT54G(L) as Routers/Access Points and none of this has a problem with getting the correct time from the ntp-server or using the correct timezone which i setted. The only "problem" is, that the time is only polled at a router restart, so there's no periodic resync. Time drifts away some seconds every day so this might be a problem if you don't restart your router e. g. one time per week. But: i solved this beahavior with a custom script so that the time get'S a sync every night.

@niclasc: Have you restarted your router after changing the setting?


No I havent restarted my router. I thought the idea with NTP is that it should sync the time periodically. To just do this at boot sound badly implemented.

Can you share me your script that you run every night?
mittelhessen
DD-WRT User


Joined: 26 Jan 2012
Posts: 458

PostPosted: Mon Aug 11, 2014 8:54    Post subject: Reply with quote
niclasc wrote:

To just do this at boot sound badly implemented.


Yes, it is! Sad But i can't say if this behaviour matches all bulids or is just a problem of the builds i use with my WRT54G(L)s.

niclasc wrote:

Can you share me your script that you run every night?


Yes i can, but i haven't got the script running on my own router because i don't really need it. I'll have access to the the routers which which are running the script at the following weekend. Please send me a private message at the end of this week if i don't think about it any more. Smile
niclasc
DD-WRT Novice


Joined: 08 Aug 2014
Posts: 11

PostPosted: Mon Aug 11, 2014 8:55    Post subject: Reply with quote
Now I have rebooted my router and it still says "GMT" so NTP does NOT work.


Can I downgrade to a older build of ddwrt?
mittelhessen
DD-WRT User


Joined: 26 Jan 2012
Posts: 458

PostPosted: Mon Aug 11, 2014 8:57    Post subject: Reply with quote
niclasc wrote:

Now I have rebooted my router and it still says "GMT" so NTP does NOT work.


A NTP only transmits his own time but not the timezone! It doesn't know in which timezone you are. You have to set your correct timezone on your own and save and apply it.
niclasc
DD-WRT Novice


Joined: 08 Aug 2014
Posts: 11

PostPosted: Mon Aug 11, 2014 9:01    Post subject: Reply with quote
mittelhessen wrote:
niclasc wrote:

Now I have rebooted my router and it still says "GMT" so NTP does NOT work.


A NTP only transmits his own time but not the timezone! It doesn't know in which timezone you are. You have to set your correct timezone on your own and save and apply it.


Yes I have set my timezone. I had it set to "Europe/Stockholm". Thats GMT+2 and that didnt work. The time was GMT. 2 hours behind and when I checked with "date" it said GMT. I the tried "Europe/Kalingrad" which is GMT+4 but after a reboot it still 2 hours behind and "date" still says GMT
mittelhessen
DD-WRT User


Joined: 26 Jan 2012
Posts: 458

PostPosted: Mon Aug 11, 2014 9:15    Post subject: Reply with quote
There's no need for fullquote, so just answer on ne last post if you refer on it directly instead of using the quote-function. Smile



It seems, like your router doesn't save the timesettings reliablely. Could you please post a screenshot with the timesettings?
tracer87
DD-WRT Novice


Joined: 15 Aug 2014
Posts: 1

PostPosted: Fri Aug 15, 2014 21:12    Post subject: Reply with quote
i am even using build 24461 of DD-WRT on a TP-Link TL-WR1043ND router.
On this device i have the same issue. the displayed time is 2 hours behind my actual time.
i added screenshots i take just a few minutes ago. my timezone is GMT+1 with summertime i think.



screen1.png
 Description:
 Filesize:  8.53 KB
 Viewed:  20586 Time(s)

screen1.png


mittelhessen
DD-WRT User


Joined: 26 Jan 2012
Posts: 458

PostPosted: Sat Aug 16, 2014 10:02    Post subject: Reply with quote
niclasc wrote:

Can you share me your script that you run every night?


Add and enable the following cron-job:

Quote:

05 03 * * * root killall process_monitor
05 03 * * * root process_monitor


"05" is the minute and "03" is the hour when the time will be resynced.
rasputyn
DD-WRT Novice


Joined: 03 Jun 2011
Posts: 7

PostPosted: Thu Sep 11, 2014 14:25    Post subject: Reply with quote
+1 with time zone setting not affecting on #24461

Set to Europe/Zagreb, local (and working) ntp server and clock is two hours behind.

/tmp/tz says

CET-1CEST,M3.5.0,M10.5.0/3
CET-1CEST,M3.5.0,M10.5.0/3


How to adjust it?

Thanks.
mittelhessen
DD-WRT User


Joined: 26 Jan 2012
Posts: 458

PostPosted: Thu Sep 11, 2014 17:43    Post subject: Reply with quote
It seems to be fixed in newer builds but they aren't available yet on the public ftp because of a wifi-bug.
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> General Questions All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum