From 75a1ad8bdb46e3e889da2116ccba5f9af70b44e7 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Sun, 16 Nov 2014 16:45:56 +0900 Subject: [PATCH] src: format_iso8601: Fix invalid millisecond formatting --- src/util.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util.cc b/src/util.cc index 627223a8..67a9dd39 100644 --- a/src/util.cc +++ b/src/util.cc @@ -719,7 +719,7 @@ std::string format_iso8601(const std::chrono::system_clock::time_point& tp) char buf[128]; auto nwrite = strftime(buf, sizeof(buf), "%Y-%m-%dT%H:%M:%S", &tms); - snprintf(&buf[nwrite], sizeof(buf) - nwrite, ".%ldZ", t.count() % 1000); + snprintf(&buf[nwrite], sizeof(buf) - nwrite, ".%03ldZ", t.count() % 1000); return buf; }