diff options
author | Lorn Potter <lorn.potter@gmail.com> | 2021-08-19 14:23:04 +1000 |
---|---|---|
committer | Edward Welbourne <edward.welbourne@qt.io> | 2021-08-19 16:13:54 +0000 |
commit | a4a13949a882484c4ab54c94fbbe58bf7b366a93 (patch) | |
tree | 0ef492412c79e27434ebacc4d5a9c405851004fe /src/corelib/time | |
parent | 654431286931a70645fc3be39570f9109c95fe9e (diff) |
wasm: fix assert in QDateTime
like windows, we dont have historical time data
Change-Id: Iab77c1e2949bc909324f18209e6c52324c80a548
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Diffstat (limited to 'src/corelib/time')
-rw-r--r-- | src/corelib/time/qdatetime.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/time/qdatetime.cpp b/src/corelib/time/qdatetime.cpp index aa14f4525e..61a1ca9273 100644 --- a/src/corelib/time/qdatetime.cpp +++ b/src/corelib/time/qdatetime.cpp @@ -2813,7 +2813,7 @@ static inline bool millisInSystemRange(qint64 millis, qint64 slack = 0) */ static int systemTimeYearMatching(int year) { -#ifdef Q_OS_WIN // Doesn't suppor times before epoch +#if defined(Q_OS_WIN) || defined(Q_OS_WASM)// They don't support times before the epoch static constexpr int forLeapEarly[] = { 1984, 1996, 1980, 1992, 1976, 1988, 1972 }; static constexpr int regularEarly[] = { 1978, 1973, 1974, 1975, 1970, 1971, 1977 }; #else // First year fully in 32-bit time_t range is 1902 |