klinfix: modify show datetime, add optional [iso] flag

By default, output human-friendly RFC2822 format rather than NETCONF:ish
ISO-8601 format.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
Joachim Wiberg
2023-08-08 16:35:18 +02:00
committed by Tobias Waldekranz
parent 697a907350
commit 30a28fe874
+6 -3
View File
@@ -159,7 +159,7 @@
</COMMAND>
<COMMAND name="set" help="Set" mode="switch">
<COMMAND name="datetime" help="Set current date and time">
<COMMAND name="datetime" help="Set current date and time, ISO-8601 format">
<PARAM name="current-datetime" ptype="/STRING" help="yyyy-mm-ddThh:mm:ss(Z|+/-hh:mm)"/>
<ACTION sym="klix_rpc@klinfix">/ietf-system:set-current-datetime</ACTION>
</COMMAND>
@@ -193,8 +193,11 @@
</SWITCH>
</COMMAND>
<COMMAND name="datetime" help="Show current date and time">
<ACTION sym="script">date -Isec</ACTION>
<COMMAND name="datetime" help="Show current date and time, default RFC2822 format">
<ACTION sym="script">date -R</ACTION>
<COMMAND name="iso" min="0" help="NETCONF/ISO-8601 format">
<ACTION sym="script">date -Isec</ACTION>
</COMMAND>
</COMMAND>
<!-- https://www.cisco.com/c/en/us/td/docs/wireless/access_point/mob_exp/83/cmd-ref/me_cr_book/me_ports_and_interfaces_cli.html -->