home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / std_unix / mod.std.unix.v6 / text0032.txt < prev    next >
Encoding:
Text File  |  1987-06-30  |  2.3 KB  |  66 lines

  1. RFC.001 Proposal Form, 18 April 1986, submitted by John S. Quarterman.
  2.  
  3. Time Zone Proposal based on work by Robert Elz and Arthur Olsen.
  4.  
  5. Add 4.5.3 and 4.5.4 to the standard and perhaps also
  6. document Arthur Olsen's implementation in an Appendix.
  7.  
  8. 4.5.3    Set Local Time Conversion
  9. Function:  settz()
  10.  
  11. 4.5.3.1    Synopsis
  12.     int settz(p)
  13.     char *p;
  14.  
  15. 4.5.3.2    Description
  16. The settz() function determines the conversion from GMT
  17. of the local times returned by localtime() and ctime().
  18. When called with a null pointer argument (p==0), settz
  19. shall select the appropriate local time conversion for the
  20. location of the host machine on which the call is executed.
  21. When called with a null string (p!=0 && *p=='\0'), settz
  22. shall select no conversion for localtime, making localtime()
  23. and gmtime() equivalent and ctime() and asctime(gmtime())
  24. equivalent.  When called with a non-null string (p!=0 && *p!='\0'),
  25. settz may set the conversion according to that string.
  26. The format of the string and the conversions it may specify
  27. are implementation specific.  If an implementation accepts
  28. non-null string arguments to settz, the implementation
  29. should allow users to define their own conversions
  30. rather than restricting conversions to a standard set.
  31. If settz is called with a string for which the implementation
  32. can not find a conversion, settz shall return -1, but the
  33. conversion it sets is implementation defined and may be one of
  34. GMT, the executing machine's local time, or local time for
  35. the area where the implementation was performed.
  36.  
  37. 4.5.3.3    Returns
  38. Upon successful completion, settz() returns 0, otherwise -1.
  39.  
  40. 4.5.4    Get Local Time
  41. Functions:  localtime(), ctime()
  42.  
  43. 4.5.4.1    Synopsis
  44. [ as in X3J11 ]
  45.  
  46. 4.5.4.2    Description
  47. [ as in X3J11, plus: ]
  48. The local time conversion is specified by a call on settz().
  49. If localtime() or ctime() is called and settz() has not been called
  50. since the last exec(), the localtime() or ctime() call shall call
  51. settz(getenv("TZ")) before performing the local time conversion.
  52. The local time conversion should be accurate for all times
  53. from the base time of the time() function up to the time
  54. the call is made.  Future times should be converted as accurately
  55. as possible with available political information.  Daylight savings
  56. time should be taken into account in both cases.
  57.  
  58. 4.5.4.3    Returns
  59. [as in X3J11 ]
  60.  
  61. 4.5.4.4    Errors
  62. [as in X3J11 ]
  63.  
  64. Volume-Number: Volume 6, Number 33
  65.  
  66.