home *** CD-ROM | disk | FTP | other *** search
/ OpenStep 4.2J (Developer) / os42jdev.iso / NextDeveloper / Source / GNU / uucp / Uucp.framework / unix.subproj / loctim.c < prev    next >
Encoding:
C/C++ Source or Header  |  1995-10-09  |  386 b   |  28 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 TM_IN_SYS_TIME
  7. #include <sys/time.h>
  8. #else
  9. #include <time.h>
  10. #endif
  11.  
  12. #include "system.h"
  13.  
  14. #ifndef localtime
  15. extern struct tm *localtime ();
  16. #endif
  17.  
  18. void
  19. usysdep_localtime (itime, q)
  20.      long itime;
  21.      struct tm *q;
  22. {
  23.   time_t i;
  24.  
  25.   i = (time_t) itime;
  26.   *q = *localtime (&i);
  27. }
  28.