New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tests fail after 2038 #24414
Comments
Thanks, I can reproduce this with With diff --git a/tests/datetime/datetimetest.cpp b/tests/datetime/datetimetest.cpp
index 565a1077cf..204ddd461c 100644
--- a/tests/datetime/datetimetest.cpp
+++ b/tests/datetime/datetimetest.cpp
@@ -1005,10 +1005,14 @@ void DateTimeTestCase::TestTimeZoneParse()
{
wxDateTime dt;
wxString sTimeZone = wxString::FromUTF8(parseTestTimeZones[n].str);
+ INFO("Test #" << n << " using format \"" << sTimeZone << "\"");
+
wxString::const_iterator end;
if ( dt.ParseFormat(sTimeZone, wxS("%H:%M%z"), &end)
&& end == sTimeZone.end() )
{
+ INFO("Parsed time: " << dt.FormatISOTime());
+
CPPUNIT_ASSERT( parseTestTimeZones[n].good );
CPPUNIT_ASSERT_EQUAL( 13, dt.GetHour(wxDateTime::UTC));
CPPUNIT_ASSERT_EQUAL( 37, dt.GetMinute(wxDateTime::UTC)); I get
I don't have time to debug this now, unfortunately, but it definitely needs to be fixed, of course. |
faketime '2038-03-14T00:00:00' is the earliest that triggers this US DST rules say DST
and dates after 2038-11-07 don't trigger the issue, so something goes wrong in the US-DST-code after 2038. |
Yes, this is almost certainly DST-related, it's just that we need find out what exactly... |
It happens on Windows too. I think it is related to wxWidgets/src/common/datetime.cpp Line 1273 in 75c5528
It uses a fall-back called JDN that doesn't seem to do anything with timezones? The fix is probably to remove this |
Right, thanks. We need to use the 2038 bound for 32 bit |
Description
Bug description:
While working on reproducible builds for openSUSE, I found that our wxWidgets-3_2 (3.2.4) package fails tests when the system clock is set to the year 2038.
Expected vs observed behaviour:
test output looks thus:
Tests should keep working in the future - at least 16 years would be good.
Stack trace:
N/A
To Reproduce:
on Debian or openSUSE do
Sometimes reproduction is not reliable - it might depend on the exact moment the test is run and how floating point values are rounded.
Platform and version information
The text was updated successfully, but these errors were encountered: