summaryrefslogtreecommitdiff
path: root/vbahelper
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2022-05-09 18:32:54 +0100
committerMike Kaganski <mike.kaganski@collabora.com>2022-05-10 06:58:24 +0200
commitbc1ab88ffa21ab67dbd56b5d3c724fe28c2b5a5b (patch)
treee83a3603ce8c27f5c0702cc3a5a0b4e583c65554 /vbahelper
parente5fb120a32d04e241b35a7e63894c744196f576b (diff)
More usual 1899-12-30 base Date in Basic
Omissions from commit 8189d815641c583b5506d482f0b4f1ab47924f6a Change-Id: I6b205f7bcc9ff9c30e55b03d39d02b9be15a01c4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134064 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'vbahelper')
-rw-r--r--vbahelper/source/vbahelper/vbaapplicationbase.cxx3
1 files changed, 1 insertions, 2 deletions
diff --git a/vbahelper/source/vbahelper/vbaapplicationbase.cxx b/vbahelper/source/vbahelper/vbaapplicationbase.cxx
index f5624d40bc9f..fe00e0c89739 100644
--- a/vbahelper/source/vbahelper/vbaapplicationbase.cxx
+++ b/vbahelper/source/vbahelper/vbaapplicationbase.cxx
@@ -75,9 +75,8 @@ public:
static double GetNow()
{
DateTime aNow( DateTime::SYSTEM );
- Date aRefDate( 1,1,1900 );
+ Date aRefDate(1899'12'30);
tools::Long nDiffDays = aNow - aRefDate;
- nDiffDays += 2; // Change VisualBasic: 1.Jan.1900 == 2
tools::Long nDiffSeconds = aNow.GetHour() * 3600 + aNow.GetMin() * 60 + aNow.GetSec();
return static_cast<double>(nDiffDays) + static_cast<double>(nDiffSeconds)/double(24*3600);