From 46bbabbe3cb3c07b6c4b751a3257d3208e89f212 Mon Sep 17 00:00:00 2001 From: Florian Geyer Date: Tue, 17 Apr 2012 02:22:48 +0200 Subject: [PATCH] Use UTC time spec. --- src/core/Database.cpp | 2 +- src/core/Entry.cpp | 4 ++-- src/core/Group.cpp | 4 ++-- src/core/Metadata.cpp | 4 ++-- src/core/TimeInfo.cpp | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/core/Database.cpp b/src/core/Database.cpp index eece78f71..3177da53a 100644 --- a/src/core/Database.cpp +++ b/src/core/Database.cpp @@ -167,7 +167,7 @@ void Database::setKey(const CompositeKey& key, const QByteArray& transformSeed, m_transformedMasterKey = key.transform(transformSeed, transformRounds()); m_hasKey = true; if (updateChangedTime) { - m_metadata->setMasterKeyChanged(QDateTime::currentDateTime()); + m_metadata->setMasterKeyChanged(QDateTime::currentDateTimeUtc()); } Q_EMIT modified(); } diff --git a/src/core/Entry.cpp b/src/core/Entry.cpp index 5d21623bd..1ceabfa10 100644 --- a/src/core/Entry.cpp +++ b/src/core/Entry.cpp @@ -64,8 +64,8 @@ template bool Entry::set(T& property, const T& value) void Entry::updateTimeinfo() { if (m_updateTimeinfo) { - m_timeInfo.setLastModificationTime(QDateTime::currentDateTime()); - m_timeInfo.setLastAccessTime(QDateTime::currentDateTime()); + m_timeInfo.setLastModificationTime(QDateTime::currentDateTimeUtc()); + m_timeInfo.setLastAccessTime(QDateTime::currentDateTimeUtc()); } } diff --git a/src/core/Group.cpp b/src/core/Group.cpp index 3d0ffed62..dd08bf8a5 100644 --- a/src/core/Group.cpp +++ b/src/core/Group.cpp @@ -46,8 +46,8 @@ template bool Group::set(T& property, const T& value) { if (property != value) { property = value; if (m_updateTimeinfo) { - m_timeInfo.setLastModificationTime(QDateTime::currentDateTime()); - m_timeInfo.setLastAccessTime(QDateTime::currentDateTime()); + m_timeInfo.setLastModificationTime(QDateTime::currentDateTimeUtc()); + m_timeInfo.setLastAccessTime(QDateTime::currentDateTimeUtc()); } Q_EMIT modified(); return true; diff --git a/src/core/Metadata.cpp b/src/core/Metadata.cpp index 2706bba7a..60938c39c 100644 --- a/src/core/Metadata.cpp +++ b/src/core/Metadata.cpp @@ -34,7 +34,7 @@ Metadata::Metadata(Database* parent) m_masterKeyChangeRec = -1; m_masterKeyChangeForce = -1; - QDateTime now = QDateTime::currentDateTime(); + QDateTime now = QDateTime::currentDateTimeUtc(); m_nameChanged = now; m_descriptionChanged = now; m_defaultUserNameChanged = now; @@ -67,7 +67,7 @@ template bool Metadata::set(T& property, const T& value, QDateTime& da if (property != value) { property = value; if (m_updateDatetime) { - dateTime = QDateTime::currentDateTime(); + dateTime = QDateTime::currentDateTimeUtc(); } Q_EMIT modified(); return true; diff --git a/src/core/TimeInfo.cpp b/src/core/TimeInfo.cpp index c6cdcc162..142082f34 100644 --- a/src/core/TimeInfo.cpp +++ b/src/core/TimeInfo.cpp @@ -22,7 +22,7 @@ TimeInfo::TimeInfo() m_expires = false; m_usageCount = 0; - QDateTime now = QDateTime::currentDateTime(); + QDateTime now = QDateTime::currentDateTimeUtc(); m_lastModificationTime = now; m_creationTime = now; m_lastAccessTime = now;