home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / CLIPPER / MISC / EMXLIB8F.ZIP / EMX / LIB / SYS / P2T.C < prev    next >
Encoding:
C/C++ Source or Header  |  1993-01-02  |  418 b   |  20 lines

  1. /* sys/p2t.c (emx+gcc) -- Copyright (c) 1992-1993 by Eberhard Mattes */
  2.  
  3. #include <sys/emx.h>
  4. #include <os2emx.h>
  5. #include <time.h>
  6. #include "syscalls.h"
  7.  
  8. long _sys_p2t (FTIME t, FDATE d)
  9. {
  10.   struct tm tm;
  11.  
  12.   tm.tm_sec = t.twosecs * 2;
  13.   tm.tm_min = t.minutes;
  14.   tm.tm_hour = t.hours;
  15.   tm.tm_mday = d.day;
  16.   tm.tm_mon = d.month - 1;
  17.   tm.tm_year = d.year + 1980 - 1900;
  18.   return (_mktime (&tm));
  19. }
  20.