Make preview panel expiration date use local time (#2382)

Adds call to toLocalTime() to convert expiration date string
to correct timezone instead of UTC, which matches the date string
in the database view.
This commit is contained in:
Kyle Kneitinger 2018-10-24 05:11:58 -07:00 committed by Jonathan White
parent d990f12f56
commit cfa1eca249

View File

@ -179,7 +179,7 @@ void EntryPreviewWidget::updateEntryGeneralTab()
const TimeInfo entryTime = m_currentEntry->timeInfo(); const TimeInfo entryTime = m_currentEntry->timeInfo();
const QString expires = const QString expires =
entryTime.expires() ? entryTime.expiryTime().toString(Qt::DefaultLocaleShortDate) : tr("Never"); entryTime.expires() ? entryTime.expiryTime().toLocalTime().toString(Qt::DefaultLocaleShortDate) : tr("Never");
m_ui->entryExpirationLabel->setText(expires); m_ui->entryExpirationLabel->setText(expires);
} }