Skip to content

Commit

Permalink
Merge branch 'isodate' into 'mer-5.6'
Browse files Browse the repository at this point in the history
[qtbase] Patch QTBUG 26161.

See merge request mer-core/qtbase!75
  • Loading branch information
pvuorela committed Feb 9, 2021
2 parents 567a894 + 74afde0 commit 0f928e0
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/corelib/tools/qdatetime.cpp
Expand Up @@ -3565,7 +3565,11 @@ QString QDateTime::toString(Qt::DateFormat format) const
.arg(dt.day())
.arg(tm.toString(Qt::TextDate))
.arg(dt.year());
if (timeSpec() != Qt::LocalTime) {
if (timeSpec() == Qt::TimeZone) {
#ifndef QT_BOOTSTRAPPED
buf += QStringLiteral(" ") + d->m_timeZone.d->abbreviation(d->toMSecsSinceEpoch());
#endif
} else if (timeSpec() != Qt::LocalTime) {
buf += QStringLiteral(" GMT");
if (d->m_spec == Qt::OffsetFromUTC)
buf += toOffsetString(Qt::TextDate, d->m_offsetFromUtc);
Expand All @@ -3587,6 +3591,9 @@ QString QDateTime::toString(Qt::DateFormat format) const
buf += QLatin1Char('Z');
break;
case Qt::OffsetFromUTC:
#ifndef QT_BOOTSTRAPPED
case Qt::TimeZone:
#endif
buf += toOffsetString(Qt::ISODate, d->m_offsetFromUtc);
break;
default:
Expand Down

0 comments on commit 0f928e0

Please sign in to comment.