Article View: mod.std.unix
Article #233RFC.001 Timezone Proposal
From: std-unix
Date: Thu, 17 Jul 1986 23:10
Date: Thu, 17 Jul 1986 23:10
64 lines
2964 bytes
2964 bytes
RFC.001 Proposal Form, 18 April 1986, submitted by John S. Quarterman.
Time Zone Proposal based on work by Robert Elz and Arthur Olsen.
Add 4.5.3 and 4.5.4 to the standard and perhaps also
document Arthur Olsen's implementation in an Appendix.
4.5.3 Set Local Time Conversion
Function: settz()
4.5.3.1 Synopsis
int settz(p)
char *p;
4.5.3.2 Description
The settz() function determines the conversion from GMT
of the local times returned by localtime() and ctime().
When called with a null pointer argument (p==0), settz
shall select the appropriate local time conversion for the
location of the host machine on which the call is executed.
When called with a null string (p!=0 && *p=='\0'), settz
shall select no conversion for localtime, making localtime()
and gmtime() equivalent and ctime() and asctime(gmtime())
equivalent. When called with a non-null string (p!=0 && *p!='\0'),
settz may set the conversion according to that string.
The format of the string and the conversions it may specify
are implementation specific. If an implementation accepts
non-null string arguments to settz, the implementation
should allow users to define their own conversions
rather than restricting conversions to a standard set.
If settz is called with a string for which the implementation
can not find a conversion, settz shall return -1, but the
conversion it sets is implementation defined and may be one of
GMT, the executing machine's local time, or local time for
the area where the implementation was performed.
4.5.3.3 Returns
Upon successful completion, settz() returns 0, otherwise -1.
4.5.4 Get Local Time
Functions: localtime(), ctime()
4.5.4.1 Synopsis
[ as in X3J11 ]
4.5.4.2 Description
[ as in X3J11, plus: ]
The local time conversion is specified by a call on settz().
If localtime() or ctime() is called and settz() has not been called
since the last exec(), the localtime() or ctime() call shall call
settz(getenv("TZ")) before performing the local time conversion.
The local time conversion should be accurate for all times
from the base time of the time() function up to the time
the call is made. Future times should be converted as accurately
as possible with available political information. Daylight savings
time should be taken into account in both cases.
4.5.4.3 Returns
[as in X3J11 ]
4.5.4.4 Errors
[as in X3J11 ]
Volume-Number: Volume 6, Number 33
Technical Details
Message-ID:
<5354@ut-sally.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!decvax!decwrl!amdcad!lll-crg!caip!ut-sally!std-unixShow Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: arc1-ca.pugleaf.net!utzoo!decvax!decwrl!amdcad!lll-crg!caip!ut-sally!std-unix From: std-unix@ut-sally.UUCP Newsgroups: mod.std.unix Subject: RFC.001 Timezone Proposal Message-ID: <5354@ut-sally.UUCP> Date: Thu, 17-Jul-86 19:10:14 EDT Article-I.D.: ut-sally.5354 Posted: Thu Jul 17 19:10:14 1986 Date-Received: Fri, 18-Jul-86 03:50:33 EDT Organization: IEEE 1003 Portable Operating System for Computer Environments Committee Lines: 64 Approved: jsq@sally.UUCP