diff --git a/packages/mediacenter/kodi/patches/kodi-100.08-setup-timezone.patch b/packages/mediacenter/kodi/patches/kodi-100.08-setup-timezone.patch index f62ce2c9bc..e198d32207 100644 --- a/packages/mediacenter/kodi/patches/kodi-100.08-setup-timezone.patch +++ b/packages/mediacenter/kodi/patches/kodi-100.08-setup-timezone.patch @@ -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 @@ -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 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(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(setting)->GetValue()); CDateTime::ResetTimezoneBias(); -- -2.5.0 +2.7.4