Time and date issue

how to set exact time in gl-AR 150 router.

Enable the NTP Client and specify your timezone.

Using Luci go to System->System and edit your system settings.

1 Like

Thanks for replaying. Issue is sometime router time not match with current time. sometime it will show two day back date and time.

Could you run the following command from SSH session and post a few lines from the output.

date; date -u ; ntpd -n -w -p 0.openwrt.pool.ntp.org

and also output for

uci show system.ntp

NTP might be blocked in hotels. I have seen it. Workaround, if you got internet connection

opkg update
opkg install wget

Edit in /etc/rc.local file

for site in www.example.com www.msn.com www.yahoo.com; do
   date --set "$(wget --no-check-certificate --server-response -qo- --no-hsts -T3 -t1 --spider https://$site|grep "^ *Date:"|head -1|awk 'BEGIN{IGNORECASE = 1; months="  JanFebMarAprMayJunJulAugSepOctNovDec"}{printf("%s-%02d-%d %s", $5,index(months,$4)/3,$3,$6)}')" --utc 2>/dev/null && break

exit 0

@sammo. if internet not working then how solved this issue.

root@GL-AR150:~# date; date -u ; ntpd -n -w -p 0.openwrt.pool.ntp.org Wed Sep 19 15:37:48 IST 2018 Wed Sep 19 10:07:48 UTC 2018 ntpd: bad address '0.openwrt.pool.ntp.org'

root@GL-AR150:~# uci show system.ntp system.ntp=timeserver system.ntp.server='0.openwrt.pool.ntp.org' '1.openwrt.pool.ntp.org' '2.openwrt.pool.ntp.org' '3.openwrt.pool.ntp.org' system.ntp.enabled='1'

gl ar150 does not have any battery back up. Buy a router which has or solder in a battery to the pcb

@sammo. Thanks for suggestion. may be battery has issue.

There is NO battery in the device which retains the clock

Use the preformatted [CTRL+SHIFT+C] text icon to display code etc.

@mbo2o Thanks for your valuable suggestion.


This is a problem, did you have internet access when you ran the command.

You might need to select a different NTP server either a public NTP server on the internet or one on your own local LAN if you don't have internet access.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.