summaryrefslogtreecommitdiffstats
path: root/src/corelib/time/qdatetime.cpp
diff options
context:
space:
mode:
authorEdward Welbourne <edward.welbourne@qt.io>2022-12-06 18:24:18 +0100
committerEdward Welbourne <edward.welbourne@qt.io>2022-12-09 16:16:47 +0100
commitab15c02991563a7ff0d4a3929e47dd3d274fd354 (patch)
tree87bb432d70f2ac776f3bb04d64bc7793974262de /src/corelib/time/qdatetime.cpp
parent2c2010ddfebaea363a9d35fb5a51aa815822bb38 (diff)
Add a note on the meaning of offsets from UTC to QDateTime
Change-Id: Iad29c26fcac10e0db0cf3b092ef670e8ce80bf46 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/time/qdatetime.cpp')
-rw-r--r--src/corelib/time/qdatetime.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/corelib/time/qdatetime.cpp b/src/corelib/time/qdatetime.cpp
index 82dd8a63b0..6018d6e9d6 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