NetBSD/gnu/libexec/uucp/libunix/loctim.c

30 lines
415 B
C

/* loctim.c
Turn a time epoch into a struct tm. This is trivial on Unix. */
#include "uucp.h"
#if TM_IN_SYS_TIME
#include <sys/time.h>
#else
#include <time.h>
#endif
#include "system.h"
#ifndef POSIX_HEADERS
#ifndef localtime
extern struct tm *localtime ();
#endif
#endif
void
usysdep_localtime (itime, q)
long itime;
struct tm *q;
{
time_t i;
i = (time_t) itime;
*q = *localtime (&i);
}