From 19be46414ae68c619b94f2fdebd21192898d65fd Mon Sep 17 00:00:00 2001 From: John Layt Date: Tue, 7 Jan 2014 17:10:19 +0100 Subject: QTimeZone - Change from Olson ID to IANA ID Complete changes from using Olsen/Olson in the code to IANA. Completes a change started in 5.2 release branch on the public occurrences. Change-Id: Ib077fcda2c77eef6f04ec28901d8d2d7210b8c72 Reviewed-by: Thiago Macieira --- src/corelib/tools/qtimezone.cpp | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'src/corelib/tools/qtimezone.cpp') diff --git a/src/corelib/tools/qtimezone.cpp b/src/corelib/tools/qtimezone.cpp index d48c8da978..b30caf4289 100644 --- a/src/corelib/tools/qtimezone.cpp +++ b/src/corelib/tools/qtimezone.cpp @@ -77,26 +77,26 @@ static QTimeZonePrivate *newBackendTimeZone() } // Create named time zone using appropriate backend -static QTimeZonePrivate *newBackendTimeZone(const QByteArray &olsenId) +static QTimeZonePrivate *newBackendTimeZone(const QByteArray &ianaId) { #ifdef QT_NO_SYSTEMLOCALE #ifdef QT_USE_ICU - return new QIcuTimeZonePrivate(olsenId); + return new QIcuTimeZonePrivate(ianaId); #else - return new QUtcTimeZonePrivate(olsenId); + return new QUtcTimeZonePrivate(ianaId); #endif // QT_USE_ICU #else #if defined Q_OS_MAC - return new QMacTimeZonePrivate(olsenId); + return new QMacTimeZonePrivate(ianaId); #elif defined Q_OS_UNIX - return new QTzTimeZonePrivate(olsenId); + return new QTzTimeZonePrivate(ianaId); // Registry based timezone backend not available on WinRT #elif defined Q_OS_WIN && !defined Q_OS_WINRT - return new QWinTimeZonePrivate(olsenId); + return new QWinTimeZonePrivate(ianaId); #elif defined QT_USE_ICU - return new QIcuTimeZonePrivate(olsenId); + return new QIcuTimeZonePrivate(ianaId); #else - return new QUtcTimeZonePrivate(olsenId); + return new QUtcTimeZonePrivate(ianaId); #endif // System Locales #endif // QT_NO_SYSTEMLOCALE } @@ -933,18 +933,18 @@ QDataStream &operator<<(QDataStream &ds, const QTimeZone &tz) QDataStream &operator>>(QDataStream &ds, QTimeZone &tz) { - QString olsenId; - ds >> olsenId; - if (olsenId == QStringLiteral("OffsetFromUtc")) { + QString ianaId; + ds >> ianaId; + if (ianaId == QStringLiteral("OffsetFromUtc")) { int utcOffset; QString name; QString abbreviation; int country; QString comment; - ds >> olsenId >> utcOffset >> name >> abbreviation >> country >> comment; - tz = QTimeZone(olsenId.toUtf8(), utcOffset, name, abbreviation, (QLocale::Country) country, comment); + ds >> ianaId >> utcOffset >> name >> abbreviation >> country >> comment; + tz = QTimeZone(ianaId.toUtf8(), utcOffset, name, abbreviation, (QLocale::Country) country, comment); } else { - tz = QTimeZone(olsenId.toUtf8()); + tz = QTimeZone(ianaId.toUtf8()); } return ds; } -- cgit v1.2.3