From 623406589882612037cbb6c5d947d9cfba7b9c95 Mon Sep 17 00:00:00 2001 From: Felix Geyer Date: Wed, 9 May 2012 22:59:52 +0200 Subject: [PATCH] Make sure TimeInfo only contains UTC values. --- src/core/TimeInfo.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/core/TimeInfo.cpp b/src/core/TimeInfo.cpp index 06f2aa7d5..91a8218b7 100644 --- a/src/core/TimeInfo.cpp +++ b/src/core/TimeInfo.cpp @@ -69,21 +69,25 @@ QDateTime TimeInfo::locationChanged() const void TimeInfo::setLastModificationTime(const QDateTime& dateTime) { + Q_ASSERT(dateTime.timeSpec() == Qt::UTC); m_lastModificationTime = dateTime; } void TimeInfo::setCreationTime(const QDateTime& dateTime) { + Q_ASSERT(dateTime.timeSpec() == Qt::UTC); m_creationTime = dateTime; } void TimeInfo::setLastAccessTime(const QDateTime& dateTime) { + Q_ASSERT(dateTime.timeSpec() == Qt::UTC); m_lastAccessTime = dateTime; } void TimeInfo::setExpiryTime(const QDateTime& dateTime) { + Q_ASSERT(dateTime.timeSpec() == Qt::UTC); m_expiryTime = dateTime; } @@ -99,5 +103,6 @@ void TimeInfo::setUsageCount(int count) void TimeInfo::setLocationChanged(const QDateTime& dateTime) { + Q_ASSERT(dateTime.timeSpec() == Qt::UTC); m_locationChanged = dateTime; }