2010-07-23 17:19:33 +04:00
|
|
|
/*
|
2010-07-30 00:10:26 +04:00
|
|
|
* Copyright 2010, Haiku, Inc. All rights reserved.
|
|
|
|
* Distributed under the terms of the MIT License.
|
|
|
|
*/
|
|
|
|
#ifndef _TIME_ZONE_H
|
|
|
|
#define _TIME_ZONE_H
|
2010-07-23 17:19:33 +04:00
|
|
|
|
|
|
|
|
2010-07-30 00:10:26 +04:00
|
|
|
#include <String.h>
|
2010-07-23 17:19:33 +04:00
|
|
|
|
|
|
|
|
2010-07-30 00:10:26 +04:00
|
|
|
class BTimeZone {
|
|
|
|
public:
|
|
|
|
BTimeZone(const char* zoneCode = NULL);
|
|
|
|
~BTimeZone();
|
2010-07-23 17:19:33 +04:00
|
|
|
|
2010-07-30 00:10:26 +04:00
|
|
|
const BString& Code() const;
|
|
|
|
const BString& Name() const;
|
2010-08-06 01:44:38 +04:00
|
|
|
const BString& DaylightSavingName() const;
|
|
|
|
const BString& ShortName() const;
|
|
|
|
const BString& ShortDaylightSavingName() const;
|
2010-07-30 00:10:26 +04:00
|
|
|
int OffsetFromGMT() const;
|
2010-08-06 01:44:38 +04:00
|
|
|
bool SupportsDaylightSaving() const;
|
2010-07-23 17:19:33 +04:00
|
|
|
|
2010-07-30 00:10:26 +04:00
|
|
|
status_t InitCheck() const;
|
|
|
|
|
2010-08-02 00:28:19 +04:00
|
|
|
status_t SetTo(const char* zoneCode);
|
|
|
|
|
|
|
|
static const char* kNameOfGmtZone;
|
2010-07-23 17:19:33 +04:00
|
|
|
|
2010-08-02 00:28:19 +04:00
|
|
|
private:
|
2010-07-30 00:10:26 +04:00
|
|
|
BString fCode;
|
|
|
|
BString fName;
|
2010-08-06 01:44:38 +04:00
|
|
|
BString fDaylightSavingName;
|
|
|
|
BString fShortName;
|
|
|
|
BString fShortDaylightSavingName;
|
2010-07-30 00:10:26 +04:00
|
|
|
int fOffsetFromGMT;
|
2010-08-06 01:44:38 +04:00
|
|
|
bool fSupportsDaylightSaving;
|
2010-07-23 17:19:33 +04:00
|
|
|
|
2010-07-30 00:10:26 +04:00
|
|
|
status_t fInitStatus;
|
2010-07-23 17:19:33 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2010-07-30 00:10:26 +04:00
|
|
|
#endif // _TIME_ZONE_H
|