From 992b92d8c490730771c2e72b27c3a47f4428858e Mon Sep 17 00:00:00 2001 From: Edward Welbourne Date: Thu, 17 Nov 2022 21:45:33 +0100 Subject: [PATCH] Document how to recognize an invalid QTimeZone::OffsetData It's mentioned in some of the functions, but the type's documentation should also mention it. Change-Id: Ia8ceb21ff30df1b5933782ae7d8bebe9f436404c Reviewed-by: Thiago Macieira --- src/corelib/time/qtimezone.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/corelib/time/qtimezone.cpp b/src/corelib/time/qtimezone.cpp index 4d5e844b781..d04300e167e 100644 --- a/src/corelib/time/qtimezone.cpp +++ b/src/corelib/time/qtimezone.cpp @@ -256,8 +256,12 @@ Q_GLOBAL_STATIC(QTimeZoneSingleton, global_tz); \class QTimeZone::OffsetData \inmodule QtCore - The time zone offset data for a given moment in time, i.e. the time zone - offsets and abbreviation to use at that moment in time. + The time zone offset data for a given moment in time. + + This provides the time zone offsets and abbreviation to use at that 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 + \c{atUtc.isValid()} before using the results. \list \li OffsetData::atUtc The datetime of the offset data in UTC time.