<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    You might want to have a look at __mktime_internal ()<span
    style="white-space: pre-wrap">.

I discovered some time ago that mktime() did not return correct time_t values in some cases. 

For examples
America/New_York, 1945-08-14 19:00:00, where the only difference is the Abbr (tm_zone), from EWT to EPT
Africa/Johannesburg, 1944-03-19 01:00:00, where the Abbr (tm_zone) is the same, SAST to SAST

__mktime_internal () was missing points near these transitions (and others) and so returning incorrect results. </span><span
    style="white-space: pre-wrap">This was causing much confusion in my testing.

</span><span style="white-space: pre-wrap">The problem was that </span>__mktime_internal
    () was comparing only isdst<span style="white-space: pre-wrap"> where it also needed to compare Abbr, as explained more in comments in the attached modified code.

Attached is the __mktime_internal () code with my suggested modifications extracted from 
glibc-2.38\time\mktime.c 
as downloaded from 
</span><a class="moz-txt-link-freetext" href="https://mirrors.ibiblio.org/gnu/libc/glibc-2.38.tar.xz">https://mirrors.ibiblio.org/gnu/libc/glibc-2.38.tar.xz</a><br>
    <br>
    See the two code blocks commented // Modified by Brooks Harris<br>
    <br>
    Since making these changes I have not seen mktime() make any errors
    at many thousands of test points where localtime() was populating
    struct tm.<br>
    <br>
    I hope this might be helpful.<br>
    <br>
    -Brooks<br>
    <br>
    <br>
    <br>
  </body>
</html>