strftime: Add support for the %T specifier

This commit is contained in:
Xavier Del Campo
2022-10-25 08:54:28 +02:00
committed by Xiang Xiao
parent 097faac22f
commit 8684814e09
+9
View File
@@ -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':