diff --git a/src/log_database_proxy_model.cpp b/src/log_database_proxy_model.cpp index 1dd6ed9..8348205 100644 --- a/src/log_database_proxy_model.cpp +++ b/src/log_database_proxy_model.cpp @@ -429,7 +429,7 @@ QVariant LogDatabaseProxyModel::data( if (human_readable_time_) { char date_str[std::size("yyyy-mm-dd hh:mm:ss")]; const time_t time = static_cast(item.stamp.seconds()); - int32_t milliseconds = static_cast(1000.0 * (item.stamp.seconds() - static_cast(item.stamp.seconds()))); + int32_t milliseconds = static_cast(1000.0 * (item.stamp.seconds() - std::floor(item.stamp.seconds()))); std::strftime(std::data(date_str), std::size(date_str), "%F %T",