diff --git a/src/blackconfig/buildconfig.cpp b/src/blackconfig/buildconfig.cpp
index dd8b51e3d..a5839564e 100644
--- a/src/blackconfig/buildconfig.cpp
+++ b/src/blackconfig/buildconfig.cpp
@@ -409,12 +409,18 @@ namespace BlackConfig
{
if (buildTimestamp.isValid())
{
- static const qint64 dt2017 = QDateTime::fromString("20170101000000", "yyyyMMddHHmmss").toMSecsSinceEpoch();
- const qint64 msSinceEpoch = buildTimestamp.toMSecsSinceEpoch();
- const qint64 msSinceSwiftEpoch = msSinceEpoch - dt2017;
- return msSinceSwiftEpoch / 1000; // accuraccy second should be enough, and is shorter
+ const QString bts = buildTimestamp.toString("yyyyMMddHHmm");
+ bool ok;
+ const long long btsll = bts.toLongLong(&ok); // at least 64bit
+ if (!ok) { return 0; }
+ // now we have to converto int
+ // max 2147483647 (2^31 - 1)
+ // 1MMddHHmm (years since 2010)
+ const long long yearOffset = 201000000000;
+ const int btsInt = btsll - yearOffset;
+ return btsInt;
}
- return 0; // intentionally 0 and not zero => 0.7.3.0 <-
+ return 0; // intentionally 0 => 0.7.3.0 <-
}
} // ns
diff --git a/src/blackgui/components/distributioninfocomponent.cpp b/src/blackgui/components/distributioninfocomponent.cpp
index 1ff8381ad..0cda9cd2b 100644
--- a/src/blackgui/components/distributioninfocomponent.cpp
+++ b/src/blackgui/components/distributioninfocomponent.cpp
@@ -165,8 +165,8 @@ namespace BlackGui
if (!downloadUrl.isEmpty())
{
const QString urlStr(downloadUrl.toQString());
- const QString hl("
%2 %3");
- ui->lbl_NewVersionUrl->setText(hl.arg(urlStr, latestVersionStr, currentPlatform));
+ const QString hl("
%2");
+ ui->lbl_NewVersionUrl->setText(hl.arg(urlStr, currentPlatform));
ui->lbl_NewVersionUrl->setToolTip("Download '" + latestVersionStr + "' " + m_currentDistribution.getFilename(currentPlatform));
}
}