diff options
author | Simon Hausmann <simon.hausmann@digia.com> | 2014-05-22 07:44:45 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@digia.com> | 2014-05-22 07:46:17 +0200 |
commit | 508b95899d4764d879a01b3990e44ce849cd9abc (patch) | |
tree | 3dbb215480c98ee75b5aacc5e3d691e04d8ce8c8 /src/corelib/tools/qdatetime.cpp | |
parent | f2891be00808c82f5069661d60d8727fe28774b7 (diff) | |
parent | 5d2939344eb8fbd3c2115f52a7a8d47365bdf820 (diff) |
Merge remote-tracking branch 'origin/stable' into dev
Change-Id: Ia36e93771066d8abcf8123dbe2362c5c9d9260fc
Diffstat (limited to 'src/corelib/tools/qdatetime.cpp')
-rw-r--r-- | src/corelib/tools/qdatetime.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/corelib/tools/qdatetime.cpp b/src/corelib/tools/qdatetime.cpp index 801876629c..d6f1d6c942 100644 --- a/src/corelib/tools/qdatetime.cpp +++ b/src/corelib/tools/qdatetime.cpp @@ -2405,6 +2405,9 @@ static bool qt_localtime(qint64 msecsSinceEpoch, QDate *localDate, QTime *localT local.tm_year = sysTime.wYear - 1900; } #elif !defined(QT_NO_THREAD) && defined(_POSIX_THREAD_SAFE_FUNCTIONS) + // localtime() is required to work as if tzset() was called before it. + // localtime_r() does not have this requirement, so make an explicit call. + qt_tzset(); // Use the reentrant version of localtime() where available // as is thread-safe and doesn't use a shared static data area tm *res = 0; |