summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@trolltech.com>2009-10-30 12:39:17 (GMT)
committerOlivier Goffart <ogoffart@trolltech.com>2009-10-30 12:39:17 (GMT)
commite95e69f7d1209cceacdef0f26416b93c1d83e8e0 (patch)
tree34f0de65b226f115c3f9119a8386461f2d60176a /src/corelib/tools
parent6edbe2ba4fd231d2fb9de25b861b3e25160ed8ca (diff)
parent7a2fbdaaf06e69b1b35c7e5560127ff5cd93f362 (diff)
downloadQt-e95e69f7d1209cceacdef0f26416b93c1d83e8e0.zip
Qt-e95e69f7d1209cceacdef0f26416b93c1d83e8e0.tar.gz
Qt-e95e69f7d1209cceacdef0f26416b93c1d83e8e0.tar.bz2
Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt into origin-4.6
Diffstat (limited to 'src/corelib/tools')
-rw-r--r--src/corelib/tools/qdatetime.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/corelib/tools/qdatetime.cpp b/src/corelib/tools/qdatetime.cpp
index 54465bb..db6435e 100644
--- a/src/corelib/tools/qdatetime.cpp
+++ b/src/corelib/tools/qdatetime.cpp
@@ -1855,7 +1855,7 @@ QTime QTime::currentTime()
t = localtime(&ltime);
#endif
Q_CHECK_PTR(t);
-
+
ct.mds = MSECS_PER_HOUR * t->tm_hour + MSECS_PER_MIN * t->tm_min + 1000 * t->tm_sec
+ tv.tv_usec / 1000;
#else
@@ -3725,11 +3725,11 @@ static QDateTimePrivate::Spec utcToLocal(QDate &date, QTime &time)
TTimeIntervalSeconds tTimeIntervalSecsSince1Jan1970UTC(secsSince1Jan1970UTC);
TTime epochTTime;
TInt err = epochTTime.Set(KUnixEpoch);
+ tm res;
if(err == KErrNone) {
TTime utcTTime = epochTTime + tTimeIntervalSecsSince1Jan1970UTC;
utcTTime = utcTTime + utcOffset;
TDateTime utcDateTime = utcTTime.DateTime();
- tm res;
res.tm_sec = utcDateTime.Second();
res.tm_min = utcDateTime.Minute();
res.tm_hour = utcDateTime.Hour();
@@ -3816,11 +3816,11 @@ static void localToUtc(QDate &date, QTime &time, int isdst)
TTimeIntervalSeconds tTimeIntervalSecsSince1Jan1970UTC(secsSince1Jan1970UTC);
TTime epochTTime;
TInt err = epochTTime.Set(KUnixEpoch);
+ tm res;
if(err == KErrNone) {
TTime utcTTime = epochTTime + tTimeIntervalSecsSince1Jan1970UTC;
utcTTime = utcTTime + utcOffset;
TDateTime utcDateTime = utcTTime.DateTime();
- tm res;
res.tm_sec = utcDateTime.Second();
res.tm_min = utcDateTime.Minute();
res.tm_hour = utcDateTime.Hour();