2020-04-24 23:36:52 +00:00
|
|
|
Index: plasma-desktop-5.8.5/kcms/dateandtime/helper.cpp
|
|
|
|
===================================================================
|
|
|
|
--- plasma-desktop-5.8.5.orig/kcms/dateandtime/helper.cpp
|
|
|
|
+++ plasma-desktop-5.8.5/kcms/dateandtime/helper.cpp
|
|
|
|
@@ -48,10 +48,6 @@
|
2021-03-19 17:17:44 +00:00
|
|
|
#include <sys/types.h>
|
2020-04-24 23:36:52 +00:00
|
|
|
#endif
|
2021-03-19 17:17:44 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
-// We cannot rely on the $PATH environment variable, because D-Bus activation
|
|
|
|
-// clears it. So we have to use a reasonable default.
|
|
|
|
-static const QString exePath = QStringLiteral("/usr/sbin:/usr/bin:/sbin:/bin");
|
|
|
|
-
|
2021-03-19 17:17:44 +00:00
|
|
|
int ClockHelper::ntp(const QStringList &ntpServers, bool ntpEnabled)
|
2020-04-24 23:36:52 +00:00
|
|
|
{
|
|
|
|
int ret = 0;
|
|
|
|
@@ -227,7 +223,7 @@ int ClockHelper::tzreset()
|
|
|
|
|
|
|
|
void ClockHelper::toHwclock()
|
|
|
|
{
|
2020-09-25 04:45:31 +00:00
|
|
|
- QString hwclock = QStandardPaths::findExecutable(QStringLiteral("hwclock"), exePath.split(QLatin1Char(':')));
|
2020-04-24 23:36:52 +00:00
|
|
|
+ QString hwclock = QLatin1String(NIXPKGS_HWCLOCK);
|
|
|
|
if (!hwclock.isEmpty()) {
|
|
|
|
KProcess::execute(hwclock, QStringList() << QStringLiteral("--systohc"));
|
|
|
|
}
|