]> git.tdb.fi Git - libs/core.git/blobdiff - source/time/timezone.h
Add support for time zones
[libs/core.git] / source / time / timezone.h
diff --git a/source/time/timezone.h b/source/time/timezone.h
new file mode 100644 (file)
index 0000000..699801d
--- /dev/null
@@ -0,0 +1,36 @@
+/* $Id$
+
+This file is part of libmspcore
+Copyright © 2008  Mikko Rasa, Mikkosoft Productions
+Distributed under the LGPL
+*/
+
+#ifndef MSP_TIME_TIMEZONE_H_
+#define MSP_TIME_TIMEZONE_H_
+
+#include "timedelta.h"
+
+namespace Msp {
+namespace Time {
+
+class TimeZone
+{
+private:
+       std::string name;
+       TimeDelta offset;
+
+public:
+       TimeZone();
+       TimeZone(int);
+       
+       const std::string &get_name() const { return name; }
+       const TimeDelta &get_offset() const { return offset; }
+
+       static const TimeZone &utc();
+       static const TimeZone &local();
+};
+
+} // namespace Time
+} // namespace Msp
+
+#endif