mirror of
https://review.haiku-os.org/haiku
synced 2025-01-23 14:54:49 +01:00
750e57b842
* use upon-demand initialization in BTimeZone to avoid unnecessary work * renamed BTimeZone::Code() to BTimeZone::ID() and adjusted all callers * avoid using BCountry in the Time preflet for the time being, this means the icon-flags are gone for now (but they could be re-added if the demand is pressing ;-) * group the timezones by regions and then by country instead The performance improvement is considerable and I personally think the new grouping is an improvement, too. Please share your thoughts! git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38322 a95241bf-73f2-0310-859d-f6bbb57e9c96
55 lines
1.2 KiB
C++
55 lines
1.2 KiB
C++
/*
|
|
* Copyright 2010, Haiku, Inc. All rights reserved.
|
|
* Distributed under the terms of the MIT License.
|
|
*/
|
|
#ifndef _TIME_ZONE_H
|
|
#define _TIME_ZONE_H
|
|
|
|
|
|
#include <String.h>
|
|
|
|
|
|
namespace icu_44 {
|
|
class TimeZone;
|
|
}
|
|
|
|
|
|
class BTimeZone {
|
|
public:
|
|
BTimeZone(const char* zoneID = NULL);
|
|
BTimeZone(const BTimeZone& other);
|
|
~BTimeZone();
|
|
|
|
BTimeZone& operator=(const BTimeZone& source);
|
|
|
|
const BString& ID() const;
|
|
const BString& Name() const;
|
|
const BString& DaylightSavingName() const;
|
|
const BString& ShortName() const;
|
|
const BString& ShortDaylightSavingName() const;
|
|
int OffsetFromGMT() const;
|
|
bool SupportsDaylightSaving() const;
|
|
|
|
status_t InitCheck() const;
|
|
|
|
status_t SetTo(const char* zoneID);
|
|
|
|
static const char* kNameOfGmtZone;
|
|
|
|
private:
|
|
icu_44::TimeZone* fIcuTimeZone;
|
|
status_t fInitStatus;
|
|
|
|
mutable uint32 fInitializedFields;
|
|
mutable BString fZoneID;
|
|
mutable BString fName;
|
|
mutable BString fDaylightSavingName;
|
|
mutable BString fShortName;
|
|
mutable BString fShortDaylightSavingName;
|
|
mutable int fOffsetFromGMT;
|
|
mutable bool fSupportsDaylightSaving;
|
|
};
|
|
|
|
|
|
#endif // _TIME_ZONE_H
|