When strftime lets you down
int iret = strftime(szLargeBuffer, sizeof(szLargeBuffer), "%d %b %Y %H:%M:%S GMT", gmtime(&node->mtime));
iret == 0, it should have worked, but szLargeBuffer is not changed at all.
What is going on?!?
Passing a too large length to strftime will cause this silent failure, make you "loose" precious time.
Solution is to use a small buffer size such as 100.
Recent Comments