Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions components/drivers/rtc/rtc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.)

Expand All @@ -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)
{
Expand Down