(generalizedtime2time): use `timegm'
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@1573 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -222,16 +222,7 @@ generalizedtime2time (char *s, time_t *t)
|
|||||||
&tm.tm_min, &tm.tm_sec);
|
&tm.tm_min, &tm.tm_sec);
|
||||||
tm.tm_year -= 1900;
|
tm.tm_year -= 1900;
|
||||||
tm.tm_mon -= 1;
|
tm.tm_mon -= 1;
|
||||||
tm.tm_isdst = 0;
|
*t = timegm (&tm);
|
||||||
|
|
||||||
*t = mktime(&tm);
|
|
||||||
#ifdef HAVE_STRUCT_TM_TM_GMTOFF
|
|
||||||
*t += tm.tm_gmtoff;
|
|
||||||
#elif defined(HAVE_TIMEZONE)
|
|
||||||
*t -= timezone;
|
|
||||||
#else
|
|
||||||
#error Cannot figure out where in timezoneworld we are
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
|
Reference in New Issue
Block a user