summaryrefslogtreecommitdiff
path: root/components/drivers/rtc
diff options
context:
space:
mode:
authoraozima <[email protected]>2020-08-14 16:29:11 +0800
committeraozima <[email protected]>2020-08-14 16:29:11 +0800
commit79fd12842beeee5a653ba6f4bc2f08b21be7697a (patch)
tree841402b8580e1820179cc79f47f74bd649d49403 /components/drivers/rtc
parent6bf76a375c53c1de3f1a4b1d0f7fc6506833f6dd (diff)
parent5b94c1482e8e63f68ad2437cacf2e60e6737626a (diff)
Merge branch 'master' into gitee_master
Diffstat (limited to 'components/drivers/rtc')
-rw-r--r--components/drivers/rtc/rtc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/components/drivers/rtc/rtc.c b/components/drivers/rtc/rtc.c
index e17c0fe7dd..682515ce98 100644
--- a/components/drivers/rtc/rtc.c
+++ b/components/drivers/rtc/rtc.c
@@ -179,7 +179,7 @@ void list_date(void)
time_t now;
now = time(RT_NULL);
- rt_kprintf("%s\n", ctime(&now));
+ rt_kprintf("%.*s\n", 25, ctime(&now));
}
FINSH_FUNCTION_EXPORT(list_date, show date and time.)
@@ -194,7 +194,7 @@ static void date(uint8_t argc, char **argv)
time_t now;
/* output current time */
now = time(RT_NULL);
- rt_kprintf("%s", ctime(&now));
+ rt_kprintf("%.*s", 25, ctime(&now));
}
else if (argc >= 7)
{