]> git.tdb.fi Git - libs/core.git/blob - source/time/timezone.h
Move non-oneliner functions out of RefPtr class declaration
[libs/core.git] / source / time / timezone.h
1 #ifndef MSP_TIME_TIMEZONE_H_
2 #define MSP_TIME_TIMEZONE_H_
3
4 #include "timedelta.h"
5
6 namespace Msp {
7 namespace Time {
8
9 class TimeZone
10 {
11 private:
12         std::string name;
13         TimeDelta offset;
14
15 public:
16         TimeZone();
17         TimeZone(int);
18         TimeZone(int, const std::string &);
19         
20         const std::string &get_name() const { return name; }
21         const TimeDelta &get_offset() const { return offset; }
22
23         static const TimeZone &utc();
24         static const TimeZone &local();
25 private:
26         static TimeZone platform_get_local_timezone();
27 };
28
29 } // namespace Time
30 } // namespace Msp
31
32 #endif