Created attachment 12005 [details] Repro/Regression test, fails when isdst = 1 on > glibc 2.28-10 Running test application on older glibc (2.28-10 Debian version): # time in DST $ ./a.out 1569497187 tzname[0] = CET tzname[1] = CEST timezone = -3600 daylight = 1 time = 1569497187 .tm_isdst = 1 tzname[0] = UTC tzname[1] = UTC timezone = 0 daylight = 0 mktime = 1569504387 (time += 7200) # time not in DST $ ./a.out 1575198000 tzname[0] = CET tzname[1] = CEST timezone = -3600 daylight = 1 time = 1575198000 .tm_isdst = 0 tzname[0] = UTC tzname[1] = UTC timezone = 0 daylight = 0 mktime = 1575201600 (time += 3600) Regression with 2.29-2 (Debian version): # time in DST $ ./a.out 1569497187 tzname[0] = CET tzname[1] = CEST timezone = -3600 daylight = 1 time = 1569497187 .tm_isdst = 1 tzname[0] = UTC tzname[1] = UTC timezone = 0 daylight = 0 mktime = -1 (time += -1569497188) # errno is EOVERFLOW # time not in DST $ ./a.out 1575198000 tzname[0] = CET tzname[1] = CEST timezone = -3600 daylight = 1 time = 1575198000 .tm_isdst = 0 tzname[0] = UTC tzname[1] = UTC timezone = 0 daylight = 0 mktime = 1575201600 (time += 3600) In compared the diff from 2.29-2 to git current master and could not detect meaningful changes so I believe this test case still fails / show the regression.
May I add that it is of course quite strange to set the timezone to default UTC (with no DST) and then require a DST-time to converted but the man page does not forbid it and it worked before. If you want to break backward-compatibility please update man page and consider EINVAL instead of EOVERFLOW since the current errno suggests an overflow.
dup *** This bug has been marked as a duplicate of bug 24630 ***