* 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:
@@ -42,6 +42,7 @@ class BLocaleRoster {
|
|||||||
status_t GetDefaultTimeZone(BTimeZone**timezone) const;
|
status_t GetDefaultTimeZone(BTimeZone**timezone) const;
|
||||||
|
|
||||||
void SetDefaultCountry(BCountry *) const;
|
void SetDefaultCountry(BCountry *) const;
|
||||||
|
void SetDefaultTimeZone(const char* zone) const;
|
||||||
void UpdateSettings(BMessage* newSettings);
|
void UpdateSettings(BMessage* newSettings);
|
||||||
|
|
||||||
status_t GetLanguage(const char* languageCode, BLanguage** _language)
|
status_t GetLanguage(const char* languageCode, BLanguage** _language)
|
||||||
|
|||||||
@@ -37,6 +37,7 @@
|
|||||||
|
|
||||||
// ICU includes
|
// ICU includes
|
||||||
#include <unicode/locid.h>
|
#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
|
void
|
||||||
BLocaleRoster::UpdateSettings(BMessage* newSettings)
|
BLocaleRoster::UpdateSettings(BMessage* newSettings)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -374,5 +374,7 @@ TimeZoneView::SetTimeZone(const char *zone)
|
|||||||
{
|
{
|
||||||
putenv(BString("TZ=").Append(zone).String());
|
putenv(BString("TZ=").Append(zone).String());
|
||||||
tzset();
|
tzset();
|
||||||
|
|
||||||
|
be_locale_roster->SetDefaultTimeZone(zone);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user