mirror of
https://github.com/transmission/transmission
synced 2024-12-25 09:13:06 +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:
parent
5a2268289e
commit
b00b90c48c
1 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue