nsh_timcmds: display date using set format

Reference: https://www.geeksforgeeks.org/date-command-linux-examples/?ref=gcse#9-list-of-format-specifiers-used-with-date-command

Signed-off-by: yangjian11 <yangjian11@xiaomi.com>
This commit is contained in:
yangjian11
2024-01-26 11:04:33 +08:00
committed by Xiang Xiao
parent 61d1f37f5f
commit 09122debe9
2 changed files with 18 additions and 6 deletions

View File

@@ -182,7 +182,7 @@ static const struct cmdmap_s g_cmdmap[] =
#ifndef CONFIG_NSH_DISABLE_DATE
CMD_MAP("date", cmd_date,
1, 4, "[-s \"MMM DD HH:MM:SS YYYY\"] [-u]"),
1, 4, "[-s \"MMM DD HH:MM:SS YYYY\"] [-u] [+format]"),
#endif
#ifndef CONFIG_NSH_DISABLE_DD