sc/source/core/tool/interpr2.cxx | 2 ++ 1 file changed, 2 insertions(+)
New commits: commit 7bc797fc5715dfd291554d84ba5fd821e9f30426 Author: Eike Rathke <er...@redhat.com> AuthorDate: Mon Nov 13 17:08:13 2023 +0100 Commit: Michael Stahl <michael.st...@allotropia.de> CommitDate: Tue Nov 14 11:13:06 2023 +0100 Resolves: tdf#127498 Force corrected TIMEVALUE() result Change-Id: I750a3251c3cf5e8cad4a37c7c4b646c0457f2dbe Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159389 Reviewed-by: Eike Rathke <er...@redhat.com> Tested-by: Jenkins (cherry picked from commit c5a49da6ddec01d0ef8f53dd92983cf6ebc7bad0) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159246 Reviewed-by: Michael Stahl <michael.st...@allotropia.de> diff --git a/sc/source/core/tool/interpr2.cxx b/sc/source/core/tool/interpr2.cxx index 67ec57fef9ab..12a48078440b 100644 --- a/sc/source/core/tool/interpr2.cxx +++ b/sc/source/core/tool/interpr2.cxx @@ -28,6 +28,7 @@ #include <sfx2/objsh.hxx> #include <svl/numformat.hxx> #include <svl/zforlist.hxx> +#include <tools/duration.hxx> #include <sal/macros.h> #include <osl/diagnose.h> @@ -922,6 +923,7 @@ void ScInterpreter::ScGetTimeValue() nFuncFmtType = SvNumFormatType::TIME; double fDateVal = rtl::math::approxFloor(fVal); double fTimeVal = fVal - fDateVal; + fTimeVal = ::tools::Duration(fTimeVal).GetInDays(); // force corrected PushDouble(fTimeVal); } else