home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume22 / cvs-berliner / part01 / src / rcstime.h < prev    next >
Encoding:
C/C++ Source or Header  |  1990-06-07  |  1.3 KB  |  43 lines

  1. #define TIMEID "$Id: rcstime.h,v 1.1 89/05/09 11:51:03 berliner Exp $"
  2.  
  3. /* Structure for use by time manipulating subroutines.
  4.  * The following library routines use it:
  5.  *    libc: ctime, localtime, gmtime, asctime
  6.  *    libcx: partime, maketime (may not be installed yet)
  7.  */
  8.  
  9. struct tm {     /* See defines below for allowable ranges */
  10.     int tm_sec;
  11.     int tm_min;
  12.     int tm_hour;
  13.     int tm_mday;
  14.     int tm_mon;
  15.     int tm_year;
  16.     int tm_wday;
  17.     int tm_yday;
  18.     int tm_isdst;
  19.     int tm_zon;    /* NEW: mins westward of Greenwich */
  20.     int tm_ampm;    /* NEW: 1 if AM, 2 if PM */
  21. };
  22.  
  23. #define LCLZONE (5*60)    /* Until V7 ftime(2) works, this defines local zone*/
  24. #define TMNULL (-1)    /* Items not specified are given this value
  25.              * in order to distinguish null specs from zero
  26.              * specs.  This is only used by partime and
  27.              * maketime. */
  28.  
  29.     /* Indices into TM structure */
  30. #define TM_SEC 0    /* 0-59            */
  31. #define TM_MIN 1    /* 0-59            */
  32. #define TM_HOUR 2    /* 0-23            */
  33. #define TM_MDAY 3    /* 1-31            day of month */
  34. #define TM_DAY TM_MDAY    /*  "            synonym      */
  35. #define TM_MON 4    /* 0-11            */
  36. #define TM_YEAR 5    /* (year-1900) (year)    */
  37. #define TM_WDAY 6    /* 0-6            day of week (0 = Sunday) */
  38. #define TM_YDAY 7    /* 0-365        day of year */
  39. #define TM_ISDST 8    /* 0 Std, 1 DST        */
  40.     /* New stuff */
  41. #define TM_ZON 9    /* 0-(24*60) minutes west of Greenwich */
  42. #define TM_AMPM 10    /* 1 AM, 2 PM        */
  43.