mirror of
https://github.com/apache/nuttx.git
synced 2026-05-29 20:56:47 +08:00
strftime: Add support for the %T specifier
This commit is contained in:
committed by
Xiang Xiao
parent
097faac22f
commit
8684814e09
@@ -408,6 +408,15 @@ size_t strftime(FAR char *s, size_t max, FAR const char *format,
|
||||
}
|
||||
break;
|
||||
|
||||
/* %T: Shortcut for %H:%M:%S. */
|
||||
|
||||
case 'T':
|
||||
{
|
||||
len = snprintf(dest, chleft, "%02d:%02d:%02d",
|
||||
tm->tm_hour, tm->tm_min, tm->tm_sec);
|
||||
}
|
||||
break;
|
||||
|
||||
/* %w: The weekday as a decimal number (range 0 to 6). */
|
||||
|
||||
case 'w':
|
||||
|
||||
Reference in New Issue
Block a user