From 0248838ee04760bebf3aa89a38bd51ce1b16a5d7 Mon Sep 17 00:00:00 2001 From: Edward Welbourne Date: Thu, 21 Apr 2022 14:10:59 +0200 Subject: [PATCH] Correct leap year sequence in systemTimeYearMatching() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- src/corelib/time/qdatetime.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 };