src: format_iso8601: Fix invalid millisecond formatting

This commit is contained in:
Tatsuhiro Tsujikawa 2014-11-16 16:45:56 +09:00
parent 5bac7f0ca6
commit 75a1ad8bdb
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}