From 56a620ecfea50a5ecf2394044a020d3395e5568c Mon Sep 17 00:00:00 2001 From: "Alexander V. Wolf" Date: Fri, 20 Sep 2024 11:10:29 +0700 Subject: [PATCH] Fix compiling --- src/gui/AstroCalcAlmanacWidget.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/gui/AstroCalcAlmanacWidget.cpp b/src/gui/AstroCalcAlmanacWidget.cpp index 8272f52a82ef6..bfdee725fa9ce 100644 --- a/src/gui/AstroCalcAlmanacWidget.cpp +++ b/src/gui/AstroCalcAlmanacWidget.cpp @@ -220,7 +220,8 @@ void AstroCalcAlmanacWidget::setTodayTimes() return; const double JD = core->getJD(); - const double utcShift = core->getUTCOffset(JD) / 24.; // Fix DST shift... + const double utcOffsetHrs = core->getUTCOffset(JD); + const double utcShift = utcOffsetHrs / 24.; // Fix DST shift... PlanetP sun = GETSTELMODULE(SolarSystem)->getSun(); double duration, duration1, duration2; bool astronomicalTwilightBtn, nauticalTwilightBtn, civilTwilightBtn, sunBtn; @@ -367,7 +368,7 @@ void AstroCalcAlmanacWidget::setTodayTimes() civilTwilightDuration = StelUtils::hoursToHmsStr(duration, true); // fill the data - ui->labelToday->setText(QString("%1 (%2)").arg(q_("Today"), localeMgr->getPrintableDateLocal(JD))); + ui->labelToday->setText(QString("%1 (%2)").arg(q_("Today"), localeMgr->getPrintableDateLocal(JD, utcOffsetHrs))); ui->labelDayDuration->setText(dayDuration); ui->labelCivilTwilightBegin->setText(civilTwilightBegin);