src/corelib/tools/qdatetime.h
changeset 30 5dc02b23752f
parent 18 2f34d5167611
--- a/src/corelib/tools/qdatetime.h	Wed Jun 23 19:07:03 2010 +0300
+++ b/src/corelib/tools/qdatetime.h	Tue Jul 06 15:10:48 2010 +0300
@@ -230,10 +230,12 @@
     QDate date() const;
     QTime time() const;
     Qt::TimeSpec timeSpec() const;
+    qint64 toMSecsSinceEpoch() const;
     uint toTime_t() const;
     void setDate(const QDate &date);
     void setTime(const QTime &time);
     void setTimeSpec(Qt::TimeSpec spec);
+    void setMSecsSinceEpoch(qint64 msecs);
     void setTime_t(uint secsSince1Jan1970UTC);
 #ifndef QT_NO_DATESTRING
     QString toString(Qt::DateFormat f = Qt::TextDate) const;
@@ -249,6 +251,7 @@
     inline QDateTime toUTC() const { return toTimeSpec(Qt::UTC); }
     int daysTo(const QDateTime &) const;
     int secsTo(const QDateTime &) const;
+    qint64 msecsTo(const QDateTime &) const;
 
     bool operator==(const QDateTime &other) const;
     inline bool operator!=(const QDateTime &other) const { return !(*this == other); }
@@ -261,11 +264,14 @@
     int utcOffset() const;
 
     static QDateTime currentDateTime();
+    static QDateTime currentDateTimeUtc();
 #ifndef QT_NO_DATESTRING
     static QDateTime fromString(const QString &s, Qt::DateFormat f = Qt::TextDate);
     static QDateTime fromString(const QString &s, const QString &format);
 #endif
     static QDateTime fromTime_t(uint secsSince1Jan1970UTC);
+    static QDateTime fromMSecsSinceEpoch(qint64 msecs);
+    static qint64 currentMSecsSinceEpoch();
 
 #ifdef QT3_SUPPORT
     inline QT3_SUPPORT void setTime_t(uint secsSince1Jan1970UTC, Qt::TimeSpec spec) {