summaryrefslogtreecommitdiffstats
path: root/runtime/datetime.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2013-01-08 13:07:47 +0100
committerRainer Gerhards <rgerhards@adiscon.com>2013-01-08 13:07:47 +0100
commit84f959d4f0dfb6a9e1dda43e17a97402b55d3314 (patch)
tree3d0d49eebd701cbc1690501688794f7eddbc7696 /runtime/datetime.c
parent7febb07e2a587c0646c155796ed1fa91f89682fb (diff)
parentbbb2066d17824f366d0f83a010cae6ebe99d4fa0 (diff)
downloadrsyslog-84f959d4f0dfb6a9e1dda43e17a97402b55d3314.tar.gz
rsyslog-84f959d4f0dfb6a9e1dda43e17a97402b55d3314.tar.bz2
rsyslog-84f959d4f0dfb6a9e1dda43e17a97402b55d3314.zip
Merge branch 'v7-stable'
Diffstat (limited to 'runtime/datetime.c')
-rw-r--r--runtime/datetime.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/runtime/datetime.c b/runtime/datetime.c
index c03abab9..7d974471 100644
--- a/runtime/datetime.c
+++ b/runtime/datetime.c
@@ -61,8 +61,10 @@ timeval2syslogTime(struct timeval *tp, struct syslogTime *t)
struct tm *tm;
struct tm tmBuf;
long lBias;
+ time_t secs;
- tm = localtime_r((time_t*) &(tp->tv_sec), &tmBuf);
+ secs = tp->tv_sec;
+ tm = localtime_r(&secs, &tmBuf);
t->year = tm->tm_year + 1900;
t->month = tm->tm_mon + 1;