We discussed this on gnupg-devel@ around July 11. My conclusion was that
t-gettime.c tests the back and forth conversion between gmtime(3) and timegm(3). From my understanding the locale won't matter. The input is a time_t which is a specific way to describe the number of seconds since Epoch. That number should be returned by timegm. The problem seems to be that you are using the timegm emulation in jnlib/mischelp.c which uses mktime and a TZ=UTC. To me this seems to be correct interpretation of POSIX. Only localtime(3) should take TAI or any other conversion into acount.
Well, you wrote that you are using the native timegm from glibc 2.5. Good, thus
it is not a problem with the emulation code but buried in glibc. Please take
the discussion abck to the ML and show me that this TAI is supported by POSIX.
It would also make sense to include the glibc hackers. Trying to discuss this
in a bug tracker does not make any sense.