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;
|
|
|
|
int OffsetFromGMT() 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;
|
|
|
|
int fOffsetFromGMT;
|
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
|