strftime() problem..

While using strftime() function I found out that we cannot use a complete time information (eg. HH:MM:SS) using format specifier like %T or other specifiers which use all the three components. It produces wierd result string.

–meph++

What do you put in and what do you get out? Maybe the buffer you provide for the result is too small?

I see now. So I have to make the buffer one character longer than the output string? Reserved for the terminating null character? I didn’t have this problem when I run the same application under Windows :unamused:

I just read the man page, seems maxsize includes the null char, but they could have made it a little clearer, IMHO. Maybe on Windows it worked by pure chance, if memory after the buffer was already null, then it would work?