time zone problems with util/timegm.c on mingw32

David Shaw dshaw at jabberwocky.com
Mon Jun 11 20:00:01 CEST 2007

On Mon, Jun 11, 2007 at 07:52:17PM +0200, Fabian Keil wrote:
> > Even that, however, is non-standard behavior, which is why we try to
> > use unsetenv() when possible.  Arguably for the most standards-based
> > code in GnuPG (though probably not your usage), if unsetenv isn't
> > available, we should just give up and leak the memory.
> I think the main point of unsetting TZ there is to make sure
> timegm() calls don't have side effects for other time functions
> called later on.

Sure, that's why I say it probably doesn't apply to your usage.  In
GnuPG, timegm is only used in a single place (when accessing a LDAP
keyserver), so it is harmless in GnuPG to not restore TZ for both the
time and leak reasons.  The gpgkeys_ldap process just doesn't last
that long.


More information about the Gnupg-devel mailing list