QTimeZone::OffsetData Struct
struct QTimeZone::OffsetDataDetailed Description
The time zone offset data for a given moment in time.
This provides the time zone offsets and abbreviation to use at a given moment in time. When a function returns this type, it may use an invalid datetime to indicate that the query it is answering has no valid answer, so check atUtc.isValid()
before using the results.
- OffsetData::atUtc The datetime of the offset data in UTC time.
- OffsetData::offsetFromUtc The total offset from UTC in effect at the datetime.
- OffsetData::standardTimeOffset The standard time offset component of the total offset.
- OffsetData::daylightTimeOffset The DST offset component of the total offset.
- OffsetData::abbreviation The abbreviation in effect at the datetime.
For example, for time zone "Europe/Berlin" the OffsetDate in standard and DST might be:
- atUtc = QDateTime(QDate(2013, 1, 1), QTime(0, 0), QTimeZone::UTC)
- offsetFromUtc = 3600
- standardTimeOffset = 3600
- daylightTimeOffset = 0
- abbreviation = "CET"
- atUtc = QDateTime(QDate(2013, 6, 1), QTime(0, 0), QTimeZone::UTC)
- offsetFromUtc = 7200
- standardTimeOffset = 3600
- daylightTimeOffset = 3600
- abbreviation = "CEST"
This type is only available when feature timezone
is enabled.
© 2024 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.