mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-30 06:06:43 +00:00
kodi: update timezone patch
This commit is contained in:
parent
485e31f94d
commit
0f35098b4a
@ -11,10 +11,10 @@ tz-data.service
|
||||
1 file changed, 12 insertions(+)
|
||||
|
||||
diff --git a/xbmc/linux/LinuxTimezone.cpp b/xbmc/linux/LinuxTimezone.cpp
|
||||
index 7de8f8c..e278c6a 100644
|
||||
index 372c119..0759a3b 100644
|
||||
--- a/xbmc/linux/LinuxTimezone.cpp
|
||||
+++ b/xbmc/linux/LinuxTimezone.cpp
|
||||
@@ -42,6 +42,8 @@
|
||||
@@ -43,6 +43,8 @@
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
@ -23,23 +23,23 @@ index 7de8f8c..e278c6a 100644
|
||||
CLinuxTimezone::CLinuxTimezone() : m_IsDST(0)
|
||||
{
|
||||
char* line = NULL;
|
||||
@@ -159,6 +161,16 @@ void CLinuxTimezone::OnSettingChanged(const CSetting *setting)
|
||||
@@ -160,6 +162,16 @@ void CLinuxTimezone::OnSettingChanged(std::shared_ptr<const CSetting> setting)
|
||||
const std::string &settingId = setting->GetId();
|
||||
if (settingId == CSettings::SETTING_LOCALE_TIMEZONE)
|
||||
{
|
||||
+ std::ofstream out("/storage/.cache/timezone");
|
||||
+ if (out)
|
||||
+ {
|
||||
+ const std::string tz = std::string("TIMEZONE=") + ((CSettingString*)setting)->GetValue().c_str();
|
||||
+ const std::string tz = std::string("TIMEZONE=") + (std::static_pointer_cast<const CSettingString>(setting)->GetValue().c_str());
|
||||
+ out << tz << std::endl;
|
||||
+ out.flush();
|
||||
+ out.close();
|
||||
+ system("systemctl restart tz-data.service");
|
||||
+ }
|
||||
+
|
||||
SetTimezone(((CSettingString*)setting)->GetValue());
|
||||
SetTimezone(std::static_pointer_cast<const CSettingString>(setting)->GetValue());
|
||||
|
||||
CDateTime::ResetTimezoneBias();
|
||||
--
|
||||
2.5.0
|
||||
2.7.4
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user