diff --git a/dbms/src/Common/UnifiedLogPatternFormatter.h b/dbms/src/Common/UnifiedLogPatternFormatter.h index 3a6fb58230d..e2db084f63e 100644 --- a/dbms/src/Common/UnifiedLogPatternFormatter.h +++ b/dbms/src/Common/UnifiedLogPatternFormatter.h @@ -121,7 +121,7 @@ std::string UnifiedLogPatternFormatter::getTimestamp() const int hour = local_tm->tm_hour; int minute = local_tm->tm_min; int second = local_tm->tm_sec; - int milliseconds = std::chrono::duration_cast(time_point.time_since_epoch()).count() % 1000000 / 1000; + int milliseconds = std::chrono::duration_cast(time_point.time_since_epoch()).count() % 1000; int zone_offset = local_tm->tm_gmtoff;