home *** CD-ROM | disk | FTP | other *** search
/ Shareware Super Platinum 8 / Shareware Super Platinum 8.iso / mac / PROGTOOL / NETPROG.ZIP;1 / NETPROG.TAR / rpc.courier / timedate / dateserver.c < prev    next >
Encoding:
C/C++ Source or Header  |  1989-12-17  |  757 b   |  41 lines

  1. /*
  2.  * dateserver.c - remote procedures; called by server stub.
  3.  */
  4.  
  5. #include    "Date1_defs.h"    /* this file is generated by xnscourier */
  6.  
  7. /*
  8.  * Return the binary date and time.
  9.  */
  10.  
  11. BinDateResults
  12. BinDate(conn, bdtptr)
  13. CourierConnection    *conn;        /* ignored */
  14. char            *bdtptr;    /* ignored */
  15. {
  16.     BinDateResults    result;
  17.     long        time();            /* Unix function */
  18.  
  19.     result.bindate = time((long *) 0);
  20.  
  21.     return(result);
  22. }
  23.  
  24. /*
  25.  * Convert a binary time and return a human readable string.
  26.  */
  27.  
  28. StrDateResults
  29. StrDate(conn, bdtptr, bintime)
  30. CourierConnection    *conn;        /* ignored */
  31. char            *bdtptr;    /* ignored */
  32. long            bintime;
  33. {
  34.     StrDateResults    result;
  35.     char        *ctime();        /* Unix function */
  36.  
  37.     result.strdate = ctime(&bintime);    /* convert to local time */
  38.  
  39.     return(result);
  40. }
  41.