summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tools/accounting/getdelays.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/tools/accounting/getdelays.c b/tools/accounting/getdelays.c
index 368a622ca027..caa5fe9dd573 100644
--- a/tools/accounting/getdelays.c
+++ b/tools/accounting/getdelays.c
@@ -241,13 +241,7 @@ static const char *format_timespec(struct __kernel_timespec *ts)
if (localtime_r(&time_sec, &tm_info) == NULL)
return "N/A";
- snprintf(buffer, sizeof(buffer), "%04d-%02d-%02dT%02d:%02d:%02d",
- tm_info.tm_year + 1900,
- tm_info.tm_mon + 1,
- tm_info.tm_mday,
- tm_info.tm_hour,
- tm_info.tm_min,
- tm_info.tm_sec);
+ strftime(buffer, sizeof(buffer), "%Y-%m-%dT%H:%M:%S", &tm_info);
return buffer;
}