New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[settings] fixed: set timezone during initialization #4095
Conversation
Does this need to happen more generally to hit platforms besides linux? |
Using the OnSettingUpdate() is not the right way to go. The proper way to do this is to manually set the timezone on linux during startup after having loaded the settings. That's how it works for everything else as well (resolution, gui language etc). @t-nelson: IIRC only linux has a timezone implementation right now. |
@Montellese: OK, I couldn't remember if the other platforms diddled TZ or @vkosh: I was also questioning the implementation via the update callback. |
darwin does. |
@t-nelson: I think CApplication::Initialize is also not correct place for setting TZ, because, for example, switching between profiles with the different TZ settings will not work in this case. |
As @davilla has pointed out, darwin also diddles TZ. So, CLinuxTimezone |
Looks like it's another regression. So, I think the PR should be rewritten as I mentioned above. And the second PR should be created to support platforms that were supported in Frodo. |
Here is the new patch for tz initialization. I use TARGET_LINUX as the rest CLinuxTimezone callbacks currently registered for this target only. The other platforms support will be added in another PR. |
@@ -170,6 +170,17 @@ void CLinuxTimezone::OnSettingChanged(const CSetting *setting) | |||
} | |||
} | |||
|
|||
void CLinuxTimezone::OnSettingsLoaded() | |||
{ | |||
CSettingString *setting = (CSettingString*)CSettings::Get().GetSetting("locale.timezone"); |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Yup looks like I missed the fact that darwin also handles timezones probably because of the name of CLinuxTimezone. |
@Montellese: thanks, fixed |
jenkins build this please |
looks like a problem with jenkins |
jenkins build this please |
Manual droid86 build queued at http://jenkins.xbmc.org/job/XBMC-Android-X86/227/ |
[settings] fixed: set timezone during initialization
IIRC, TARGET_LINUX is true for android, too, and this seems to cause a regression there... |
I can't repro, but I have a test build going at I'll post the link in that thread when it's done. |
This sets timezone during xbmc loading.
To reproduce the bug: