* Set the ICU default time zone from the locale preflet. Unfortunately it looks like this doesn't solve all the problems

yet.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37768 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Adrien Destugues 2010-07-27 09:45:52 +00:00
parent ad47766b81
commit 1855b44cdf
3 changed files with 11 additions and 0 deletions

View File

@ -42,6 +42,7 @@ class BLocaleRoster {
status_t GetDefaultTimeZone(BTimeZone**timezone) const;
void SetDefaultCountry(BCountry *) const;
void SetDefaultTimeZone(const char* zone) const;
void UpdateSettings(BMessage* newSettings);
status_t GetLanguage(const char* languageCode, BLanguage** _language)

View File

@ -37,6 +37,7 @@
// ICU includes
#include <unicode/locid.h>
#include <unicode/timezone.h>
/*
@ -544,6 +545,13 @@ BLocaleRoster::SetDefaultCountry(BCountry* newDefault) const
}
void
BLocaleRoster::SetDefaultTimeZone(const char* zone) const
{
TimeZone::adoptDefault(TimeZone::createTimeZone(zone));
}
void
BLocaleRoster::UpdateSettings(BMessage* newSettings)
{

View File

@ -374,5 +374,7 @@ TimeZoneView::SetTimeZone(const char *zone)
{
putenv(BString("TZ=").Append(zone).String());
tzset();
be_locale_roster->SetDefaultTimeZone(zone);
}