From 9b060b608ea0b2ea4e9dbedf04c8401d26d23194 Mon Sep 17 00:00:00 2001 From: ftomei Date: Sun, 18 Aug 2024 23:12:45 +0200 Subject: [PATCH] fix date --- bin/CRITERIA3D/mainwindow.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/bin/CRITERIA3D/mainwindow.cpp b/bin/CRITERIA3D/mainwindow.cpp index bc4a2a1b3..e40249b01 100644 --- a/bin/CRITERIA3D/mainwindow.cpp +++ b/bin/CRITERIA3D/mainwindow.cpp @@ -750,7 +750,12 @@ void MainWindow::updateDateTime() void MainWindow::updateModelTime() { QDate date = myProject.getCurrentDate(); - int hour = myProject.getCurrentHour(); + int hour = myProject.getCurrentHour() - 1; + if (hour == -1) + { + date = date.addDays(-1); + hour = 23; + } int minutes = int(floor(myProject.currentSeconds / 60)); int seconds = myProject.currentSeconds - (minutes * 60); if (minutes == 60)