From 835126e249c1a8b7ae87ac169a8eb9d2df979249 Mon Sep 17 00:00:00 2001 From: Christian Breunig Date: Sun, 15 Sep 2024 11:49:37 +0200 Subject: op-mode: T6715: manually changing time/date is not synced into hardware clock When not using NTP and adjusting the current system time/date using set date the time is not saved across a reboot into the hardware RTC. This commit explicitly syncs the current time after a change into the systems RTC. Most routers do not run without NTP (which is even a VyOS default) so the priority is pretty low. --- op-mode-definitions/date.xml.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/op-mode-definitions/date.xml.in b/op-mode-definitions/date.xml.in index 6d8586025..4e62a8335 100644 --- a/op-mode-definitions/date.xml.in +++ b/op-mode-definitions/date.xml.in @@ -35,7 +35,7 @@ <MMDDhhmm> <MMDDhhmmYY> <MMDDhhmmCCYY> <MMDDhhmmCCYY.ss> - /bin/date "$3" + sudo bash -c "/bin/date '$3' && hwclock --systohc --localtime" -- cgit v1.2.3