From ab15c02991563a7ff0d4a3929e47dd3d274fd354 Mon Sep 17 00:00:00 2001 From: Edward Welbourne Date: Tue, 6 Dec 2022 18:24:18 +0100 Subject: [PATCH] Add a note on the meaning of offsets from UTC to QDateTime Change-Id: Iad29c26fcac10e0db0cf3b092ef670e8ce80bf46 Reviewed-by: Thiago Macieira --- src/corelib/time/qdatetime.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/corelib/time/qdatetime.cpp b/src/corelib/time/qdatetime.cpp index 82dd8a63b01..6018d6e9d6f 100644 --- a/src/corelib/time/qdatetime.cpp +++ b/src/corelib/time/qdatetime.cpp @@ -3308,6 +3308,12 @@ inline QDateTime::Data QDateTimePrivate::create(QDate toDate, QTime toTime, \section2 Offsets From UTC + Offsets from UTC are measured in seconds east of Greenwich. The moment + described by a particular date and time, such as noon on a particular day, + depends on the time representation used. Those with a higher offset from UTC + describe an earlier moment, and those with a lower offset a later moment, by + any given combination of date and time. + There is no explicit size restriction on an offset from UTC, but there is an implicit limit imposed when using the toString() and fromString() methods which use a [+|-]hh:mm format, effectively limiting the range to +/- 99