On 2023-03-11 13:59, Alejandro Colomar wrote:
Unless the standard specifically allows us to do so, but I can't find
anything clear.

It's pretty clear if you're a time nerd like me. :-) The standard for strftime says "The appropriate characters are determined using the LC_TIME category of the current locale and by the values of zero or more members of the broken-down time structure pointed to by timeptr, as specified in brackets in the description. If any of the specified values are outside the normal range, the characters stored are unspecified."

The "zero" means that if no conversion specs are present in the format string, then no struct tm members are examined, and it's therefore OK for all members to be uninitialized if no conversion specs are present.

Reply via email to