Qtopia library API Documentation

timeconversion.h

00001 /**********************************************************************
00002 ** Copyright (C) 2000-2002 Trolltech AS.  All rights reserved.
00003 **
00004 ** This file is part of the Qtopia Environment.
00005 **
00006 ** This file may be distributed and/or modified under the terms of the
00007 ** GNU General Public License version 2 as published by the Free Software
00008 ** Foundation and appearing in the file LICENSE.GPL included in the
00009 ** packaging of this file.
00010 **
00011 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
00012 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
00013 **
00014 ** See http://www.trolltech.com/gpl/ for GPL licensing information.
00015 **
00016 ** Contact info@trolltech.com if any conditions of this licensing are
00017 ** not clear to you.
00018 **
00019 **********************************************************************/
00020 
00021 #ifndef __timeconversion_h__
00022 #define __timeconversion_h__
00023 
00024 #include <time.h>
00025 #include <sys/types.h>
00026 #include <qdatetime.h>
00027 
00028 #include <qtopia/private/qpcglobal.h>
00029 
00030 class QPC_EXPORT TimeConversion
00031 {
00032 public:
00033     static QString toString( const QDate &d );
00034     static QDate fromString( const QString &datestr );
00035 
00036     static time_t toUTC( const QDateTime& dt );
00037     static QDateTime fromUTC( time_t time );
00038     static int secsTo( const QDateTime &from, const QDateTime &to );
00039 
00040     static QCString toISO8601( const QDate & );
00041     static QCString toISO8601( const QDateTime & );
00042     static QDateTime fromISO8601( const QCString & );
00043 };
00044 
00045 #endif // __timeconversion_h__
KDE Logo
This file is part of the documentation for OPIE Version 1.5.5.
Documentation copyright © 1997-2003 the KDE developers. 2003 OPIE developers
Generated on Tue Feb 10 20:24:08 2004 by doxygen 1.3.5 written by Dimitri van Heesch, © 1997-2001