*** a_utctm.c.sav	Fri May 19 08:00:14 2000
--- a_utctm.c	Thu May 25 11:30:34 2000
***************
*** 265,274 ****
  	return(s);
  	}
  
  time_t ASN1_UTCTIME_get(const ASN1_UTCTIME *s)
  	{
! 	struct tm tm;
  	int offset;
  
  	memset(&tm,'\0',sizeof tm);
  
--- 265,276 ----
  	return(s);
  	}
  
+ extern long timezone;
  time_t ASN1_UTCTIME_get(const ASN1_UTCTIME *s)
  	{
! 	struct tm tm, *gtm;
  	int offset;
+ 	time_t tmp;
  
  	memset(&tm,'\0',sizeof tm);
  
***************
*** 291,300 ****
--- 293,311 ----
  		}
  #undef g2
  
+ #ifdef HAVE_TIMEGM
  	return timegm(&tm)-offset*60; /* FIXME: timegm is non-standard,
  	                               * typically we only have mktime (which
  	                               * interprets the struct tm according to
  	                               * the current time zone setting).
  	                               * Also time_t is inappropriate for general
  	                               * UTC times because it may a 32 bit type. */
+ #else
+ 	if (timezone <= 0)
+ 		{
+ 		tmp = time(0);
+ 		gtm = localtime (&tmp);
+ 		}
+         return (mktime(&tm) - timezone) - (offset * 60);
+ #endif	/* HAVE_TIMEGM */
  	}
