Firmware version Kernel versin 4.4.60; OpenWrt 21.02-SNAPSHOT r16399+173-c67509efd7;
Admin Panel v4.6.8
Problem description: device doesn't update time when turned on.
When the device is turned on, it has the time settings from the moment it was off. Say, it was turned off on Tuesday 12:00, when turned on on Wednesday 08:00 it would has internal time of Tuesday 12:00. That impedes its functioning, e.g. VPN client wouldn't establish connection with the VPN server because of the time drift. Which isn't good for a travel router. The workaround is the manual action of logging into the admin panel, and changing the timezone + sync with the browser.
Question: is there a way to make the device auto-sync with NTP on start up? A startup script or something?
I do see that the time is indeed sync'ed UNLESS I leave the VPN client ON (WireGuard). When the VPN client is off before turning off the device, the time is picked upon startup. When the VPN client is enabled during the switching of the device off - which is my default mode of operations - the device doesn't sync the time on startup, and it can't connect to VPN.
My guess, this happens because I'm using the simplest possible configuration of "Global Proxy", and the request to the NTP server is stuck because the VPN tunnel isn't established, whereas the VPN tunnel can't be established because of the time discrepancy, in a chicken-egg fashion of a problem.
Thanks for the pointers!
Q: how do you enable/disable NTP? Luci -> System -> Time Sync -> enable NTP client? or Luci -> System -> Startup start/stop?
Also, is there a way to force NTP sync from ssh?
Getting inconclusive results so far, will try again in a week.