2010-07-23 13:19:33 +00:00
|
|
|
/*
|
2010-07-29 20:10:26 +00: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 13:19:33 +00:00
|
|
|
|
|
|
|
|
2010-07-29 20:10:26 +00:00
|
|
|
#include <String.h>
|
2010-07-23 13:19:33 +00:00
|
|
|
|
|
|
|
|
2010-07-29 20:10:26 +00:00
|
|
|
class BTimeZone {
|
|
|
|
public:
|
|
|
|
BTimeZone(const char* zoneCode = NULL);
|
|
|
|
~BTimeZone();
|
2010-07-23 13:19:33 +00:00
|
|
|
|
2010-07-29 20:10:26 +00:00
|
|
|
const BString& Code() const;
|
|
|
|
const BString& Name() const;
|
2010-08-05 21:44:38 +00:00
|
|
|
const BString& DaylightSavingName() const;
|
|
|
|
const BString& ShortName() const;
|
|
|
|
const BString& ShortDaylightSavingName() const;
|
2010-07-29 20:10:26 +00:00
|
|
|
int OffsetFromGMT() const;
|
2010-08-05 21:44:38 +00:00
|
|
|
bool SupportsDaylightSaving() const;
|
2010-07-23 13:19:33 +00:00
|
|
|
|
2010-07-29 20:10:26 +00:00
|
|
|
status_t InitCheck() const;
|
|
|
|
|
2010-08-01 20:28:19 +00:00
|
|
|
status_t SetTo(const char* zoneCode);
|
|
|
|
|
|
|
|
static const char* kNameOfGmtZone;
|
2010-07-23 13:19:33 +00:00
|
|
|
|
2010-08-01 20:28:19 +00:00
|
|
|
private:
|
2010-07-29 20:10:26 +00:00
|
|
|
BString fCode;
|
|
|
|
BString fName;
|
2010-08-05 21:44:38 +00:00
|
|
|
BString fDaylightSavingName;
|
|
|
|
BString fShortName;
|
|
|
|
BString fShortDaylightSavingName;
|
2010-07-29 20:10:26 +00:00
|
|
|
int fOffsetFromGMT;
|
2010-08-05 21:44:38 +00:00
|
|
|
bool fSupportsDaylightSaving;
|
2010-07-23 13:19:33 +00:00
|
|
|
|
2010-07-29 20:10:26 +00:00
|
|
|
status_t fInitStatus;
|
2010-07-23 13:19:33 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2010-07-29 20:10:26 +00:00
|
|
|
#endif // _TIME_ZONE_H
|