Files
heimdal/lib/roken/tm2time.c
Assar Westerlund 867e9bc946 added tm2time
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@602 ec53bebd-3082-4978-b11e-865c3cabbd6b
1996-06-27 03:56:14 +00:00

22 lines
284 B
C

#ifdef HAVE_CONFIG_H
#include <config.h>
RCSID("$Id$");
#endif
#include <time.h>
#include <sys/time.h>
time_t
tm2time (struct tm tm, int local)
{
time_t t;
tm.tm_isdst = -1;
t = mktime (&tm);
if (!local)
t += t - mktime (gmtime (&t));
return t;
}