libopie PIM API Documentation

otimezone.h

Go to the documentation of this file.
00001 #ifndef OPIE_TIME_ZONE_H
00002 #define OPIE_TIME_ZONE_H
00003 
00004 #include <time.h>
00005 #include <qdatetime.h>
00006 
00013 class OTimeZone {
00014  public:
00015     typedef QString ZoneName;
00016     OTimeZone( const ZoneName&  = ZoneName::null );
00017     virtual ~OTimeZone(); // just in case.
00018 
00019     bool isValid()const;
00020 
00028     QDateTime toLocalDateTime( const QDateTime& dt );
00029 
00033     QDateTime toUTCDateTime( const QDateTime& dt );
00034 
00038     QDateTime fromUTCDateTime( time_t );
00039 
00043     QDateTime toDateTime( time_t );
00044 
00048     QDateTime toDateTime( const QDateTime&, const OTimeZone& timeZone );
00049 
00053     time_t fromDateTime( const QDateTime& );
00054 
00058     time_t fromUTCDateTime( const QDateTime& );
00059 
00060     static OTimeZone current();
00061     static OTimeZone utc();
00062 
00063     QString timeZone()const;
00064  private:
00065     ZoneName m_name;
00066     class Private;
00067     Private* d;
00068 };
00069 
00070 
00071 #endif
KDE Logo
This file is part of the documentation for OPIE Version 1.1.
Documentation copyright © 1997-2003 the KDE developers. 2003 OPIE developers
Generated on Tue Feb 10 20:25:21 2004 by doxygen 1.3.5 written by Dimitri van Heesch, © 1997-2001