freebsd-dev/gnu/libexec/uucp/libunix/loctim.c

28 lines
386 B
C
Raw Normal View History

1993-08-05 18:28:27 +00:00
/* loctim.c
Turn a time epoch into a struct tm. This is trivial on Unix. */
#include "uucp.h"
1994-05-07 18:14:43 +00:00
#if TM_IN_SYS_TIME
#include <sys/time.h>
#else
1993-08-05 18:28:27 +00:00
#include <time.h>
#endif
#include "system.h"
#ifndef localtime
extern struct tm *localtime ();
#endif
void
usysdep_localtime (itime, q)
long itime;
struct tm *q;
{
time_t i;
i = (time_t) itime;
*q = *localtime (&i);
}