summaryrefslogtreecommitdiffstats
path: root/src/corelib/time/qlocaltime_p.h
diff options
context:
space:
mode:
authorEdward Welbourne <edward.welbourne@qt.io>2022-01-24 17:56:30 +0100
committerEdward Welbourne <edward.welbourne@qt.io>2022-05-22 14:22:37 +0200
commit1ae4ffefbbf6dd8d0e29b7253c9ea61b0ebccaa5 (patch)
tree703fcaa2fb63b8b176e7dd007d0c27e8821fe462 /src/corelib/time/qlocaltime_p.h
parent54d81d118997fc4c238b7266571d220d7a6065f1 (diff)
Implement in QLocalTime the offset functions V4 Date needs
Prepare to replace a large pile of #if-ery-laden tangled mess from the implementation of V4 Date by implementing a cleaned-up version of one of its offset calculations and using a recently refactored API of QDTP to implement the other. Task-number: QTBUG-95993 Change-Id: I469f67fb384543abeece9ce8b14bb294c8613033 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/time/qlocaltime_p.h')
-rw-r--r--src/corelib/time/qlocaltime_p.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/corelib/time/qlocaltime_p.h b/src/corelib/time/qlocaltime_p.h
index c3c565eee6..027b1bc05b 100644
--- a/src/corelib/time/qlocaltime_p.h
+++ b/src/corelib/time/qlocaltime_p.h
@@ -22,6 +22,16 @@ QT_BEGIN_NAMESPACE
// Packaging system time_t functions
namespace QLocalTime {
+#ifndef QT_BOOTSTRAPPED
+// Support for V4's Date implelenentation.
+// Each returns offset from UTC in seconds (or 0 if unknown).
+// V4 shall need to multiply by 1000.
+// Offset is -ve East of Greenwich, +ve west of Greenwich.
+// Add it to UTC seconds since epoch to get local seconds since nominal local epoch.
+Q_CORE_EXPORT int getCurrentStandardUtcOffset();
+Q_CORE_EXPORT int getUtcOffset(qint64 atMSecsSinceEpoch);
+#endif // QT_BOOTSTRAPPED
+
// Support for QDateTime
QDateTimePrivate::ZoneState utcToLocal(qint64 utcMillis);
QString localTimeAbbbreviationAt(qint64 local, QDateTimePrivate::DaylightStatus dst);