QTimeZone::OffsetData Struct

struct QTimeZone::OffsetData

详细说明

特定时刻的时区偏移数据。

它提供在给定时刻使用的时区偏移和缩写。当函数返回此类型时,可能会使用无效的日期时间来表示它正在回答的查询没有有效的答案,因此在使用结果之前请检查atUtc.isValid()

  • 偏移数据::atUtc 以 UTC 时间表示的偏移数据的日期时间。
  • 偏移数据::offsetFromUtc 在日期时间有效的 UTC 总偏移量。
  • OffsetData::standardTimeOffset 总偏移量中的标准时间偏移分量。
  • OffsetData::daylightTimeOffset 总偏移量中的夏令时偏移量。
  • OffsetData::abbreviation 日期时间有效的缩写。

例如,对于时区 "欧洲/柏林",标准和 DST 下的偏移日期可能是

该类型仅在启用timezone 功能时可用。

© 2025 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.