strptime do not initialize all fields. So the undefined fields could end
in crash later on.
}
/* Convert the stuff into a tm struct */
}
/* Convert the stuff into a tm struct */
+ memset(&tm, 0, sizeof(tm)); /* Uh, strptime could let garbage in tm! */
if (text && strptime(text, "%Y:%m:%d %H:%M:%S", &tm))
{
buflen = strftime(buf, sizeof(buf), "%x %X", &tm);
if (text && strptime(text, "%Y:%m:%d %H:%M:%S", &tm))
{
buflen = strftime(buf, sizeof(buf), "%x %X", &tm);