I'm running OpenWRT on a raspberry pi board and currently I don't have internet connectivity in the system.
LuCI's local time is off by a day and a couple of hours so every time I boot the system up I need to go to System > System and click on the "Sync with Browser" button.
Is there a way to automatically run a command/script to check the local system time and set on LuCI/OpenWrt after boot?
Set to what? Without connectivity to some authoritative time source this approach is conceptually impossible to implement.
you can/could buy an RTC addon to the RPi in the past, no idea if it works with openwrt though ...
Set to the same time as my local computer.
I see what you mean.
Since there's no computer connected to OpenWRT on system boot there's no way to set the time.
Why the time is off by a day, then? How OpenWRT knows the time but it's slightly off?
Sorry if this is a very basic question.
Without internet connectivity, you could get the current time via a GPS dongle, e.g. a VK-172 for around 10..15€.
That's not an rpi question, but a very OpenWrt specific one.
To get some time, OpenWrt searches for the newest file in /etc:
You can get a better approximation for the current time if you touch
a file in /etc before rebooting.
modules are not currently packaged for this board so you'd need a custom compile
make sure you get the 3.3v (or a module with shifters) otherwise it can be a pain if you have to do level shifting
This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.