home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / gnu / uucp-1.04 / unix / loctim.c < prev    next >
Encoding:
C/C++ Source or Header  |  1993-02-13  |  355 b   |  26 lines

  1. /* loctim.c
  2.    Turn a time epoch into a struct tm.  This is trivial on Unix.  */
  3.  
  4. #include "uucp.h"
  5.  
  6. #if HAVE_TIME_H
  7. #include <time.h>
  8. #endif
  9.  
  10. #include "system.h"
  11.  
  12. #ifndef localtime
  13. extern struct tm *localtime ();
  14. #endif
  15.  
  16. void
  17. usysdep_localtime (itime, q)
  18.      long itime;
  19.      struct tm *q;
  20. {
  21.   time_t i;
  22.  
  23.   i = (time_t) itime;
  24.   *q = *localtime (&i);
  25. }
  26.