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 1f4b237dad

Pick-to: 6.3
Change-Id: I5cb9080f8c6a24e2163508e640747c6fbbe93dbd
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
This commit is contained in:
Edward Welbourne 2022-04-21 14:10:59 +02:00
parent 383368a321
commit 0248838ee0

View File

@ -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 };