summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEdward Welbourne <edward.welbourne@qt.io>2022-04-21 14:10:59 +0200
committerEdward Welbourne <edward.welbourne@qt.io>2022-04-25 19:18:49 +0200
commit0248838ee04760bebf3aa89a38bd51ce1b16a5d7 (patch)
tree8b3cd6d2b07aff689c45467223b87c0a32e0f351 /src
parent383368a32146c97c110ee95aac2c7e8b74aa06ef (diff)
Correct leap year sequence in systemTimeYearMatching()
In the sequence for the early 32-bit time_t leap years, I somehow managed to get two of the entries swapped. This amends commit 1f4b237dade9d0d2ed5439e3834ac22985797561 Pick-to: 6.3 Change-Id: I5cb9080f8c6a24e2163508e640747c6fbbe93dbd Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/corelib/time/qdatetime.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/time/qdatetime.cpp b/src/corelib/time/qdatetime.cpp
index 8b8cd9d616..14cdde074b 100644
--- a/src/corelib/time/qdatetime.cpp
+++ b/src/corelib/time/qdatetime.cpp
@@ -2911,7 +2911,7 @@ static int systemTimeYearMatching(int year)
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
- static constexpr int forLeapEarly[] = { 1928, 1912, 1924, 1908, 1916, 1904, 1920 };
+ static constexpr int forLeapEarly[] = { 1928, 1912, 1924, 1908, 1920, 1904, 1916 };
static constexpr int regularEarly[] = { 1905, 1906, 1907, 1902, 1903, 1909, 1910 };
#endif
static constexpr int forLeapLate[] = { 2012, 2024, 2036, 2020, 2032, 2016, 2028 };