home *** CD-ROM | disk | FTP | other *** search
/ Crawly Crypt Collection 2 / crawlyvol2.bin / program / c / plstsrc / tcstuff / unixtime.c < prev   
Encoding:
C/C++ Source or Header  |  1989-01-08  |  483 b   |  23 lines

  1. #include <time.h>
  2. #include <ext.h>
  3. /*----------------------------------------------------------------------*
  4. *-----------------------------------------------------------------------*/
  5. extern time_t _cnvDatS();
  6. extern long timezone;
  7.  
  8. static struct TT   {
  9.  int  sec, min, hour, day, month, year;
  10. };
  11.  
  12.  
  13. time_t unixtime(unsigned time,unsigned date)
  14. {
  15. struct TT tt;
  16.  
  17.    ltime(time,date,&tt);
  18.    tt.year += 80;
  19.    tt.month--;
  20.    return((_cnvDatS(&tt) - timezone));
  21. }
  22.  
  23.