summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/log_entry.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lib/log_entry.cc b/src/lib/log_entry.cc
index 9b399e4b6..7c0f68787 100644
--- a/src/lib/log_entry.cc
+++ b/src/lib/log_entry.cc
@@ -45,7 +45,8 @@ LogEntry::get () const
s << _time.tv_sec << ":" << _time.tv_usec;
} else {
char buffer[64];
- struct tm* t = localtime (&_time.tv_sec);
+ time_t const sec = _time.tv_sec;
+ struct tm* t = localtime (&sec);
strftime (buffer, 64, "%c", t);
string a (buffer);
s << a.substr (0, a.length() - 1) << N_(": ");