1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-25 01:03:01 +00:00

(trunk, libT) #5650: 'make log timestamp format configurable' -- timestamp expanded to include full date/time/tz info, patch by mike.dld

This commit is contained in:
Jordan Lee 2014-04-28 15:31:46 +00:00
parent 5a2268289e
commit b00b90c48c

View file

@ -159,9 +159,9 @@ tr_logGetTimeStr (char * buf, int buflen)
seconds = tv.tv_sec;
tr_localtime_r (&seconds, &now_tm);
strftime (tmp, sizeof (tmp), "%H:%M:%S", &now_tm);
strftime (tmp, sizeof (tmp), "%Y-%m-%d %H:%M:%S.%%03d %Z", &now_tm);
milliseconds = tv.tv_usec / 1000;
tr_snprintf (buf, buflen, "%s.%03d", tmp, milliseconds);
tr_snprintf (buf, buflen, tmp, milliseconds);
return buf;
}