What's new

How to set time and date on RT-N66U?

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

Marsha

New Around Here
I see there is a NTP server (pool.ntp.org) but no obvious way to cause it to update. After 4 hours, I'd like the time & date to not be 3 years old. :confused:

marsha
 
Assuming that the router is connected to the WAN, once you reboot the router it should automatically go out and grab the time. The other option is to set the time manually through the command-line.
 
I see there is a NTP server (pool.ntp.org) but no obvious way to cause it to update. After 4 hours, I'd like the time & date to not be 3 years old. :confused:

marsha

It can take a reboot like other commenter suggested, or sometimes even overnight. I've learned to put in the NTP settings, and I don't even look at it again for a day to see if it's in there, and I'm batting a thousand. ;)
 
Assuming that the router is connected to the WAN, once you reboot the router it should automatically go out and grab the time. The other option is to set the time manually through the command-line.

Well, it's in AP mode so nothing is connected to the WAN port. Does that affect the NTP action?
 
Well, it's in AP mode so nothing is connected to the WAN port. Does that affect the NTP action?

If it has a connection to the internet via any port it will eventually query the NTP servers, it doesn't just look at WAN.

I have wireless bridges that will do that over wifi only connection to WAN/LAN and it works no problem (after about a day).
 
Is there a way to just sync the router's time to the PC time? would rather have it set by machine than set with the date command which would be (slightly) less accurate. many other network devices support sync to pc time. Maybe I just don't understand the command to type. haven't been successful with rdate.
 
The computer would need to run an ntp server.

The syntax for the "date" command looks like this:

Code:
date -s "2013-09-20 12:00"
 
Is there a way to just sync the router's time to the PC time? would rather have it set by machine than set with the date command which would be (slightly) less accurate. many other network devices support sync to pc time. Maybe I just don't understand the command to type. haven't been successful with rdate.

Here is a program for Win to do it. . .if you really want to:

Here are the pool.ntp.org server zones, they encourage you to use one that is on your continent for best performance isntead of pool.ntp.org (though that should still work, regardless).

And if you live in the US and want to use the government NIST system you can just set your device to use time.nist.gov, though here are the individual servers that comprise it.

Theoretically, places that use daylight savings should use time.nist.gov or a geographically specific pool.ntp.org server because they support better handling of DST correction (if I'm understanding it correctly).

FWIW they also say it's not best practice to point at a specific server, you should use the geographic, or universal ones, for most trouble free connection.
 
Well, it's in AP mode so nothing is connected to the WAN port. Does that affect the NTP action?

I was under the impression that you are supposed to connect the Ethernet cable to the wan port when in ap mode??
 
I was under the impression that you are supposed to connect the Ethernet cable to the wan port when in ap mode??

@Jlake you are correct I was thinking of a router vs AP distinction (as I have multiple APs connected to a switch downstream of my router, but that's not what's happening here, and even so my APs do connect to my switch on *their* WAN ports). I just wasn't thinking straight at all.

Sorry @OP if my brain freeze misled you! Yes your device has to see the outside world in some way, and if your Asus is set to AP mode then it's probably going to be through the WAN port.
 
The computer would need to run an ntp server.

The syntax for the "date" command looks like this:

Code:
date -s "2013-09-20 12:00"

Pardon me for being thick headed, I'm trying to understand what it's doing as well as how to make it work. I'm running win XP home and as far as I know I do not have an ntp server running, maybe it's built in and background. I set the address for the ntp server to be the ip address of my computer and clicked on the NTP-link for setting ntp date. The router is stand alone and is just running a lan, no connect to the internet. The NTP-Link button tried to pull up a page it couldn't connect to and failed. Later on I set my network card with static ip address and manually set the gateway to point to the router in the laptop's tcp settings as I was dinking with the firmware and couldn't access the router. Still unable to connect I power cycled the router, and to my surprise it did poll my laptop and set the time during it's bootup. It will NOT set the time if I have dhcp enabled on the laptop, but since the ip address and gateway was static, the router was able to set the time. It seems to me that whatever the router was doing during bootup should be able to be duplicated to get the router to set the time to the computer currently connected to the admin account...... or at the very least type something into Administration/console to get it to set the date from the locally connected computer. It seems as if it works under specific circumstances, I just don't know how to trip those circumstances at will without disabling dhcp on the laptop and power cycle the router. A simple power cycle of the router will not allow the time to be set if dhcp is enabled on the laptop, even if the laptop was previously connected.
I don't know or understand all the little parts involved, but I would like to. Hopefully I've provided enough information to point out where my understanding is lacking. I know on IRC (internet relay chat) there's a ctcp ping to get the clients time. Maybe it's using the same type of ping and then manipulating the reply to conform with date -s syntax. I wouldn't know how to create that ctcp ping from linux.
 
Pardon me for being thick headed, I'm trying to understand what it's doing as well as how to make it work. I'm running win XP home and as far as I know I do not have an ntp server running, maybe it's built in and background. I set the address for the ntp server to be the ip address of my computer and clicked on the NTP-link for setting ntp date. The router is stand alone and is just running a lan, no connect to the internet. The NTP-Link button tried to pull up a page it couldn't connect to and failed. Later on I set my network card with static ip address and manually set the gateway to point to the router in the laptop's tcp settings as I was dinking with the firmware and couldn't access the router. Still unable to connect I power cycled the router, and to my surprise it did poll my laptop and set the time during it's bootup. It will NOT set the time if I have dhcp enabled on the laptop, but since the ip address and gateway was static, the router was able to set the time. It seems to me that whatever the router was doing during bootup should be able to be duplicated to get the router to set the time to the computer currently connected to the admin account...... or at the very least type something into Administration/console to get it to set the date from the locally connected computer. It seems as if it works under specific circumstances, I just don't know how to trip those circumstances at will without disabling dhcp on the laptop and power cycle the router. A simple power cycle of the router will not allow the time to be set if dhcp is enabled on the laptop, even if the laptop was previously connected.
I don't know or understand all the little parts involved, but I would like to. Hopefully I've provided enough information to point out where my understanding is lacking. I know on IRC (internet relay chat) there's a ctcp ping to get the clients time. Maybe it's using the same type of ping and then manipulating the reply to conform with date -s syntax. I wouldn't know how to create that ctcp ping from linux.

Scroll up to post #8 and download the utility for the "Windows" hyperlink (first read that site over really really well and make sure you're doing this for a good reason that is better than the geographically distributed, redundant, balanced, and extremely accurate options already available at pool.ntp.org & time.nist.gov).
 
I'm trying to understand how things work on a granular level, that's always a good reason. I have several wireless devices that are able to sync time to the currently connected PC. How do THEY do it? What are they doing differently? Is there some java packet they are sending which polls the time from the current PC? Yes, I realize those questions are likely off topic. I don't really expect an answer to them, but if someone knows, then an answer would be nice. I ask these questions in the hopes that it will give the Big Players some ideas.
That being said, I have noticed ghosts in the machine. I did NOT install the software from post number 8. What I did was to reboot the router, reboot the laptop, log into the router and go to console and try to set the time there pointing to my currently connected pc. It failed 100% of the time out of 4 tries. Now this makes me scratch my head because I'm pretty certain that I got this to work WHEN I opened the clock to display the menu for setting internet time on my PC (maybe opening the clock on my pc is running a similar program in the background as in post 8?). But no, I can't duplicate that. I then hit start/run/cmd on the PC to get a dos window, telnet into the router and run
date
ntpd -t -p 192.168.86.9
date
This sets the time from my PC. Great, no extra running programs on the pc. Lets try it again, power cycle the router, power cycle the PC, do NOT click on the pc clock. Try to set the time through web/console, fail, lets try telnet

RT-N56U login: admin
Password:


BusyBox v1.21.1 (2013-09-01 13:22:44 KRAT) built-in shell (ash)
Enter 'help' for a list of built-in commands.

/home/root # date
Fri Jan 1 00:15:49 EST 2010
/home/root # ntpd -t -p 192.168.86.9
/home/root # date
Fri Jan 1 00:16:20 EST 2010
/home/root # ntpd -t -p 192.168.86.9
/home/root # date
Sat Sep 21 17:39:06 EDT 2013
/home/root #

As you can see, the date set failed the first time, but was successful on the second attempt seconds later. This shows me that it IS possible with no extra programs on the PC. Maybe it's crude and unrefined, but it is functional sometimes. Now I would like to understand why it failed on the first attempt, what made it work on the second? What are the small parts to the layer? Did I simply type in the date command too quickly after the ntpd command before it had a chance to sync the update? Most importantly is Why does this fail through the web gui console but is successful from telnet?

Yes I realize that my router is not exactly the same model as the one listed in the topic but I doubt there is much significant difference in how the time and date is being set. Hopefully I've provided enough information for others to duplicate results, and perhaps given others ideas that might result in a better method (html/java packet?).
 
Can I tell you guys something? This issue is the main reason I have not updated my firmware for a while. The problems I had trying to get the time and date right (including the strange DST settings) make the inconvenience of having to clear the nvram and re-enter all my setting pale into insignificance. This page either needs fields to enter the date/time manually or a button to force an NTP sync.

Something so basic should just not be this problematic.
 
Can I tell you guys something? This issue is the main reason I have not updated my firmware for a while. The problems I had trying to get the time and date right (including the strange DST settings) make the inconvenience of having to clear the nvram and re-enter all my setting pale into insignificance. This page either needs fields to enter the date/time manually or a button to force an NTP sync.

Something so basic should just not be this problematic.

The reason why having a field to manually enter the date and time is useless is that you would still need to relog to the webui after every single reboot to re-enter them. The router doesn't have an RTC, that's why it has to rely on NTP to obtain the correct date and time.
 
The reason why having a field to manually enter the date and time is useless is that you would still need to relog to the webui after every single reboot to re-enter them. The router doesn't have an RTC, that's why it has to rely on NTP to obtain the correct date and time.
There does not have to be a field, just a button so one can get the time from the server with a single click would do. IIRC even setting a local (UK) server was not sufficient. There was not a correct time zone that suited the UK; I had to use GMT (we are GMT +1 ATM) and some kindly-supplied DST settings from another user.
 
Last edited:
There does not have to be a field, just a button so one can get the time from the server with a single click would do. IIRC even setting a local (UK) server was not sufficient. There was not a correct time zone that suited the UK; I had to use GMT (we are GMT +1 ATM) and some kindly-supplied DST settings from another user.

In that case, having a button to force syncing with a server won't help you - the router still needs to have a properly configured DST to adjust the answer returned by the server.

DST has always been a pretty quirky area of Asuswrt. Mostly due to the fact that both the toolchain and the DST rules implemented by Asus are a bit long in the tooth and no longer up-to-date with current rules.
 
Can I tell you guys something? This issue is the main reason I have not updated my firmware for a while. The problems I had trying to get the time and date right (including the strange DST settings) make the inconvenience of having to clear the nvram and re-enter all my setting pale into insignificance. This page either needs fields to enter the date/time manually or a button to force an NTP sync.

Something so basic should just not be this problematic.

The "strange DST settings" are in there as an option because every country (and different regions within each country) has different rules regarding how and when they do or do not honor DST, so it gives you the flexibility of manually inputting the dates your switch does or does not occur. This became especially important after the 2006 US & parts of Canada switch when the vast majority of CE devices that previously adjusted date correctly for those consumers no longer updated properly.

In most cases, since that switch, any computing device that uses an NTP server to adjust its date & time and also takes a time zone selection has worked properly for me, with no need to manually tweak it. Some f/w like DD-WRT let you specify which of the two most common windows of DST you observe.

I just removed the NTP server in my UI, rebooted my router, verified it didn't know what time it was, inputted "time.nist.gov," clicked apply, and in less than 50 seconds my router was synced w/ NTP via time.nist.gov.

In post #8 on this thread I provided some links to point to where you can get more info on the two largest NTP server systems in North America, and generally they tell you to use the main URL (pool. . . . & time. .. . ) instead of specific servers to reduce problems.
 
That's great, but on a boat I have no internet uplink, but it's important that my network devices (gps, autohelm) agree on what time it is. Being able to quickly poke a button to do the update is important.
 
@ PrivateJoker

The DST settings were not intuitive. I have set my NTP server to the region that I am in (UK). TBH, I could not even tweak the time using the GMT +1 setting (as the UK is on GMT +1).

It is still not as easy as it should be. I shall store (your) post #8 for future reference, many thanks.

DrT
 

Similar threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top