diff --git a/QXlsx/source/xlsxutility.cpp b/QXlsx/source/xlsxutility.cpp index 30c9d4d7..63e4e21d 100644 --- a/QXlsx/source/xlsxutility.cpp +++ b/QXlsx/source/xlsxutility.cpp @@ -90,7 +90,7 @@ QVariant datetimeFromNumber(double num, bool is1904) num = num - 1; } - auto msecs = static_cast(std::lround(num * 1000 * 60 * 60 * 24.0)); + auto msecs = static_cast(num * 1000 * 60 * 60 * 24.0 + 0.5); if (is1904) msecs += msecs1904;