Use UTC time spec.

This commit is contained in:
Florian Geyer 2012-04-17 02:22:48 +02:00 committed by Felix Geyer
parent ad865774d1
commit 46bbabbe3c
5 changed files with 8 additions and 8 deletions

View file

@ -167,7 +167,7 @@ void Database::setKey(const CompositeKey& key, const QByteArray& transformSeed,
m_transformedMasterKey = key.transform(transformSeed, transformRounds()); m_transformedMasterKey = key.transform(transformSeed, transformRounds());
m_hasKey = true; m_hasKey = true;
if (updateChangedTime) { if (updateChangedTime) {
m_metadata->setMasterKeyChanged(QDateTime::currentDateTime()); m_metadata->setMasterKeyChanged(QDateTime::currentDateTimeUtc());
} }
Q_EMIT modified(); Q_EMIT modified();
} }

View file

@ -64,8 +64,8 @@ template <class T> bool Entry::set(T& property, const T& value)
void Entry::updateTimeinfo() void Entry::updateTimeinfo()
{ {
if (m_updateTimeinfo) { if (m_updateTimeinfo) {
m_timeInfo.setLastModificationTime(QDateTime::currentDateTime()); m_timeInfo.setLastModificationTime(QDateTime::currentDateTimeUtc());
m_timeInfo.setLastAccessTime(QDateTime::currentDateTime()); m_timeInfo.setLastAccessTime(QDateTime::currentDateTimeUtc());
} }
} }

View file

@ -46,8 +46,8 @@ template <class T> bool Group::set(T& property, const T& value) {
if (property != value) { if (property != value) {
property = value; property = value;
if (m_updateTimeinfo) { if (m_updateTimeinfo) {
m_timeInfo.setLastModificationTime(QDateTime::currentDateTime()); m_timeInfo.setLastModificationTime(QDateTime::currentDateTimeUtc());
m_timeInfo.setLastAccessTime(QDateTime::currentDateTime()); m_timeInfo.setLastAccessTime(QDateTime::currentDateTimeUtc());
} }
Q_EMIT modified(); Q_EMIT modified();
return true; return true;

View file

@ -34,7 +34,7 @@ Metadata::Metadata(Database* parent)
m_masterKeyChangeRec = -1; m_masterKeyChangeRec = -1;
m_masterKeyChangeForce = -1; m_masterKeyChangeForce = -1;
QDateTime now = QDateTime::currentDateTime(); QDateTime now = QDateTime::currentDateTimeUtc();
m_nameChanged = now; m_nameChanged = now;
m_descriptionChanged = now; m_descriptionChanged = now;
m_defaultUserNameChanged = now; m_defaultUserNameChanged = now;
@ -67,7 +67,7 @@ template <class T> bool Metadata::set(T& property, const T& value, QDateTime& da
if (property != value) { if (property != value) {
property = value; property = value;
if (m_updateDatetime) { if (m_updateDatetime) {
dateTime = QDateTime::currentDateTime(); dateTime = QDateTime::currentDateTimeUtc();
} }
Q_EMIT modified(); Q_EMIT modified();
return true; return true;

View file

@ -22,7 +22,7 @@ TimeInfo::TimeInfo()
m_expires = false; m_expires = false;
m_usageCount = 0; m_usageCount = 0;
QDateTime now = QDateTime::currentDateTime(); QDateTime now = QDateTime::currentDateTimeUtc();
m_lastModificationTime = now; m_lastModificationTime = now;
m_creationTime = now; m_creationTime = now;
m_lastAccessTime = now; m_lastAccessTime = now;