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