Make sure TimeInfo only contains UTC values.

This commit is contained in:
Felix Geyer 2012-05-09 22:59:52 +02:00
parent 7568582b05
commit 6234065898

View File

@ -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;
}