From 01b47d46d76291ea338ecd5190e1e670f4ab890a Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Mon, 23 May 2016 11:56:31 +0200 Subject: [PATCH] include/timeutils: use pointer for time_t Signed-off-by: Karel Zak --- include/timeutils.h | 2 +- lib/timeutils.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/timeutils.h b/include/timeutils.h index 4b6098ae15..a1cd1b3530 100644 --- a/include/timeutils.h +++ b/include/timeutils.h @@ -64,6 +64,6 @@ enum { }; char *strtimeval_iso(struct timeval *tv, int flags); char *strtm_iso(struct tm *tm, int flags); -char *strtime_iso(time_t t, int flags); +char *strtime_iso(const time_t *t, int flags); #endif /* UTIL_LINUX_TIME_UTIL_H */ diff --git a/lib/timeutils.c b/lib/timeutils.c index c291043ede..bdc00d3375 100644 --- a/lib/timeutils.c +++ b/lib/timeutils.c @@ -376,9 +376,9 @@ char *strtm_iso(struct tm *tm, int flags) return format_iso_time(tm, 0, flags); } -char *strtime_iso(time_t t, int flags) +char *strtime_iso(const time_t *t, int flags) { - struct tm tm = *localtime(&t); + struct tm tm = *localtime(t); return format_iso_time(&tm, 0, flags); } -- 2.47.2