Posted: Sun Feb 11, 2018 11:50 Post subject: Time keeps resetting to 6pm after every reboot
Hi all, I'm trying to setup Express VPN but it will not work because of the routers time... I look at the time and it's reset to 6pm exactly every single time I reboot the router.
I disabled the ntp client, it still resets
I enabled it, and changed the server to pool.ntp.org, it still does it
I change the time zone, that moves the clock... My zone is -6gmt so obviously the clock is just reseting back to 00:00 at every reboot.
In running a TP LINK ARCHER C9 with the latest v3.0
* Converting the time into YYYYMMDDHHMM.SS using sed and awk
curl -I 'http://www.google.com/' 2&>/dev/null | grep -i '^date:' | sed 's/^[Dd]ate: //g' | awk 'BEGIN{months=" JanFebMarAprMayJunJulAugSepOctNovDec"}{printf("%s%02d%s%s", $4, index(months,$3)/3,$2,$5)}' | sed 's/://' | sed 's/:/./'
Result: 201802090858.49
* the full command-line by calling "date --utc -s" with "`curl .....`" as parameter
date --utc -s `curl -I 'http://www.google.com/' 2&>/dev/null | grep -i '^date:' | sed 's/^[Dd]ate: //g' | awk 'BEGIN{months=" JanFebMarAprMayJunJulAugSepOctNovDec"}{printf("%s%02d%s%s", $4, index(months,$3)/3,$2,$5)}' | sed 's/://' | sed 's/:/./'`
FYI, you could just paste this command-line into Administration -> Command Shell -> Commands and hit "Save Startup"!
So I added this to the Administration > Commands > Save Startup:
---
date --utc -s `curl -I 'http://www.google.com/' 2&>/dev/null | grep -i '^date:' | sed 's/^[Dd]ate: //g' | awk 'BEGIN{months=" JanFebMarAprMayJunJulAugSepOctNovDec"}{printf("%s%02d%s%s", $4, index(months,$3)/3,$2,$5)}' | sed 's/://' | sed 's/:/./'`
---
But it's not fixing the clock...
Do I also need to add the Curling and Convert string that you have above? And if so, where do I put this?
FYI I'm in the US is this makes a difference.