diff --git a/Lib/test/test_time.py b/Lib/test/test_time.py index da0cf494bfa8ad..720509bc58f749 100644 --- a/Lib/test/test_time.py +++ b/Lib/test/test_time.py @@ -803,11 +803,15 @@ def test_localtime_timezone(self): if lt.tm_gmtoff is None: self.assertNotHasAttr(time, "timezone") else: - self.assertEqual(lt.tm_gmtoff, -[time.timezone, time.altzone][lt.tm_isdst]) + # Ireland standard time is during the summer, so it's the opposite to everything else + if time.tzname[lt.tm_isdst] != "IST": + self.assertEqual(lt.tm_gmtoff, -[time.timezone, time.altzone][lt.tm_isdst]) if lt.tm_zone is None: self.assertNotHasAttr(time, "tzname") else: - self.assertEqual(lt.tm_zone, time.tzname[lt.tm_isdst]) + # IST = GMT but lt.tm_zone is GMT + if time.tzname[lt.tm_isdst] != "IST": + self.assertEqual(lt.tm_zone, time.tzname[lt.tm_isdst]) # Try and make UNIX times from the localtime and a 9-tuple # created from the localtime. Test to see that the times are diff --git a/Misc/NEWS.d/next/Build/2026-02-15-21-04-33.gh-issue-144849.-Iobsc.rst b/Misc/NEWS.d/next/Build/2026-02-15-21-04-33.gh-issue-144849.-Iobsc.rst new file mode 100644 index 00000000000000..e834fdff4fb4b8 --- /dev/null +++ b/Misc/NEWS.d/next/Build/2026-02-15-21-04-33.gh-issue-144849.-Iobsc.rst @@ -0,0 +1 @@ +Some unit tests fail when ran in Europe/Dublin locale, this sidesteps that