Skip to content

Commit 053fb30

Browse files
c-pomergify[bot]
authored andcommitted
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. (cherry picked from commit 835126e)
1 parent 8aa626a commit 053fb30

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

op-mode-definitions/date.xml.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
<list>&lt;MMDDhhmm&gt; &lt;MMDDhhmmYY&gt; &lt;MMDDhhmmCCYY&gt; &lt;MMDDhhmmCCYY.ss&gt;</list>
3636
</completionHelp>
3737
</properties>
38-
<command>/bin/date "$3"</command>
38+
<command>sudo bash -c "/bin/date '$3' &amp;&amp; hwclock --systohc --localtime"</command>
3939
</tagNode>
4040
</children>
4141
</node>

0 commit comments

Comments
 (0)