diff options
Diffstat (limited to 'runit/svlogd.c')
-rw-r--r-- | runit/svlogd.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/runit/svlogd.c b/runit/svlogd.c index fe40cd890..f556c7db5 100644 --- a/runit/svlogd.c +++ b/runit/svlogd.c | |||
@@ -266,18 +266,18 @@ static char* wstrdup(const char *str) | |||
266 | /* NUL terminated */ | 266 | /* NUL terminated */ |
267 | static void fmt_time_human_30nul(char *s) | 267 | static void fmt_time_human_30nul(char *s) |
268 | { | 268 | { |
269 | struct tm *t; | 269 | struct tm *ptm; |
270 | struct timeval tv; | 270 | struct timeval tv; |
271 | 271 | ||
272 | gettimeofday(&tv, NULL); | 272 | gettimeofday(&tv, NULL); |
273 | t = gmtime(&(tv.tv_sec)); | 273 | ptm = gmtime(&tv.tv_sec); |
274 | sprintf(s, "%04u-%02u-%02u_%02u:%02u:%02u.%06u000", | 274 | sprintf(s, "%04u-%02u-%02u_%02u:%02u:%02u.%06u000", |
275 | (unsigned)(1900 + t->tm_year), | 275 | (unsigned)(1900 + ptm->tm_year), |
276 | (unsigned)(t->tm_mon + 1), | 276 | (unsigned)(ptm->tm_mon + 1), |
277 | (unsigned)(t->tm_mday), | 277 | (unsigned)(ptm->tm_mday), |
278 | (unsigned)(t->tm_hour), | 278 | (unsigned)(ptm->tm_hour), |
279 | (unsigned)(t->tm_min), | 279 | (unsigned)(ptm->tm_min), |
280 | (unsigned)(t->tm_sec), | 280 | (unsigned)(ptm->tm_sec), |
281 | (unsigned)(tv.tv_usec) | 281 | (unsigned)(tv.tv_usec) |
282 | ); | 282 | ); |
283 | /* 4+1 + 2+1 + 2+1 + 2+1 + 2+1 + 2+1 + 9 = */ | 283 | /* 4+1 + 2+1 + 2+1 + 2+1 + 2+1 + 2+1 + 9 = */ |