diff options
author | cvs2svn <cvs2svn@FreeBSD.org> | 1996-07-18 19:40:53 +0000 |
---|---|---|
committer | cvs2svn <cvs2svn@FreeBSD.org> | 1996-07-18 19:40:53 +0000 |
commit | 3476bd83b0eb6fec259ee193553e5ea6b93b82ad (patch) | |
tree | aa0ebc3a04dc100cf204d2f5fc5062c6feb62d55 | |
parent | 22c654616a6e4e17e2c466703c05694f2c63d174 (diff) |
This commit was manufactured by cvs2svn to create tag 'tzcode96h'.vendor/tzcode/tzcode96h
Notes
Notes:
svn path=/vendor/tzcode/dist/; revision=17211
svn path=/vendor/tzcode/tzcode96h/; revision=17213; tag=vendor/tzcode/tzcode96h
-rw-r--r-- | lib/libc/stdtime/time2posix.3 | 119 | ||||
-rw-r--r-- | lib/libc/stdtime/tzfile.5 | 123 | ||||
-rw-r--r-- | usr.sbin/zic/Makefile | 5 |
3 files changed, 0 insertions, 247 deletions
diff --git a/lib/libc/stdtime/time2posix.3 b/lib/libc/stdtime/time2posix.3 deleted file mode 100644 index 846a52ed1931..000000000000 --- a/lib/libc/stdtime/time2posix.3 +++ /dev/null @@ -1,119 +0,0 @@ -.TH TIME2POSIX 3 -.SH NAME -time2posix, posix2time \- convert seconds since the Epoch -.SH SYNOPSIS -.nf -.B #include <sys/types.h> -.B #include <time.h> -.PP -.B time_t time2posix(t) -.B time_t t -.PP -.B time_t posix2time(t) -.B time_t t -.PP -.B cc ... -lz -.fi -.SH DESCRIPTION -IEEE Standard 1003.1 -(POSIX) -legislates that a time_t value of -536457599 shall correspond to "Wed Dec 31 23:59:59 GMT 1986." -This effectively implies that POSIX time_t's cannot include leap -seconds and, -therefore, -that the system time must be adjusted as each leap occurs. -.PP -If the time package is configured with leap-second support -enabled, -however, -no such adjustment is needed and -time_t values continue to increase over leap events -(as a true `seconds since...' value). -This means that these values will differ from those required by POSIX -by the net number of leap seconds inserted since the Epoch. -.PP -Typically this is not a problem as the type time_t is intended -to be -(mostly) -opaque\(emtime_t values should only be obtained-from and -passed-to functions such as -.IR time(2) , -.IR localtime(3) , -.IR mktime(3) , -and -.IR difftime(3) . -However, -POSIX gives an arithmetic -expression for directly computing a time_t value from a given date/time, -and the same relationship is assumed by some -(usually older) -applications. -Any programs creating/dissecting time_t's -using such a relationship will typically not handle intervals -over leap seconds correctly. -.PP -The -.I time2posix -and -.I posix2time -functions are provided to address this time_t mismatch by converting -between local time_t values and their POSIX equivalents. -This is done by accounting for the number of time-base changes that -would have taken place on a POSIX system as leap seconds were inserted -or deleted. -These converted values can then be used in lieu of correcting the older -applications, -or when communicating with POSIX-compliant systems. -.PP -.I Time2posix -is single-valued. -That is, -every local time_t -corresponds to a single POSIX time_t. -.I Posix2time -is less well-behaved: -for a positive leap second hit the result is not unique, -and for a negative leap second hit the corresponding -POSIX time_t doesn't exist so an adjacent value is returned. -Both of these are good indicators of the inferiority of the -POSIX representation. -.PP -The following table summarizes the relationship between a time -T and it's conversion to, -and back from, -the POSIX representation over the leap second inserted at the end of June, -1993. -.nf -.ta \w'93/06/30 'u +\w'23:59:59 'u +\w'A+0 'u +\w'X=time2posix(T) 'u -DATE TIME T X=time2posix(T) posix2time(X) -93/06/30 23:59:59 A+0 B+0 A+0 -93/06/30 23:59:60 A+1 B+1 A+1 or A+2 -93/07/01 00:00:00 A+2 B+1 A+1 or A+2 -93/07/01 00:00:01 A+3 B+2 A+3 - -A leap second deletion would look like... - -DATE TIME T X=time2posix(T) posix2time(X) -??/06/30 23:59:58 A+0 B+0 A+0 -??/07/01 00:00:00 A+1 B+2 A+1 -??/07/01 00:00:01 A+2 B+3 A+2 -.sp -.ce - [Note: posix2time(B+1) => A+0 or A+1] -.fi -.PP -If leap-second support is not enabled, -local time_t's and -POSIX time_t's are equivalent, -and both -.I time2posix -and -.I posix2time -degenerate to the identity function. -.SH SEE ALSO -difftime(3), -localtime(3), -mktime(3), -time(2) -.\" @(#)time2posix.3 7.3 diff --git a/lib/libc/stdtime/tzfile.5 b/lib/libc/stdtime/tzfile.5 deleted file mode 100644 index 1d47033848b3..000000000000 --- a/lib/libc/stdtime/tzfile.5 +++ /dev/null @@ -1,123 +0,0 @@ -.TH TZFILE 5 -.SH NAME -tzfile \- time zone information -.SH SYNOPSIS -.B -#include <tzfile.h> -.SH DESCRIPTION -The time zone information files used by -.IR tzset (3) -begin with bytes reserved for future use, -followed by four four-byte values of type -.BR long , -written in a ``standard'' byte order -(the high-order byte of the value is written first). -These values are, -in order: -.TP -.I tzh_ttisstdcnt -The number of standard/wall indicators stored in the file. -.TP -.I tzh_leapcnt -The number of leap seconds for which data is stored in the file. -.TP -.I tzh_timecnt -The number of "transition times" for which data is stored -in the file. -.TP -.I tzh_typecnt -The number of "local time types" for which data is stored -in the file (must not be zero). -.TP -.I tzh_charcnt -The number of characters of "time zone abbreviation strings" -stored in the file. -.PP -The above header is followed by -.I tzh_timecnt -four-byte values of type -.BR long , -sorted in ascending order. -These values are written in ``standard'' byte order. -Each is used as a transition time (as returned by -.IR time (2)) -at which the rules for computing local time change. -Next come -.I tzh_timecnt -one-byte values of type -.BR "unsigned char" ; -each one tells which of the different types of ``local time'' types -described in the file is associated with the same-indexed transition time. -These values serve as indices into an array of -.I ttinfo -structures that appears next in the file; -these structures are defined as follows: -.in +.5i -.sp -.nf -.ta .5i +\w'unsigned int\0\0'u -struct ttinfo { - long tt_gmtoff; - int tt_isdst; - unsigned int tt_abbrind; -}; -.in -.5i -.fi -.sp -Each structure is written as a four-byte value for -.I tt_gmtoff -of type -.BR long , -in a standard byte order, followed by a one-byte value for -.I tt_isdst -and a one-byte value for -.IR tt_abbrind . -In each structure, -.I tt_gmtoff -gives the number of seconds to be added to GMT, -.I tt_isdst -tells whether -.I tm_isdst -should be set by -.I localtime (3) -and -.I tt_abbrind -serves as an index into the array of time zone abbreviation characters -that follow the -.I ttinfo -structure(s) in the file. -.PP -Then there are -.I tzh_leapcnt -pairs of four-byte values, written in standard byte order; -the first value of each pair gives the time -(as returned by -.IR time(2)) -at which a leap second occurs; -the second gives the -.I total -number of leap seconds to be applied after the given time. -The pairs of values are sorted in ascending order by time. -.PP -Finally there are -.I tzh_ttisstdcnt -standard/wall indicators, each stored as a one-byte value; -they tell whether the transition times associated with local time types -were specified as standard time or wall clock time, -and are used when a time zone file is used in handling POSIX-style -time zone environment variables. -.PP -.I Localtime -uses the first standard-time -.I ttinfo -structure in the file -(or simply the first -.I ttinfo -structure in the absence of a standard-time structure) -if either -.I tzh_timecnt -is zero or the time argument is less than the first transition time recorded -in the file. -.SH SEE ALSO -newctime(3) -.\" @(#)tzfile.5 7.2 diff --git a/usr.sbin/zic/Makefile b/usr.sbin/zic/Makefile deleted file mode 100644 index 963a0ee8b43e..000000000000 --- a/usr.sbin/zic/Makefile +++ /dev/null @@ -1,5 +0,0 @@ -# $Id$ -SUBDIR= zic zdump - -.include <bsd.subdir.mk> - |