* 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:
parent
ad47766b81
commit
1855b44cdf
@ -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)
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -374,5 +374,7 @@ TimeZoneView::SetTimeZone(const char *zone)
|
||||
{
|
||||
putenv(BString("TZ=").Append(zone).String());
|
||||
tzset();
|
||||
|
||||
be_locale_roster->SetDefaultTimeZone(zone);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user