1 /* 2 * Copyright 2010, Haiku, Inc. All rights reserved. 3 * Distributed under the terms of the MIT License. 4 */ 5 #ifndef _TIME_ZONE_H 6 #define _TIME_ZONE_H 7 8 9 #include <String.h> 10 11 12 class BTimeZone { 13 public: 14 BTimeZone(const char* zoneCode = NULL); 15 ~BTimeZone(); 16 17 const BString& Code() const; 18 const BString& Name() const; 19 const BString& DaylightSavingName() const; 20 const BString& ShortName() const; 21 const BString& ShortDaylightSavingName() const; 22 int OffsetFromGMT() const; 23 bool SupportsDaylightSaving() const; 24 25 status_t InitCheck() const; 26 27 status_t SetTo(const char* zoneCode); 28 29 static const char* kNameOfGmtZone; 30 31 private: 32 BString fCode; 33 BString fName; 34 BString fDaylightSavingName; 35 BString fShortName; 36 BString fShortDaylightSavingName; 37 int fOffsetFromGMT; 38 bool fSupportsDaylightSaving; 39 40 status_t fInitStatus; 41 }; 42 43 44 #endif // _TIME_ZONE_H 45