diff options
author | Iain Lane <iain.lane@canonical.com> | 2014-03-27 11:53:23 +0000 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-03-27 13:28:04 +0100 |
commit | 476ebf976f3010f3593cec34e5d9b31335ad72a4 (patch) | |
tree | ee1efdebbd97d7e45b48505ecc5a7ecd4b9538e1 /src/qml/jsruntime/qv4dateobject.cpp | |
parent | 37be0f6a00c2d39199ade1ae0e8395d20f200207 (diff) |
Call tzset() from getLocalTZA() so we learn about tz changes
Per POSIX, localtime_r isn't required to call tzset(). This means that
we don't notice that the timezone has changed when calling
Date.timeZoneUpdated() from JS.
Call this in getLocalTZA() so that it always returns results pertaining
to the selected timezone.
Task-number: QTBUG-37683
Change-Id: Ia9098ef0100b7c909a82b125a5ea4f39fba1f306
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/jsruntime/qv4dateobject.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4dateobject.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/qml/jsruntime/qv4dateobject.cpp b/src/qml/jsruntime/qv4dateobject.cpp index f2e7573452..fc94862bfd 100644 --- a/src/qml/jsruntime/qv4dateobject.cpp +++ b/src/qml/jsruntime/qv4dateobject.cpp @@ -627,6 +627,7 @@ static double getLocalTZA() #ifndef Q_OS_WIN struct tm t; time_t curr; + tzset(); time(&curr); localtime_r(&curr, &t); time_t locl = mktime(&t); |