diff options
| author | Edward Welbourne <edward.welbourne@qt.io> | 2022-08-30 16:08:07 +0200 |
|---|---|---|
| committer | Edward Welbourne <edward.welbourne@qt.io> | 2022-12-09 16:16:48 +0100 |
| commit | 3f282e8896980822b86bc009f85bf047c7d9c189 (patch) | |
| tree | 60e5632b1bb5a02fbe94e69eb5e53250904fe6d3 /src/corelib/time/qtimezone.cpp | |
| parent | e71099989ebde3156c23066ff2d79ae63c08ccc4 (diff) | |
Adapt corelib to use QTimeZone in place of Qt::TimeSpec
This saves (mostly in corelib/time/) some complications that used to
arise from needing different code-paths for different time-specs.
Task-number: QTBUG-108199
Change-Id: I5dbd09859fce7599f1ba761f8a0bfc4633d0bef9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/time/qtimezone.cpp')
| -rw-r--r-- | src/corelib/time/qtimezone.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/corelib/time/qtimezone.cpp b/src/corelib/time/qtimezone.cpp index ec4ec84b5c1..3bd7489ebb7 100644 --- a/src/corelib/time/qtimezone.cpp +++ b/src/corelib/time/qtimezone.cpp @@ -331,7 +331,7 @@ Q_GLOBAL_STATIC(QTimeZoneSingleton, global_tz); For example, for time zone "Europe/Berlin" the OffsetDate in standard and DST might be: \list - \li atUtc = QDateTime(QDate(2013, 1, 1), QTime(0, 0, 0), Qt::UTC) + \li atUtc = QDateTime(QDate(2013, 1, 1), QTime(0, 0), QTimeZone::UTC) \li offsetFromUtc = 3600 \li standardTimeOffset = 3600 \li daylightTimeOffset = 0 @@ -339,7 +339,7 @@ Q_GLOBAL_STATIC(QTimeZoneSingleton, global_tz); \endlist \list - \li atUtc = QDateTime(QDate(2013, 6, 1), QTime(0, 0, 0), Qt::UTC) + \li atUtc = QDateTime(QDate(2013, 6, 1), QTime(0, 0), QTimeZone::UTC) \li offsetFromUtc = 7200 \li standardTimeOffset = 3600 \li daylightTimeOffset = 3600 @@ -1584,7 +1584,7 @@ QDataStream &operator>>(QDataStream &ds, QTimeZone &tz) // zone, with the right offset, ignoring the other data: tz = QTimeZone(ianaId.toUtf8()); if (!tz.isValid() || tz.hasDaylightTime() - || tz.offsetFromUtc(QDateTime::fromMSecsSinceEpoch(0, Qt::UTC)) != utcOffset) { + || tz.offsetFromUtc(QDateTime::fromMSecsSinceEpoch(0, QTimeZone::UTC)) != utcOffset) { // Construct a custom timezone using the saved values: tz = QTimeZone(ianaId.toUtf8(), utcOffset, name, abbreviation, QLocale::Territory(territory), comment); |
