summaryrefslogtreecommitdiff
path: root/libopie2/opiepim/core/otimezone.h
Unidiff
Diffstat (limited to 'libopie2/opiepim/core/otimezone.h') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiepim/core/otimezone.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/libopie2/opiepim/core/otimezone.h b/libopie2/opiepim/core/otimezone.h
index 28ae6cb..f0b4022 100644
--- a/libopie2/opiepim/core/otimezone.h
+++ b/libopie2/opiepim/core/otimezone.h
@@ -24,27 +24,31 @@
24 -- :-=` this library; see the file COPYING.LIB. 24 -- :-=` this library; see the file COPYING.LIB.
25 If not, write to the Free Software Foundation, 25 If not, write to the Free Software Foundation,
26 Inc., 59 Temple Place - Suite 330, 26 Inc., 59 Temple Place - Suite 330,
27 Boston, MA 02111-1307, USA. 27 Boston, MA 02111-1307, USA.
28*/ 28*/
29 29
30#ifndef OPIE_TIME_ZONE_H 30#ifndef OTIMEZONE_H
31#define OPIE_TIME_ZONE_H 31#define OTIMEZONE_H
32 32
33#include <time.h> 33/* QT */
34#include <qdatetime.h> 34#include <qdatetime.h>
35 35
36/* STD */
37#include <time.h>
38
36namespace Opie 39namespace Opie
37{ 40{
38/** 41/**
39 * A very primitive class to convert time 42 * A very primitive class to convert time
40 * from one timezone to another 43 * from one timezone to another
41 * and to localtime 44 * and to localtime
42 * and time_t 45 * and time_t
43 */ 46 */
44class OTimeZone { 47class OTimeZone {
48
45 public: 49 public:
46 typedef QString ZoneName; 50 typedef QString ZoneName;
47 OTimeZone( const ZoneName& = ZoneName::null ); 51 OTimeZone( const ZoneName& = ZoneName::null );
48 virtual ~OTimeZone(); // just in case. 52 virtual ~OTimeZone(); // just in case.
49 53
50 bool isValid()const; 54 bool isValid()const;
@@ -88,13 +92,14 @@ class OTimeZone {
88 */ 92 */
89 time_t fromUTCDateTime( const QDateTime& ); 93 time_t fromUTCDateTime( const QDateTime& );
90 94
91 static OTimeZone current(); 95 static OTimeZone current();
92 static OTimeZone utc(); 96 static OTimeZone utc();
93 97
94 QString timeZone()const; 98 QString timeZone() const;
99
95 private: 100 private:
96 ZoneName m_name; 101 ZoneName m_name;
97 class Private; 102 class Private;
98 Private* d; 103 Private* d;
99}; 104};
100}; 105};