Index: vendor/tzcode/tzcode2009h/libc/stdtime/time2posix.3 =================================================================== --- vendor/tzcode/tzcode2009h/libc/stdtime/time2posix.3 (nonexistent) +++ vendor/tzcode/tzcode2009h/libc/stdtime/time2posix.3 (revision 192888) @@ -0,0 +1,121 @@ +.TH TIME2POSIX 3 +.SH NAME +time2posix, posix2time \- convert seconds since the Epoch +.SH SYNOPSIS +.nf +.B #include +.B #include +.PP +.B time_t time2posix(t) +.B time_t t +.PP +.B time_t posix2time(t) +.B time_t t +.PP +.B cc ... -ltz +.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 UTC 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 8.2 +.\" This file is in the public domain, so clarified as of +.\" 1996-06-05 by Arthur David Olson. Index: vendor/tzcode/tzcode2009h/libc/stdtime/asctime.c =================================================================== --- vendor/tzcode/tzcode2009h/libc/stdtime/asctime.c (nonexistent) +++ vendor/tzcode/tzcode2009h/libc/stdtime/asctime.c (revision 192888) @@ -0,0 +1,138 @@ +/* +** This file is in the public domain, so clarified as of +** 1996-06-05 by Arthur David Olson. +*/ + +/* +** Avoid the temptation to punt entirely to strftime; +** the output of strftime is supposed to be locale specific +** whereas the output of asctime is supposed to be constant. +*/ + +#ifndef lint +#ifndef NOID +static char elsieid[] = "@(#)asctime.c 8.2"; +#endif /* !defined NOID */ +#endif /* !defined lint */ + +/*LINTLIBRARY*/ + +#include "private.h" +#include "tzfile.h" + +/* +** Some systems only handle "%.2d"; others only handle "%02d"; +** "%02.2d" makes (most) everybody happy. +** At least some versions of gcc warn about the %02.2d; +** we conditionalize below to avoid the warning. +*/ +/* +** All years associated with 32-bit time_t values are exactly four digits long; +** some years associated with 64-bit time_t values are not. +** Vintage programs are coded for years that are always four digits long +** and may assume that the newline always lands in the same place. +** For years that are less than four digits, we pad the output with +** leading zeroes to get the newline in the traditional place. +** The -4 ensures that we get four characters of output even if +** we call a strftime variant that produces fewer characters for some years. +** The ISO C 1999 and POSIX 1003.1-2004 standards prohibit padding the year, +** but many implementations pad anyway; most likely the standards are buggy. +*/ +#ifdef __GNUC__ +#define ASCTIME_FMT "%.3s %.3s%3d %2.2d:%2.2d:%2.2d %-4s\n" +#else /* !defined __GNUC__ */ +#define ASCTIME_FMT "%.3s %.3s%3d %02.2d:%02.2d:%02.2d %-4s\n" +#endif /* !defined __GNUC__ */ +/* +** For years that are more than four digits we put extra spaces before the year +** so that code trying to overwrite the newline won't end up overwriting +** a digit within a year and truncating the year (operating on the assumption +** that no output is better than wrong output). +*/ +#ifdef __GNUC__ +#define ASCTIME_FMT_B "%.3s %.3s%3d %2.2d:%2.2d:%2.2d %s\n" +#else /* !defined __GNUC__ */ +#define ASCTIME_FMT_B "%.3s %.3s%3d %02.2d:%02.2d:%02.2d %s\n" +#endif /* !defined __GNUC__ */ + +#define STD_ASCTIME_BUF_SIZE 26 +/* +** Big enough for something such as +** ??? ???-2147483648 -2147483648:-2147483648:-2147483648 -2147483648\n +** (two three-character abbreviations, five strings denoting integers, +** seven explicit spaces, two explicit colons, a newline, +** and a trailing ASCII nul). +** The values above are for systems where an int is 32 bits and are provided +** as an example; the define below calculates the maximum for the system at +** hand. +*/ +#define MAX_ASCTIME_BUF_SIZE (2*3+5*INT_STRLEN_MAXIMUM(int)+7+2+1+1) + +static char buf_asctime[MAX_ASCTIME_BUF_SIZE]; + +/* +** A la ISO/IEC 9945-1, ANSI/IEEE Std 1003.1, 2004 Edition. +*/ + +char * +asctime_r(timeptr, buf) +register const struct tm * timeptr; +char * buf; +{ + static const char wday_name[][3] = { + "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" + }; + static const char mon_name[][3] = { + "Jan", "Feb", "Mar", "Apr", "May", "Jun", + "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" + }; + register const char * wn; + register const char * mn; + char year[INT_STRLEN_MAXIMUM(int) + 2]; + char result[MAX_ASCTIME_BUF_SIZE]; + + if (timeptr->tm_wday < 0 || timeptr->tm_wday >= DAYSPERWEEK) + wn = "???"; + else wn = wday_name[timeptr->tm_wday]; + if (timeptr->tm_mon < 0 || timeptr->tm_mon >= MONSPERYEAR) + mn = "???"; + else mn = mon_name[timeptr->tm_mon]; + /* + ** Use strftime's %Y to generate the year, to avoid overflow problems + ** when computing timeptr->tm_year + TM_YEAR_BASE. + ** Assume that strftime is unaffected by other out-of-range members + ** (e.g., timeptr->tm_mday) when processing "%Y". + */ + (void) strftime(year, sizeof year, "%Y", timeptr); + /* + ** We avoid using snprintf since it's not available on all systems. + */ + (void) sprintf(result, + ((strlen(year) <= 4) ? ASCTIME_FMT : ASCTIME_FMT_B), + wn, mn, + timeptr->tm_mday, timeptr->tm_hour, + timeptr->tm_min, timeptr->tm_sec, + year); + if (strlen(result) < STD_ASCTIME_BUF_SIZE || buf == buf_asctime) { + (void) strcpy(buf, result); + return buf; + } else { +#ifdef EOVERFLOW + errno = EOVERFLOW; +#else /* !defined EOVERFLOW */ + errno = EINVAL; +#endif /* !defined EOVERFLOW */ + return NULL; + } +} + +/* +** A la ISO/IEC 9945-1, ANSI/IEEE Std 1003.1, 2004 Edition. +*/ + +char * +asctime(timeptr) +register const struct tm * timeptr; +{ + return asctime_r(timeptr, buf_asctime); +} Property changes on: vendor/tzcode/tzcode2009h/libc/stdtime/asctime.c ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: vendor/tzcode/tzcode2009h/libc/stdtime/difftime.c =================================================================== --- vendor/tzcode/tzcode2009h/libc/stdtime/difftime.c (nonexistent) +++ vendor/tzcode/tzcode2009h/libc/stdtime/difftime.c (revision 192888) @@ -0,0 +1,65 @@ +/* +** This file is in the public domain, so clarified as of +** 1996-06-05 by Arthur David Olson. +*/ + +#ifndef lint +#ifndef NOID +static char elsieid[] = "@(#)difftime.c 8.1"; +#endif /* !defined NOID */ +#endif /* !defined lint */ + +/*LINTLIBRARY*/ + +#include "private.h" /* for time_t, TYPE_INTEGRAL, and TYPE_SIGNED */ + +double +difftime(time1, time0) +const time_t time1; +const time_t time0; +{ + /* + ** If (sizeof (double) > sizeof (time_t)) simply convert and subtract + ** (assuming that the larger type has more precision). + ** This is the common real-world case circa 2004. + */ + if (sizeof (double) > sizeof (time_t)) + return (double) time1 - (double) time0; + if (!TYPE_INTEGRAL(time_t)) { + /* + ** time_t is floating. + */ + return time1 - time0; + } + if (!TYPE_SIGNED(time_t)) { + /* + ** time_t is integral and unsigned. + ** The difference of two unsigned values can't overflow + ** if the minuend is greater than or equal to the subtrahend. + */ + if (time1 >= time0) + return time1 - time0; + else return -((double) (time0 - time1)); + } + /* + ** time_t is integral and signed. + ** Handle cases where both time1 and time0 have the same sign + ** (meaning that their difference cannot overflow). + */ + if ((time1 < 0) == (time0 < 0)) + return time1 - time0; + /* + ** time1 and time0 have opposite signs. + ** Punt if unsigned long is too narrow. + */ + if (sizeof (unsigned long) < sizeof (time_t)) + return (double) time1 - (double) time0; + /* + ** Stay calm...decent optimizers will eliminate the complexity below. + */ + if (time1 >= 0 /* && time0 < 0 */) + return (unsigned long) time1 + + (unsigned long) (-(time0 + 1)) + 1; + return -(double) ((unsigned long) time0 + + (unsigned long) (-(time1 + 1)) + 1); +} Property changes on: vendor/tzcode/tzcode2009h/libc/stdtime/difftime.c ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: vendor/tzcode/tzcode2009h/libc/stdtime/localtime.c =================================================================== --- vendor/tzcode/tzcode2009h/libc/stdtime/localtime.c (nonexistent) +++ vendor/tzcode/tzcode2009h/libc/stdtime/localtime.c (revision 192888) @@ -0,0 +1,2080 @@ +/* +** This file is in the public domain, so clarified as of +** 1996-06-05 by Arthur David Olson. +*/ + +#ifndef lint +#ifndef NOID +static char elsieid[] = "@(#)localtime.c 8.9"; +#endif /* !defined NOID */ +#endif /* !defined lint */ + +/* +** Leap second handling from Bradley White. +** POSIX-style TZ environment variable handling from Guy Harris. +*/ + +/*LINTLIBRARY*/ + +#include "private.h" +#include "tzfile.h" +#include "fcntl.h" +#include "float.h" /* for FLT_MAX and DBL_MAX */ + +#ifndef TZ_ABBR_MAX_LEN +#define TZ_ABBR_MAX_LEN 16 +#endif /* !defined TZ_ABBR_MAX_LEN */ + +#ifndef TZ_ABBR_CHAR_SET +#define TZ_ABBR_CHAR_SET \ + "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 :+-._" +#endif /* !defined TZ_ABBR_CHAR_SET */ + +#ifndef TZ_ABBR_ERR_CHAR +#define TZ_ABBR_ERR_CHAR '_' +#endif /* !defined TZ_ABBR_ERR_CHAR */ + +/* +** SunOS 4.1.1 headers lack O_BINARY. +*/ + +#ifdef O_BINARY +#define OPEN_MODE (O_RDONLY | O_BINARY) +#endif /* defined O_BINARY */ +#ifndef O_BINARY +#define OPEN_MODE O_RDONLY +#endif /* !defined O_BINARY */ + +#ifndef WILDABBR +/* +** Someone might make incorrect use of a time zone abbreviation: +** 1. They might reference tzname[0] before calling tzset (explicitly +** or implicitly). +** 2. They might reference tzname[1] before calling tzset (explicitly +** or implicitly). +** 3. They might reference tzname[1] after setting to a time zone +** in which Daylight Saving Time is never observed. +** 4. They might reference tzname[0] after setting to a time zone +** in which Standard Time is never observed. +** 5. They might reference tm.TM_ZONE after calling offtime. +** What's best to do in the above cases is open to debate; +** for now, we just set things up so that in any of the five cases +** WILDABBR is used. Another possibility: initialize tzname[0] to the +** string "tzname[0] used before set", and similarly for the other cases. +** And another: initialize tzname[0] to "ERA", with an explanation in the +** manual page of what this "time zone abbreviation" means (doing this so +** that tzname[0] has the "normal" length of three characters). +*/ +#define WILDABBR " " +#endif /* !defined WILDABBR */ + +static char wildabbr[] = WILDABBR; + +static const char gmt[] = "GMT"; + +/* +** The DST rules to use if TZ has no rules and we can't load TZDEFRULES. +** We default to US rules as of 1999-08-17. +** POSIX 1003.1 section 8.1.1 says that the default DST rules are +** implementation dependent; for historical reasons, US rules are a +** common default. +*/ +#ifndef TZDEFRULESTRING +#define TZDEFRULESTRING ",M4.1.0,M10.5.0" +#endif /* !defined TZDEFDST */ + +struct ttinfo { /* time type information */ + long tt_gmtoff; /* UTC offset in seconds */ + int tt_isdst; /* used to set tm_isdst */ + int tt_abbrind; /* abbreviation list index */ + int tt_ttisstd; /* TRUE if transition is std time */ + int tt_ttisgmt; /* TRUE if transition is UTC */ +}; + +struct lsinfo { /* leap second information */ + time_t ls_trans; /* transition time */ + long ls_corr; /* correction to apply */ +}; + +#define BIGGEST(a, b) (((a) > (b)) ? (a) : (b)) + +#ifdef TZNAME_MAX +#define MY_TZNAME_MAX TZNAME_MAX +#endif /* defined TZNAME_MAX */ +#ifndef TZNAME_MAX +#define MY_TZNAME_MAX 255 +#endif /* !defined TZNAME_MAX */ + +struct state { + int leapcnt; + int timecnt; + int typecnt; + int charcnt; + int goback; + int goahead; + time_t ats[TZ_MAX_TIMES]; + unsigned char types[TZ_MAX_TIMES]; + struct ttinfo ttis[TZ_MAX_TYPES]; + char chars[BIGGEST(BIGGEST(TZ_MAX_CHARS + 1, sizeof gmt), + (2 * (MY_TZNAME_MAX + 1)))]; + struct lsinfo lsis[TZ_MAX_LEAPS]; +}; + +struct rule { + int r_type; /* type of rule--see below */ + int r_day; /* day number of rule */ + int r_week; /* week number of rule */ + int r_mon; /* month number of rule */ + long r_time; /* transition time of rule */ +}; + +#define JULIAN_DAY 0 /* Jn - Julian day */ +#define DAY_OF_YEAR 1 /* n - day of year */ +#define MONTH_NTH_DAY_OF_WEEK 2 /* Mm.n.d - month, week, day of week */ + +/* +** Prototypes for static functions. +*/ + +static long detzcode(const char * codep); +static time_t detzcode64(const char * codep); +static int differ_by_repeat(time_t t1, time_t t0); +static const char * getzname(const char * strp); +static const char * getqzname(const char * strp, const int delim); +static const char * getnum(const char * strp, int * nump, int min, + int max); +static const char * getsecs(const char * strp, long * secsp); +static const char * getoffset(const char * strp, long * offsetp); +static const char * getrule(const char * strp, struct rule * rulep); +static void gmtload(struct state * sp); +static struct tm * gmtsub(const time_t * timep, long offset, + struct tm * tmp); +static struct tm * localsub(const time_t * timep, long offset, + struct tm * tmp); +static int increment_overflow(int * number, int delta); +static int leaps_thru_end_of(int y); +static int long_increment_overflow(long * number, int delta); +static int long_normalize_overflow(long * tensptr, + int * unitsptr, int base); +static int normalize_overflow(int * tensptr, int * unitsptr, + int base); +static void settzname(void); +static time_t time1(struct tm * tmp, + struct tm * (*funcp)(const time_t *, + long, struct tm *), + long offset); +static time_t time2(struct tm *tmp, + struct tm * (*funcp)(const time_t *, + long, struct tm*), + long offset, int * okayp); +static time_t time2sub(struct tm *tmp, + struct tm * (*funcp)(const time_t *, + long, struct tm*), + long offset, int * okayp, int do_norm_secs); +static struct tm * timesub(const time_t * timep, long offset, + const struct state * sp, struct tm * tmp); +static int tmcomp(const struct tm * atmp, + const struct tm * btmp); +static time_t transtime(time_t janfirst, int year, + const struct rule * rulep, long offset); +static int typesequiv(const struct state * sp, int a, int b); +static int tzload(const char * name, struct state * sp, + int doextend); +static int tzparse(const char * name, struct state * sp, + int lastditch); + +#ifdef ALL_STATE +static struct state * lclptr; +static struct state * gmtptr; +#endif /* defined ALL_STATE */ + +#ifndef ALL_STATE +static struct state lclmem; +static struct state gmtmem; +#define lclptr (&lclmem) +#define gmtptr (&gmtmem) +#endif /* State Farm */ + +#ifndef TZ_STRLEN_MAX +#define TZ_STRLEN_MAX 255 +#endif /* !defined TZ_STRLEN_MAX */ + +static char lcl_TZname[TZ_STRLEN_MAX + 1]; +static int lcl_is_set; +static int gmt_is_set; + +char * tzname[2] = { + wildabbr, + wildabbr +}; + +/* +** Section 4.12.3 of X3.159-1989 requires that +** Except for the strftime function, these functions [asctime, +** ctime, gmtime, localtime] return values in one of two static +** objects: a broken-down time structure and an array of char. +** Thanks to Paul Eggert for noting this. +*/ + +static struct tm tm; + +#ifdef USG_COMPAT +time_t timezone = 0; +int daylight = 0; +#endif /* defined USG_COMPAT */ + +#ifdef ALTZONE +time_t altzone = 0; +#endif /* defined ALTZONE */ + +static long +detzcode(codep) +const char * const codep; +{ + register long result; + register int i; + + result = (codep[0] & 0x80) ? ~0L : 0; + for (i = 0; i < 4; ++i) + result = (result << 8) | (codep[i] & 0xff); + return result; +} + +static time_t +detzcode64(codep) +const char * const codep; +{ + register time_t result; + register int i; + + result = (codep[0] & 0x80) ? (~(int_fast64_t) 0) : 0; + for (i = 0; i < 8; ++i) + result = result * 256 + (codep[i] & 0xff); + return result; +} + +static void +settzname(void) +{ + register struct state * const sp = lclptr; + register int i; + + tzname[0] = wildabbr; + tzname[1] = wildabbr; +#ifdef USG_COMPAT + daylight = 0; + timezone = 0; +#endif /* defined USG_COMPAT */ +#ifdef ALTZONE + altzone = 0; +#endif /* defined ALTZONE */ +#ifdef ALL_STATE + if (sp == NULL) { + tzname[0] = tzname[1] = gmt; + return; + } +#endif /* defined ALL_STATE */ + for (i = 0; i < sp->typecnt; ++i) { + register const struct ttinfo * const ttisp = &sp->ttis[i]; + + tzname[ttisp->tt_isdst] = + &sp->chars[ttisp->tt_abbrind]; +#ifdef USG_COMPAT + if (ttisp->tt_isdst) + daylight = 1; + if (i == 0 || !ttisp->tt_isdst) + timezone = -(ttisp->tt_gmtoff); +#endif /* defined USG_COMPAT */ +#ifdef ALTZONE + if (i == 0 || ttisp->tt_isdst) + altzone = -(ttisp->tt_gmtoff); +#endif /* defined ALTZONE */ + } + /* + ** And to get the latest zone names into tzname. . . + */ + for (i = 0; i < sp->timecnt; ++i) { + register const struct ttinfo * const ttisp = + &sp->ttis[ + sp->types[i]]; + + tzname[ttisp->tt_isdst] = + &sp->chars[ttisp->tt_abbrind]; + } + /* + ** Finally, scrub the abbreviations. + ** First, replace bogus characters. + */ + for (i = 0; i < sp->charcnt; ++i) + if (strchr(TZ_ABBR_CHAR_SET, sp->chars[i]) == NULL) + sp->chars[i] = TZ_ABBR_ERR_CHAR; + /* + ** Second, truncate long abbreviations. + */ + for (i = 0; i < sp->typecnt; ++i) { + register const struct ttinfo * const ttisp = &sp->ttis[i]; + register char * cp = &sp->chars[ttisp->tt_abbrind]; + + if (strlen(cp) > TZ_ABBR_MAX_LEN && + strcmp(cp, GRANDPARENTED) != 0) + *(cp + TZ_ABBR_MAX_LEN) = '\0'; + } +} + +static int +differ_by_repeat(t1, t0) +const time_t t1; +const time_t t0; +{ + if (TYPE_INTEGRAL(time_t) && + TYPE_BIT(time_t) - TYPE_SIGNED(time_t) < SECSPERREPEAT_BITS) + return 0; + return t1 - t0 == SECSPERREPEAT; +} + +static int +tzload(name, sp, doextend) +register const char * name; +register struct state * const sp; +register const int doextend; +{ + register const char * p; + register int i; + register int fid; + register int stored; + register int nread; + union { + struct tzhead tzhead; + char buf[2 * sizeof(struct tzhead) + + 2 * sizeof *sp + + 4 * TZ_MAX_TIMES]; + } u; + + if (name == NULL && (name = TZDEFAULT) == NULL) + return -1; + { + register int doaccess; + /* + ** Section 4.9.1 of the C standard says that + ** "FILENAME_MAX expands to an integral constant expression + ** that is the size needed for an array of char large enough + ** to hold the longest file name string that the implementation + ** guarantees can be opened." + */ + char fullname[FILENAME_MAX + 1]; + + if (name[0] == ':') + ++name; + doaccess = name[0] == '/'; + if (!doaccess) { + if ((p = TZDIR) == NULL) + return -1; + if ((strlen(p) + strlen(name) + 1) >= sizeof fullname) + return -1; + (void) strcpy(fullname, p); + (void) strcat(fullname, "/"); + (void) strcat(fullname, name); + /* + ** Set doaccess if '.' (as in "../") shows up in name. + */ + if (strchr(name, '.') != NULL) + doaccess = TRUE; + name = fullname; + } + if (doaccess && access(name, R_OK) != 0) + return -1; + if ((fid = open(name, OPEN_MODE)) == -1) + return -1; + } + nread = read(fid, u.buf, sizeof u.buf); + if (close(fid) < 0 || nread <= 0) + return -1; + for (stored = 4; stored <= 8; stored *= 2) { + int ttisstdcnt; + int ttisgmtcnt; + + ttisstdcnt = (int) detzcode(u.tzhead.tzh_ttisstdcnt); + ttisgmtcnt = (int) detzcode(u.tzhead.tzh_ttisgmtcnt); + sp->leapcnt = (int) detzcode(u.tzhead.tzh_leapcnt); + sp->timecnt = (int) detzcode(u.tzhead.tzh_timecnt); + sp->typecnt = (int) detzcode(u.tzhead.tzh_typecnt); + sp->charcnt = (int) detzcode(u.tzhead.tzh_charcnt); + p = u.tzhead.tzh_charcnt + sizeof u.tzhead.tzh_charcnt; + if (sp->leapcnt < 0 || sp->leapcnt > TZ_MAX_LEAPS || + sp->typecnt <= 0 || sp->typecnt > TZ_MAX_TYPES || + sp->timecnt < 0 || sp->timecnt > TZ_MAX_TIMES || + sp->charcnt < 0 || sp->charcnt > TZ_MAX_CHARS || + (ttisstdcnt != sp->typecnt && ttisstdcnt != 0) || + (ttisgmtcnt != sp->typecnt && ttisgmtcnt != 0)) + return -1; + if (nread - (p - u.buf) < + sp->timecnt * stored + /* ats */ + sp->timecnt + /* types */ + sp->typecnt * 6 + /* ttinfos */ + sp->charcnt + /* chars */ + sp->leapcnt * (stored + 4) + /* lsinfos */ + ttisstdcnt + /* ttisstds */ + ttisgmtcnt) /* ttisgmts */ + return -1; + for (i = 0; i < sp->timecnt; ++i) { + sp->ats[i] = (stored == 4) ? + detzcode(p) : detzcode64(p); + p += stored; + } + for (i = 0; i < sp->timecnt; ++i) { + sp->types[i] = (unsigned char) *p++; + if (sp->types[i] >= sp->typecnt) + return -1; + } + for (i = 0; i < sp->typecnt; ++i) { + register struct ttinfo * ttisp; + + ttisp = &sp->ttis[i]; + ttisp->tt_gmtoff = detzcode(p); + p += 4; + ttisp->tt_isdst = (unsigned char) *p++; + if (ttisp->tt_isdst != 0 && ttisp->tt_isdst != 1) + return -1; + ttisp->tt_abbrind = (unsigned char) *p++; + if (ttisp->tt_abbrind < 0 || + ttisp->tt_abbrind > sp->charcnt) + return -1; + } + for (i = 0; i < sp->charcnt; ++i) + sp->chars[i] = *p++; + sp->chars[i] = '\0'; /* ensure '\0' at end */ + for (i = 0; i < sp->leapcnt; ++i) { + register struct lsinfo * lsisp; + + lsisp = &sp->lsis[i]; + lsisp->ls_trans = (stored == 4) ? + detzcode(p) : detzcode64(p); + p += stored; + lsisp->ls_corr = detzcode(p); + p += 4; + } + for (i = 0; i < sp->typecnt; ++i) { + register struct ttinfo * ttisp; + + ttisp = &sp->ttis[i]; + if (ttisstdcnt == 0) + ttisp->tt_ttisstd = FALSE; + else { + ttisp->tt_ttisstd = *p++; + if (ttisp->tt_ttisstd != TRUE && + ttisp->tt_ttisstd != FALSE) + return -1; + } + } + for (i = 0; i < sp->typecnt; ++i) { + register struct ttinfo * ttisp; + + ttisp = &sp->ttis[i]; + if (ttisgmtcnt == 0) + ttisp->tt_ttisgmt = FALSE; + else { + ttisp->tt_ttisgmt = *p++; + if (ttisp->tt_ttisgmt != TRUE && + ttisp->tt_ttisgmt != FALSE) + return -1; + } + } + /* + ** Out-of-sort ats should mean we're running on a + ** signed time_t system but using a data file with + ** unsigned values (or vice versa). + */ + for (i = 0; i < sp->timecnt - 2; ++i) + if (sp->ats[i] > sp->ats[i + 1]) { + ++i; + if (TYPE_SIGNED(time_t)) { + /* + ** Ignore the end (easy). + */ + sp->timecnt = i; + } else { + /* + ** Ignore the beginning (harder). + */ + register int j; + + for (j = 0; j + i < sp->timecnt; ++j) { + sp->ats[j] = sp->ats[j + i]; + sp->types[j] = sp->types[j + i]; + } + sp->timecnt = j; + } + break; + } + /* + ** If this is an old file, we're done. + */ + if (u.tzhead.tzh_version[0] == '\0') + break; + nread -= p - u.buf; + for (i = 0; i < nread; ++i) + u.buf[i] = p[i]; + /* + ** If this is a narrow integer time_t system, we're done. + */ + if (stored >= (int) sizeof(time_t) && TYPE_INTEGRAL(time_t)) + break; + } + if (doextend && nread > 2 && + u.buf[0] == '\n' && u.buf[nread - 1] == '\n' && + sp->typecnt + 2 <= TZ_MAX_TYPES) { + struct state ts; + register int result; + + u.buf[nread - 1] = '\0'; + result = tzparse(&u.buf[1], &ts, FALSE); + if (result == 0 && ts.typecnt == 2 && + sp->charcnt + ts.charcnt <= TZ_MAX_CHARS) { + for (i = 0; i < 2; ++i) + ts.ttis[i].tt_abbrind += + sp->charcnt; + for (i = 0; i < ts.charcnt; ++i) + sp->chars[sp->charcnt++] = + ts.chars[i]; + i = 0; + while (i < ts.timecnt && + ts.ats[i] <= + sp->ats[sp->timecnt - 1]) + ++i; + while (i < ts.timecnt && + sp->timecnt < TZ_MAX_TIMES) { + sp->ats[sp->timecnt] = + ts.ats[i]; + sp->types[sp->timecnt] = + sp->typecnt + + ts.types[i]; + ++sp->timecnt; + ++i; + } + sp->ttis[sp->typecnt++] = ts.ttis[0]; + sp->ttis[sp->typecnt++] = ts.ttis[1]; + } + } + sp->goback = sp->goahead = FALSE; + if (sp->timecnt > 1) { + for (i = 1; i < sp->timecnt; ++i) + if (typesequiv(sp, sp->types[i], sp->types[0]) && + differ_by_repeat(sp->ats[i], sp->ats[0])) { + sp->goback = TRUE; + break; + } + for (i = sp->timecnt - 2; i >= 0; --i) + if (typesequiv(sp, sp->types[sp->timecnt - 1], + sp->types[i]) && + differ_by_repeat(sp->ats[sp->timecnt - 1], + sp->ats[i])) { + sp->goahead = TRUE; + break; + } + } + return 0; +} + +static int +typesequiv(sp, a, b) +const struct state * const sp; +const int a; +const int b; +{ + register int result; + + if (sp == NULL || + a < 0 || a >= sp->typecnt || + b < 0 || b >= sp->typecnt) + result = FALSE; + else { + register const struct ttinfo * ap = &sp->ttis[a]; + register const struct ttinfo * bp = &sp->ttis[b]; + result = ap->tt_gmtoff == bp->tt_gmtoff && + ap->tt_isdst == bp->tt_isdst && + ap->tt_ttisstd == bp->tt_ttisstd && + ap->tt_ttisgmt == bp->tt_ttisgmt && + strcmp(&sp->chars[ap->tt_abbrind], + &sp->chars[bp->tt_abbrind]) == 0; + } + return result; +} + +static const int mon_lengths[2][MONSPERYEAR] = { + { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }, + { 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 } +}; + +static const int year_lengths[2] = { + DAYSPERNYEAR, DAYSPERLYEAR +}; + +/* +** Given a pointer into a time zone string, scan until a character that is not +** a valid character in a zone name is found. Return a pointer to that +** character. +*/ + +static const char * +getzname(strp) +register const char * strp; +{ + register char c; + + while ((c = *strp) != '\0' && !is_digit(c) && c != ',' && c != '-' && + c != '+') + ++strp; + return strp; +} + +/* +** Given a pointer into an extended time zone string, scan until the ending +** delimiter of the zone name is located. Return a pointer to the delimiter. +** +** As with getzname above, the legal character set is actually quite +** restricted, with other characters producing undefined results. +** We don't do any checking here; checking is done later in common-case code. +*/ + +static const char * +getqzname(register const char *strp, const int delim) +{ + register int c; + + while ((c = *strp) != '\0' && c != delim) + ++strp; + return strp; +} + +/* +** Given a pointer into a time zone string, extract a number from that string. +** Check that the number is within a specified range; if it is not, return +** NULL. +** Otherwise, return a pointer to the first character not part of the number. +*/ + +static const char * +getnum(strp, nump, min, max) +register const char * strp; +int * const nump; +const int min; +const int max; +{ + register char c; + register int num; + + if (strp == NULL || !is_digit(c = *strp)) + return NULL; + num = 0; + do { + num = num * 10 + (c - '0'); + if (num > max) + return NULL; /* illegal value */ + c = *++strp; + } while (is_digit(c)); + if (num < min) + return NULL; /* illegal value */ + *nump = num; + return strp; +} + +/* +** Given a pointer into a time zone string, extract a number of seconds, +** in hh[:mm[:ss]] form, from the string. +** If any error occurs, return NULL. +** Otherwise, return a pointer to the first character not part of the number +** of seconds. +*/ + +static const char * +getsecs(strp, secsp) +register const char * strp; +long * const secsp; +{ + int num; + + /* + ** `HOURSPERDAY * DAYSPERWEEK - 1' allows quasi-Posix rules like + ** "M10.4.6/26", which does not conform to Posix, + ** but which specifies the equivalent of + ** ``02:00 on the first Sunday on or after 23 Oct''. + */ + strp = getnum(strp, &num, 0, HOURSPERDAY * DAYSPERWEEK - 1); + if (strp == NULL) + return NULL; + *secsp = num * (long) SECSPERHOUR; + if (*strp == ':') { + ++strp; + strp = getnum(strp, &num, 0, MINSPERHOUR - 1); + if (strp == NULL) + return NULL; + *secsp += num * SECSPERMIN; + if (*strp == ':') { + ++strp; + /* `SECSPERMIN' allows for leap seconds. */ + strp = getnum(strp, &num, 0, SECSPERMIN); + if (strp == NULL) + return NULL; + *secsp += num; + } + } + return strp; +} + +/* +** Given a pointer into a time zone string, extract an offset, in +** [+-]hh[:mm[:ss]] form, from the string. +** If any error occurs, return NULL. +** Otherwise, return a pointer to the first character not part of the time. +*/ + +static const char * +getoffset(strp, offsetp) +register const char * strp; +long * const offsetp; +{ + register int neg = 0; + + if (*strp == '-') { + neg = 1; + ++strp; + } else if (*strp == '+') + ++strp; + strp = getsecs(strp, offsetp); + if (strp == NULL) + return NULL; /* illegal time */ + if (neg) + *offsetp = -*offsetp; + return strp; +} + +/* +** Given a pointer into a time zone string, extract a rule in the form +** date[/time]. See POSIX section 8 for the format of "date" and "time". +** If a valid rule is not found, return NULL. +** Otherwise, return a pointer to the first character not part of the rule. +*/ + +static const char * +getrule(strp, rulep) +const char * strp; +register struct rule * const rulep; +{ + if (*strp == 'J') { + /* + ** Julian day. + */ + rulep->r_type = JULIAN_DAY; + ++strp; + strp = getnum(strp, &rulep->r_day, 1, DAYSPERNYEAR); + } else if (*strp == 'M') { + /* + ** Month, week, day. + */ + rulep->r_type = MONTH_NTH_DAY_OF_WEEK; + ++strp; + strp = getnum(strp, &rulep->r_mon, 1, MONSPERYEAR); + if (strp == NULL) + return NULL; + if (*strp++ != '.') + return NULL; + strp = getnum(strp, &rulep->r_week, 1, 5); + if (strp == NULL) + return NULL; + if (*strp++ != '.') + return NULL; + strp = getnum(strp, &rulep->r_day, 0, DAYSPERWEEK - 1); + } else if (is_digit(*strp)) { + /* + ** Day of year. + */ + rulep->r_type = DAY_OF_YEAR; + strp = getnum(strp, &rulep->r_day, 0, DAYSPERLYEAR - 1); + } else return NULL; /* invalid format */ + if (strp == NULL) + return NULL; + if (*strp == '/') { + /* + ** Time specified. + */ + ++strp; + strp = getsecs(strp, &rulep->r_time); + } else rulep->r_time = 2 * SECSPERHOUR; /* default = 2:00:00 */ + return strp; +} + +/* +** Given the Epoch-relative time of January 1, 00:00:00 UTC, in a year, the +** year, a rule, and the offset from UTC at the time that rule takes effect, +** calculate the Epoch-relative time that rule takes effect. +*/ + +static time_t +transtime(janfirst, year, rulep, offset) +const time_t janfirst; +const int year; +register const struct rule * const rulep; +const long offset; +{ + register int leapyear; + register time_t value; + register int i; + int d, m1, yy0, yy1, yy2, dow; + + INITIALIZE(value); + leapyear = isleap(year); + switch (rulep->r_type) { + + case JULIAN_DAY: + /* + ** Jn - Julian day, 1 == January 1, 60 == March 1 even in leap + ** years. + ** In non-leap years, or if the day number is 59 or less, just + ** add SECSPERDAY times the day number-1 to the time of + ** January 1, midnight, to get the day. + */ + value = janfirst + (rulep->r_day - 1) * SECSPERDAY; + if (leapyear && rulep->r_day >= 60) + value += SECSPERDAY; + break; + + case DAY_OF_YEAR: + /* + ** n - day of year. + ** Just add SECSPERDAY times the day number to the time of + ** January 1, midnight, to get the day. + */ + value = janfirst + rulep->r_day * SECSPERDAY; + break; + + case MONTH_NTH_DAY_OF_WEEK: + /* + ** Mm.n.d - nth "dth day" of month m. + */ + value = janfirst; + for (i = 0; i < rulep->r_mon - 1; ++i) + value += mon_lengths[leapyear][i] * SECSPERDAY; + + /* + ** Use Zeller's Congruence to get day-of-week of first day of + ** month. + */ + m1 = (rulep->r_mon + 9) % 12 + 1; + yy0 = (rulep->r_mon <= 2) ? (year - 1) : year; + yy1 = yy0 / 100; + yy2 = yy0 % 100; + dow = ((26 * m1 - 2) / 10 + + 1 + yy2 + yy2 / 4 + yy1 / 4 - 2 * yy1) % 7; + if (dow < 0) + dow += DAYSPERWEEK; + + /* + ** "dow" is the day-of-week of the first day of the month. Get + ** the day-of-month (zero-origin) of the first "dow" day of the + ** month. + */ + d = rulep->r_day - dow; + if (d < 0) + d += DAYSPERWEEK; + for (i = 1; i < rulep->r_week; ++i) { + if (d + DAYSPERWEEK >= + mon_lengths[leapyear][rulep->r_mon - 1]) + break; + d += DAYSPERWEEK; + } + + /* + ** "d" is the day-of-month (zero-origin) of the day we want. + */ + value += d * SECSPERDAY; + break; + } + + /* + ** "value" is the Epoch-relative time of 00:00:00 UTC on the day in + ** question. To get the Epoch-relative time of the specified local + ** time on that day, add the transition time and the current offset + ** from UTC. + */ + return value + rulep->r_time + offset; +} + +/* +** Given a POSIX section 8-style TZ string, fill in the rule tables as +** appropriate. +*/ + +static int +tzparse(name, sp, lastditch) +const char * name; +register struct state * const sp; +const int lastditch; +{ + const char * stdname; + const char * dstname; + size_t stdlen; + size_t dstlen; + long stdoffset; + long dstoffset; + register time_t * atp; + register unsigned char * typep; + register char * cp; + register int load_result; + + INITIALIZE(dstname); + stdname = name; + if (lastditch) { + stdlen = strlen(name); /* length of standard zone name */ + name += stdlen; + if (stdlen >= sizeof sp->chars) + stdlen = (sizeof sp->chars) - 1; + stdoffset = 0; + } else { + if (*name == '<') { + name++; + stdname = name; + name = getqzname(name, '>'); + if (*name != '>') + return (-1); + stdlen = name - stdname; + name++; + } else { + name = getzname(name); + stdlen = name - stdname; + } + if (*name == '\0') + return -1; + name = getoffset(name, &stdoffset); + if (name == NULL) + return -1; + } + load_result = tzload(TZDEFRULES, sp, FALSE); + if (load_result != 0) + sp->leapcnt = 0; /* so, we're off a little */ + if (*name != '\0') { + if (*name == '<') { + dstname = ++name; + name = getqzname(name, '>'); + if (*name != '>') + return -1; + dstlen = name - dstname; + name++; + } else { + dstname = name; + name = getzname(name); + dstlen = name - dstname; /* length of DST zone name */ + } + if (*name != '\0' && *name != ',' && *name != ';') { + name = getoffset(name, &dstoffset); + if (name == NULL) + return -1; + } else dstoffset = stdoffset - SECSPERHOUR; + if (*name == '\0' && load_result != 0) + name = TZDEFRULESTRING; + if (*name == ',' || *name == ';') { + struct rule start; + struct rule end; + register int year; + register time_t janfirst; + time_t starttime; + time_t endtime; + + ++name; + if ((name = getrule(name, &start)) == NULL) + return -1; + if (*name++ != ',') + return -1; + if ((name = getrule(name, &end)) == NULL) + return -1; + if (*name != '\0') + return -1; + sp->typecnt = 2; /* standard time and DST */ + /* + ** Two transitions per year, from EPOCH_YEAR forward. + */ + sp->ttis[0].tt_gmtoff = -dstoffset; + sp->ttis[0].tt_isdst = 1; + sp->ttis[0].tt_abbrind = stdlen + 1; + sp->ttis[1].tt_gmtoff = -stdoffset; + sp->ttis[1].tt_isdst = 0; + sp->ttis[1].tt_abbrind = 0; + atp = sp->ats; + typep = sp->types; + janfirst = 0; + sp->timecnt = 0; + for (year = EPOCH_YEAR; + sp->timecnt + 2 <= TZ_MAX_TIMES; + ++year) { + time_t newfirst; + + starttime = transtime(janfirst, year, &start, + stdoffset); + endtime = transtime(janfirst, year, &end, + dstoffset); + if (starttime > endtime) { + *atp++ = endtime; + *typep++ = 1; /* DST ends */ + *atp++ = starttime; + *typep++ = 0; /* DST begins */ + } else { + *atp++ = starttime; + *typep++ = 0; /* DST begins */ + *atp++ = endtime; + *typep++ = 1; /* DST ends */ + } + sp->timecnt += 2; + newfirst = janfirst; + newfirst += year_lengths[isleap(year)] * + SECSPERDAY; + if (newfirst <= janfirst) + break; + janfirst = newfirst; + } + } else { + register long theirstdoffset; + register long theirdstoffset; + register long theiroffset; + register int isdst; + register int i; + register int j; + + if (*name != '\0') + return -1; + /* + ** Initial values of theirstdoffset and theirdstoffset. + */ + theirstdoffset = 0; + for (i = 0; i < sp->timecnt; ++i) { + j = sp->types[i]; + if (!sp->ttis[j].tt_isdst) { + theirstdoffset = + -sp->ttis[j].tt_gmtoff; + break; + } + } + theirdstoffset = 0; + for (i = 0; i < sp->timecnt; ++i) { + j = sp->types[i]; + if (sp->ttis[j].tt_isdst) { + theirdstoffset = + -sp->ttis[j].tt_gmtoff; + break; + } + } + /* + ** Initially we're assumed to be in standard time. + */ + isdst = FALSE; + theiroffset = theirstdoffset; + /* + ** Now juggle transition times and types + ** tracking offsets as you do. + */ + for (i = 0; i < sp->timecnt; ++i) { + j = sp->types[i]; + sp->types[i] = sp->ttis[j].tt_isdst; + if (sp->ttis[j].tt_ttisgmt) { + /* No adjustment to transition time */ + } else { + /* + ** If summer time is in effect, and the + ** transition time was not specified as + ** standard time, add the summer time + ** offset to the transition time; + ** otherwise, add the standard time + ** offset to the transition time. + */ + /* + ** Transitions from DST to DDST + ** will effectively disappear since + ** POSIX provides for only one DST + ** offset. + */ + if (isdst && !sp->ttis[j].tt_ttisstd) { + sp->ats[i] += dstoffset - + theirdstoffset; + } else { + sp->ats[i] += stdoffset - + theirstdoffset; + } + } + theiroffset = -sp->ttis[j].tt_gmtoff; + if (sp->ttis[j].tt_isdst) + theirdstoffset = theiroffset; + else theirstdoffset = theiroffset; + } + /* + ** Finally, fill in ttis. + ** ttisstd and ttisgmt need not be handled. + */ + sp->ttis[0].tt_gmtoff = -stdoffset; + sp->ttis[0].tt_isdst = FALSE; + sp->ttis[0].tt_abbrind = 0; + sp->ttis[1].tt_gmtoff = -dstoffset; + sp->ttis[1].tt_isdst = TRUE; + sp->ttis[1].tt_abbrind = stdlen + 1; + sp->typecnt = 2; + } + } else { + dstlen = 0; + sp->typecnt = 1; /* only standard time */ + sp->timecnt = 0; + sp->ttis[0].tt_gmtoff = -stdoffset; + sp->ttis[0].tt_isdst = 0; + sp->ttis[0].tt_abbrind = 0; + } + sp->charcnt = stdlen + 1; + if (dstlen != 0) + sp->charcnt += dstlen + 1; + if ((size_t) sp->charcnt > sizeof sp->chars) + return -1; + cp = sp->chars; + (void) strncpy(cp, stdname, stdlen); + cp += stdlen; + *cp++ = '\0'; + if (dstlen != 0) { + (void) strncpy(cp, dstname, dstlen); + *(cp + dstlen) = '\0'; + } + return 0; +} + +static void +gmtload(sp) +struct state * const sp; +{ + if (tzload(gmt, sp, TRUE) != 0) + (void) tzparse(gmt, sp, TRUE); +} + +#ifndef STD_INSPIRED +/* +** A non-static declaration of tzsetwall in a system header file +** may cause a warning about this upcoming static declaration... +*/ +static +#endif /* !defined STD_INSPIRED */ +void +tzsetwall(void) +{ + if (lcl_is_set < 0) + return; + lcl_is_set = -1; + +#ifdef ALL_STATE + if (lclptr == NULL) { + lclptr = (struct state *) malloc(sizeof *lclptr); + if (lclptr == NULL) { + settzname(); /* all we can do */ + return; + } + } +#endif /* defined ALL_STATE */ + if (tzload((char *) NULL, lclptr, TRUE) != 0) + gmtload(lclptr); + settzname(); +} + +void +tzset(void) +{ + register const char * name; + + name = getenv("TZ"); + if (name == NULL) { + tzsetwall(); + return; + } + + if (lcl_is_set > 0 && strcmp(lcl_TZname, name) == 0) + return; + lcl_is_set = strlen(name) < sizeof lcl_TZname; + if (lcl_is_set) + (void) strcpy(lcl_TZname, name); + +#ifdef ALL_STATE + if (lclptr == NULL) { + lclptr = (struct state *) malloc(sizeof *lclptr); + if (lclptr == NULL) { + settzname(); /* all we can do */ + return; + } + } +#endif /* defined ALL_STATE */ + if (*name == '\0') { + /* + ** User wants it fast rather than right. + */ + lclptr->leapcnt = 0; /* so, we're off a little */ + lclptr->timecnt = 0; + lclptr->typecnt = 0; + lclptr->ttis[0].tt_isdst = 0; + lclptr->ttis[0].tt_gmtoff = 0; + lclptr->ttis[0].tt_abbrind = 0; + (void) strcpy(lclptr->chars, gmt); + } else if (tzload(name, lclptr, TRUE) != 0) + if (name[0] == ':' || tzparse(name, lclptr, FALSE) != 0) + (void) gmtload(lclptr); + settzname(); +} + +/* +** The easy way to behave "as if no library function calls" localtime +** is to not call it--so we drop its guts into "localsub", which can be +** freely called. (And no, the PANS doesn't require the above behavior-- +** but it *is* desirable.) +** +** The unused offset argument is for the benefit of mktime variants. +*/ + +/*ARGSUSED*/ +static struct tm * +localsub(timep, offset, tmp) +const time_t * const timep; +const long offset; +struct tm * const tmp; +{ + register struct state * sp; + register const struct ttinfo * ttisp; + register int i; + register struct tm * result; + const time_t t = *timep; + + sp = lclptr; +#ifdef ALL_STATE + if (sp == NULL) + return gmtsub(timep, offset, tmp); +#endif /* defined ALL_STATE */ + if ((sp->goback && t < sp->ats[0]) || + (sp->goahead && t > sp->ats[sp->timecnt - 1])) { + time_t newt = t; + register time_t seconds; + register time_t tcycles; + register int_fast64_t icycles; + + if (t < sp->ats[0]) + seconds = sp->ats[0] - t; + else seconds = t - sp->ats[sp->timecnt - 1]; + --seconds; + tcycles = seconds / YEARSPERREPEAT / AVGSECSPERYEAR; + ++tcycles; + icycles = tcycles; + if (tcycles - icycles >= 1 || icycles - tcycles >= 1) + return NULL; + seconds = icycles; + seconds *= YEARSPERREPEAT; + seconds *= AVGSECSPERYEAR; + if (t < sp->ats[0]) + newt += seconds; + else newt -= seconds; + if (newt < sp->ats[0] || + newt > sp->ats[sp->timecnt - 1]) + return NULL; /* "cannot happen" */ + result = localsub(&newt, offset, tmp); + if (result == tmp) { + register time_t newy; + + newy = tmp->tm_year; + if (t < sp->ats[0]) + newy -= icycles * YEARSPERREPEAT; + else newy += icycles * YEARSPERREPEAT; + tmp->tm_year = newy; + if (tmp->tm_year != newy) + return NULL; + } + return result; + } + if (sp->timecnt == 0 || t < sp->ats[0]) { + i = 0; + while (sp->ttis[i].tt_isdst) + if (++i >= sp->typecnt) { + i = 0; + break; + } + } else { + register int lo = 1; + register int hi = sp->timecnt; + + while (lo < hi) { + register int mid = (lo + hi) >> 1; + + if (t < sp->ats[mid]) + hi = mid; + else lo = mid + 1; + } + i = (int) sp->types[lo - 1]; + } + ttisp = &sp->ttis[i]; + /* + ** To get (wrong) behavior that's compatible with System V Release 2.0 + ** you'd replace the statement below with + ** t += ttisp->tt_gmtoff; + ** timesub(&t, 0L, sp, tmp); + */ + result = timesub(&t, ttisp->tt_gmtoff, sp, tmp); + tmp->tm_isdst = ttisp->tt_isdst; + tzname[tmp->tm_isdst] = &sp->chars[ttisp->tt_abbrind]; +#ifdef TM_ZONE + tmp->TM_ZONE = &sp->chars[ttisp->tt_abbrind]; +#endif /* defined TM_ZONE */ + return result; +} + +struct tm * +localtime(timep) +const time_t * const timep; +{ + tzset(); + return localsub(timep, 0L, &tm); +} + +/* +** Re-entrant version of localtime. +*/ + +struct tm * +localtime_r(timep, tmp) +const time_t * const timep; +struct tm * tmp; +{ + return localsub(timep, 0L, tmp); +} + +/* +** gmtsub is to gmtime as localsub is to localtime. +*/ + +static struct tm * +gmtsub(timep, offset, tmp) +const time_t * const timep; +const long offset; +struct tm * const tmp; +{ + register struct tm * result; + + if (!gmt_is_set) { + gmt_is_set = TRUE; +#ifdef ALL_STATE + gmtptr = (struct state *) malloc(sizeof *gmtptr); + if (gmtptr != NULL) +#endif /* defined ALL_STATE */ + gmtload(gmtptr); + } + result = timesub(timep, offset, gmtptr, tmp); +#ifdef TM_ZONE + /* + ** Could get fancy here and deliver something such as + ** "UTC+xxxx" or "UTC-xxxx" if offset is non-zero, + ** but this is no time for a treasure hunt. + */ + if (offset != 0) + tmp->TM_ZONE = wildabbr; + else { +#ifdef ALL_STATE + if (gmtptr == NULL) + tmp->TM_ZONE = gmt; + else tmp->TM_ZONE = gmtptr->chars; +#endif /* defined ALL_STATE */ +#ifndef ALL_STATE + tmp->TM_ZONE = gmtptr->chars; +#endif /* State Farm */ + } +#endif /* defined TM_ZONE */ + return result; +} + +struct tm * +gmtime(timep) +const time_t * const timep; +{ + return gmtsub(timep, 0L, &tm); +} + +/* +* Re-entrant version of gmtime. +*/ + +struct tm * +gmtime_r(timep, tmp) +const time_t * const timep; +struct tm * tmp; +{ + return gmtsub(timep, 0L, tmp); +} + +#ifdef STD_INSPIRED + +struct tm * +offtime(timep, offset) +const time_t * const timep; +const long offset; +{ + return gmtsub(timep, offset, &tm); +} + +#endif /* defined STD_INSPIRED */ + +/* +** Return the number of leap years through the end of the given year +** where, to make the math easy, the answer for year zero is defined as zero. +*/ + +static int +leaps_thru_end_of(y) +register const int y; +{ + return (y >= 0) ? (y / 4 - y / 100 + y / 400) : + -(leaps_thru_end_of(-(y + 1)) + 1); +} + +static struct tm * +timesub(timep, offset, sp, tmp) +const time_t * const timep; +const long offset; +register const struct state * const sp; +register struct tm * const tmp; +{ + register const struct lsinfo * lp; + register time_t tdays; + register int idays; /* unsigned would be so 2003 */ + register long rem; + int y; + register const int * ip; + register long corr; + register int hit; + register int i; + + corr = 0; + hit = 0; +#ifdef ALL_STATE + i = (sp == NULL) ? 0 : sp->leapcnt; +#endif /* defined ALL_STATE */ +#ifndef ALL_STATE + i = sp->leapcnt; +#endif /* State Farm */ + while (--i >= 0) { + lp = &sp->lsis[i]; + if (*timep >= lp->ls_trans) { + if (*timep == lp->ls_trans) { + hit = ((i == 0 && lp->ls_corr > 0) || + lp->ls_corr > sp->lsis[i - 1].ls_corr); + if (hit) + while (i > 0 && + sp->lsis[i].ls_trans == + sp->lsis[i - 1].ls_trans + 1 && + sp->lsis[i].ls_corr == + sp->lsis[i - 1].ls_corr + 1) { + ++hit; + --i; + } + } + corr = lp->ls_corr; + break; + } + } + y = EPOCH_YEAR; + tdays = *timep / SECSPERDAY; + rem = *timep - tdays * SECSPERDAY; + while (tdays < 0 || tdays >= year_lengths[isleap(y)]) { + int newy; + register time_t tdelta; + register int idelta; + register int leapdays; + + tdelta = tdays / DAYSPERLYEAR; + idelta = tdelta; + if (tdelta - idelta >= 1 || idelta - tdelta >= 1) + return NULL; + if (idelta == 0) + idelta = (tdays < 0) ? -1 : 1; + newy = y; + if (increment_overflow(&newy, idelta)) + return NULL; + leapdays = leaps_thru_end_of(newy - 1) - + leaps_thru_end_of(y - 1); + tdays -= ((time_t) newy - y) * DAYSPERNYEAR; + tdays -= leapdays; + y = newy; + } + { + register long seconds; + + seconds = tdays * SECSPERDAY + 0.5; + tdays = seconds / SECSPERDAY; + rem += seconds - tdays * SECSPERDAY; + } + /* + ** Given the range, we can now fearlessly cast... + */ + idays = tdays; + rem += offset - corr; + while (rem < 0) { + rem += SECSPERDAY; + --idays; + } + while (rem >= SECSPERDAY) { + rem -= SECSPERDAY; + ++idays; + } + while (idays < 0) { + if (increment_overflow(&y, -1)) + return NULL; + idays += year_lengths[isleap(y)]; + } + while (idays >= year_lengths[isleap(y)]) { + idays -= year_lengths[isleap(y)]; + if (increment_overflow(&y, 1)) + return NULL; + } + tmp->tm_year = y; + if (increment_overflow(&tmp->tm_year, -TM_YEAR_BASE)) + return NULL; + tmp->tm_yday = idays; + /* + ** The "extra" mods below avoid overflow problems. + */ + tmp->tm_wday = EPOCH_WDAY + + ((y - EPOCH_YEAR) % DAYSPERWEEK) * + (DAYSPERNYEAR % DAYSPERWEEK) + + leaps_thru_end_of(y - 1) - + leaps_thru_end_of(EPOCH_YEAR - 1) + + idays; + tmp->tm_wday %= DAYSPERWEEK; + if (tmp->tm_wday < 0) + tmp->tm_wday += DAYSPERWEEK; + tmp->tm_hour = (int) (rem / SECSPERHOUR); + rem %= SECSPERHOUR; + tmp->tm_min = (int) (rem / SECSPERMIN); + /* + ** A positive leap second requires a special + ** representation. This uses "... ??:59:60" et seq. + */ + tmp->tm_sec = (int) (rem % SECSPERMIN) + hit; + ip = mon_lengths[isleap(y)]; + for (tmp->tm_mon = 0; idays >= ip[tmp->tm_mon]; ++(tmp->tm_mon)) + idays -= ip[tmp->tm_mon]; + tmp->tm_mday = (int) (idays + 1); + tmp->tm_isdst = 0; +#ifdef TM_GMTOFF + tmp->TM_GMTOFF = offset; +#endif /* defined TM_GMTOFF */ + return tmp; +} + +char * +ctime(timep) +const time_t * const timep; +{ +/* +** Section 4.12.3.2 of X3.159-1989 requires that +** The ctime function converts the calendar time pointed to by timer +** to local time in the form of a string. It is equivalent to +** asctime(localtime(timer)) +*/ + return asctime(localtime(timep)); +} + +char * +ctime_r(timep, buf) +const time_t * const timep; +char * buf; +{ + struct tm mytm; + + return asctime_r(localtime_r(timep, &mytm), buf); +} + +/* +** Adapted from code provided by Robert Elz, who writes: +** The "best" way to do mktime I think is based on an idea of Bob +** Kridle's (so its said...) from a long time ago. +** It does a binary search of the time_t space. Since time_t's are +** just 32 bits, its a max of 32 iterations (even at 64 bits it +** would still be very reasonable). +*/ + +#ifndef WRONG +#define WRONG (-1) +#endif /* !defined WRONG */ + +/* +** Simplified normalize logic courtesy Paul Eggert. +*/ + +static int +increment_overflow(number, delta) +int * number; +int delta; +{ + int number0; + + number0 = *number; + *number += delta; + return (*number < number0) != (delta < 0); +} + +static int +long_increment_overflow(number, delta) +long * number; +int delta; +{ + long number0; + + number0 = *number; + *number += delta; + return (*number < number0) != (delta < 0); +} + +static int +normalize_overflow(tensptr, unitsptr, base) +int * const tensptr; +int * const unitsptr; +const int base; +{ + register int tensdelta; + + tensdelta = (*unitsptr >= 0) ? + (*unitsptr / base) : + (-1 - (-1 - *unitsptr) / base); + *unitsptr -= tensdelta * base; + return increment_overflow(tensptr, tensdelta); +} + +static int +long_normalize_overflow(tensptr, unitsptr, base) +long * const tensptr; +int * const unitsptr; +const int base; +{ + register int tensdelta; + + tensdelta = (*unitsptr >= 0) ? + (*unitsptr / base) : + (-1 - (-1 - *unitsptr) / base); + *unitsptr -= tensdelta * base; + return long_increment_overflow(tensptr, tensdelta); +} + +static int +tmcomp(atmp, btmp) +register const struct tm * const atmp; +register const struct tm * const btmp; +{ + register int result; + + if ((result = (atmp->tm_year - btmp->tm_year)) == 0 && + (result = (atmp->tm_mon - btmp->tm_mon)) == 0 && + (result = (atmp->tm_mday - btmp->tm_mday)) == 0 && + (result = (atmp->tm_hour - btmp->tm_hour)) == 0 && + (result = (atmp->tm_min - btmp->tm_min)) == 0) + result = atmp->tm_sec - btmp->tm_sec; + return result; +} + +static time_t +time2sub(tmp, funcp, offset, okayp, do_norm_secs) +struct tm * const tmp; +struct tm * (* const funcp)(const time_t*, long, struct tm*); +const long offset; +int * const okayp; +const int do_norm_secs; +{ + register const struct state * sp; + register int dir; + register int i, j; + register int saved_seconds; + register long li; + register time_t lo; + register time_t hi; + long y; + time_t newt; + time_t t; + struct tm yourtm, mytm; + + *okayp = FALSE; + yourtm = *tmp; + if (do_norm_secs) { + if (normalize_overflow(&yourtm.tm_min, &yourtm.tm_sec, + SECSPERMIN)) + return WRONG; + } + if (normalize_overflow(&yourtm.tm_hour, &yourtm.tm_min, MINSPERHOUR)) + return WRONG; + if (normalize_overflow(&yourtm.tm_mday, &yourtm.tm_hour, HOURSPERDAY)) + return WRONG; + y = yourtm.tm_year; + if (long_normalize_overflow(&y, &yourtm.tm_mon, MONSPERYEAR)) + return WRONG; + /* + ** Turn y into an actual year number for now. + ** It is converted back to an offset from TM_YEAR_BASE later. + */ + if (long_increment_overflow(&y, TM_YEAR_BASE)) + return WRONG; + while (yourtm.tm_mday <= 0) { + if (long_increment_overflow(&y, -1)) + return WRONG; + li = y + (1 < yourtm.tm_mon); + yourtm.tm_mday += year_lengths[isleap(li)]; + } + while (yourtm.tm_mday > DAYSPERLYEAR) { + li = y + (1 < yourtm.tm_mon); + yourtm.tm_mday -= year_lengths[isleap(li)]; + if (long_increment_overflow(&y, 1)) + return WRONG; + } + for ( ; ; ) { + i = mon_lengths[isleap(y)][yourtm.tm_mon]; + if (yourtm.tm_mday <= i) + break; + yourtm.tm_mday -= i; + if (++yourtm.tm_mon >= MONSPERYEAR) { + yourtm.tm_mon = 0; + if (long_increment_overflow(&y, 1)) + return WRONG; + } + } + if (long_increment_overflow(&y, -TM_YEAR_BASE)) + return WRONG; + yourtm.tm_year = y; + if (yourtm.tm_year != y) + return WRONG; + if (yourtm.tm_sec >= 0 && yourtm.tm_sec < SECSPERMIN) + saved_seconds = 0; + else if (y + TM_YEAR_BASE < EPOCH_YEAR) { + /* + ** We can't set tm_sec to 0, because that might push the + ** time below the minimum representable time. + ** Set tm_sec to 59 instead. + ** This assumes that the minimum representable time is + ** not in the same minute that a leap second was deleted from, + ** which is a safer assumption than using 58 would be. + */ + if (increment_overflow(&yourtm.tm_sec, 1 - SECSPERMIN)) + return WRONG; + saved_seconds = yourtm.tm_sec; + yourtm.tm_sec = SECSPERMIN - 1; + } else { + saved_seconds = yourtm.tm_sec; + yourtm.tm_sec = 0; + } + /* + ** Do a binary search (this works whatever time_t's type is). + */ + if (!TYPE_SIGNED(time_t)) { + lo = 0; + hi = lo - 1; + } else if (!TYPE_INTEGRAL(time_t)) { + if (sizeof(time_t) > sizeof(float)) + hi = (time_t) DBL_MAX; + else hi = (time_t) FLT_MAX; + lo = -hi; + } else { + lo = 1; + for (i = 0; i < (int) TYPE_BIT(time_t) - 1; ++i) + lo *= 2; + hi = -(lo + 1); + } + for ( ; ; ) { + t = lo / 2 + hi / 2; + if (t < lo) + t = lo; + else if (t > hi) + t = hi; + if ((*funcp)(&t, offset, &mytm) == NULL) { + /* + ** Assume that t is too extreme to be represented in + ** a struct tm; arrange things so that it is less + ** extreme on the next pass. + */ + dir = (t > 0) ? 1 : -1; + } else dir = tmcomp(&mytm, &yourtm); + if (dir != 0) { + if (t == lo) { + ++t; + if (t <= lo) + return WRONG; + ++lo; + } else if (t == hi) { + --t; + if (t >= hi) + return WRONG; + --hi; + } + if (lo > hi) + return WRONG; + if (dir > 0) + hi = t; + else lo = t; + continue; + } + if (yourtm.tm_isdst < 0 || mytm.tm_isdst == yourtm.tm_isdst) + break; + /* + ** Right time, wrong type. + ** Hunt for right time, right type. + ** It's okay to guess wrong since the guess + ** gets checked. + */ + sp = (const struct state *) + ((funcp == localsub) ? lclptr : gmtptr); +#ifdef ALL_STATE + if (sp == NULL) + return WRONG; +#endif /* defined ALL_STATE */ + for (i = sp->typecnt - 1; i >= 0; --i) { + if (sp->ttis[i].tt_isdst != yourtm.tm_isdst) + continue; + for (j = sp->typecnt - 1; j >= 0; --j) { + if (sp->ttis[j].tt_isdst == yourtm.tm_isdst) + continue; + newt = t + sp->ttis[j].tt_gmtoff - + sp->ttis[i].tt_gmtoff; + if ((*funcp)(&newt, offset, &mytm) == NULL) + continue; + if (tmcomp(&mytm, &yourtm) != 0) + continue; + if (mytm.tm_isdst != yourtm.tm_isdst) + continue; + /* + ** We have a match. + */ + t = newt; + goto label; + } + } + return WRONG; + } +label: + newt = t + saved_seconds; + if ((newt < t) != (saved_seconds < 0)) + return WRONG; + t = newt; + if ((*funcp)(&t, offset, tmp)) + *okayp = TRUE; + return t; +} + +static time_t +time2(tmp, funcp, offset, okayp) +struct tm * const tmp; +struct tm * (* const funcp)(const time_t*, long, struct tm*); +const long offset; +int * const okayp; +{ + time_t t; + + /* + ** First try without normalization of seconds + ** (in case tm_sec contains a value associated with a leap second). + ** If that fails, try with normalization of seconds. + */ + t = time2sub(tmp, funcp, offset, okayp, FALSE); + return *okayp ? t : time2sub(tmp, funcp, offset, okayp, TRUE); +} + +static time_t +time1(tmp, funcp, offset) +struct tm * const tmp; +struct tm * (* const funcp)(const time_t *, long, struct tm *); +const long offset; +{ + register time_t t; + register const struct state * sp; + register int samei, otheri; + register int sameind, otherind; + register int i; + register int nseen; + int seen[TZ_MAX_TYPES]; + int types[TZ_MAX_TYPES]; + int okay; + + if (tmp->tm_isdst > 1) + tmp->tm_isdst = 1; + t = time2(tmp, funcp, offset, &okay); +#ifdef PCTS + /* + ** PCTS code courtesy Grant Sullivan. + */ + if (okay) + return t; + if (tmp->tm_isdst < 0) + tmp->tm_isdst = 0; /* reset to std and try again */ +#endif /* defined PCTS */ +#ifndef PCTS + if (okay || tmp->tm_isdst < 0) + return t; +#endif /* !defined PCTS */ + /* + ** We're supposed to assume that somebody took a time of one type + ** and did some math on it that yielded a "struct tm" that's bad. + ** We try to divine the type they started from and adjust to the + ** type they need. + */ + sp = (const struct state *) ((funcp == localsub) ? lclptr : gmtptr); +#ifdef ALL_STATE + if (sp == NULL) + return WRONG; +#endif /* defined ALL_STATE */ + for (i = 0; i < sp->typecnt; ++i) + seen[i] = FALSE; + nseen = 0; + for (i = sp->timecnt - 1; i >= 0; --i) + if (!seen[sp->types[i]]) { + seen[sp->types[i]] = TRUE; + types[nseen++] = sp->types[i]; + } + for (sameind = 0; sameind < nseen; ++sameind) { + samei = types[sameind]; + if (sp->ttis[samei].tt_isdst != tmp->tm_isdst) + continue; + for (otherind = 0; otherind < nseen; ++otherind) { + otheri = types[otherind]; + if (sp->ttis[otheri].tt_isdst == tmp->tm_isdst) + continue; + tmp->tm_sec += sp->ttis[otheri].tt_gmtoff - + sp->ttis[samei].tt_gmtoff; + tmp->tm_isdst = !tmp->tm_isdst; + t = time2(tmp, funcp, offset, &okay); + if (okay) + return t; + tmp->tm_sec -= sp->ttis[otheri].tt_gmtoff - + sp->ttis[samei].tt_gmtoff; + tmp->tm_isdst = !tmp->tm_isdst; + } + } + return WRONG; +} + +time_t +mktime(tmp) +struct tm * const tmp; +{ + tzset(); + return time1(tmp, localsub, 0L); +} + +#ifdef STD_INSPIRED + +time_t +timelocal(tmp) +struct tm * const tmp; +{ + tmp->tm_isdst = -1; /* in case it wasn't initialized */ + return mktime(tmp); +} + +time_t +timegm(tmp) +struct tm * const tmp; +{ + tmp->tm_isdst = 0; + return time1(tmp, gmtsub, 0L); +} + +time_t +timeoff(tmp, offset) +struct tm * const tmp; +const long offset; +{ + tmp->tm_isdst = 0; + return time1(tmp, gmtsub, offset); +} + +#endif /* defined STD_INSPIRED */ + +#ifdef CMUCS + +/* +** The following is supplied for compatibility with +** previous versions of the CMUCS runtime library. +*/ + +long +gtime(tmp) +struct tm * const tmp; +{ + const time_t t = mktime(tmp); + + if (t == WRONG) + return -1; + return t; +} + +#endif /* defined CMUCS */ + +/* +** XXX--is the below the right way to conditionalize?? +*/ + +#ifdef STD_INSPIRED + +/* +** IEEE Std 1003.1-1988 (POSIX) legislates that 536457599 +** shall correspond to "Wed Dec 31 23:59:59 UTC 1986", which +** is not the case if we are accounting for leap seconds. +** So, we provide the following conversion routines for use +** when exchanging timestamps with POSIX conforming systems. +*/ + +static long +leapcorr(timep) +time_t * timep; +{ + register struct state * sp; + register struct lsinfo * lp; + register int i; + + sp = lclptr; + i = sp->leapcnt; + while (--i >= 0) { + lp = &sp->lsis[i]; + if (*timep >= lp->ls_trans) + return lp->ls_corr; + } + return 0; +} + +time_t +time2posix(t) +time_t t; +{ + tzset(); + return t - leapcorr(&t); +} + +time_t +posix2time(t) +time_t t; +{ + time_t x; + time_t y; + + tzset(); + /* + ** For a positive leap second hit, the result + ** is not unique. For a negative leap second + ** hit, the corresponding time doesn't exist, + ** so we return an adjacent second. + */ + x = t + leapcorr(&t); + y = x - leapcorr(&x); + if (y < t) { + do { + x++; + y = x - leapcorr(&x); + } while (y < t); + if (t != y) + return x - 1; + } else if (y > t) { + do { + --x; + y = x - leapcorr(&x); + } while (y > t); + if (t != y) + return x + 1; + } + return x; +} + +#endif /* defined STD_INSPIRED */ Property changes on: vendor/tzcode/tzcode2009h/libc/stdtime/localtime.c ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: vendor/tzcode/tzcode2009h/libc/stdtime/private.h =================================================================== --- vendor/tzcode/tzcode2009h/libc/stdtime/private.h (nonexistent) +++ vendor/tzcode/tzcode2009h/libc/stdtime/private.h (revision 192888) @@ -0,0 +1,298 @@ +#ifndef PRIVATE_H + +#define PRIVATE_H + +/* +** This file is in the public domain, so clarified as of +** 1996-06-05 by Arthur David Olson. +*/ + +/* +** This header is for use ONLY with the time conversion code. +** There is no guarantee that it will remain unchanged, +** or that it will remain at all. +** Do NOT copy it to any system include directory. +** Thank you! +*/ + +/* +** ID +*/ + +#ifndef lint +#ifndef NOID +static char privatehid[] = "@(#)private.h 8.6"; +#endif /* !defined NOID */ +#endif /* !defined lint */ + +#define GRANDPARENTED "Local time zone must be set--see zic manual page" + +/* +** Defaults for preprocessor symbols. +** You can override these in your C compiler options, e.g. `-DHAVE_ADJTIME=0'. +*/ + +#ifndef HAVE_ADJTIME +#define HAVE_ADJTIME 1 +#endif /* !defined HAVE_ADJTIME */ + +#ifndef HAVE_GETTEXT +#define HAVE_GETTEXT 0 +#endif /* !defined HAVE_GETTEXT */ + +#ifndef HAVE_INCOMPATIBLE_CTIME_R +#define HAVE_INCOMPATIBLE_CTIME_R 0 +#endif /* !defined INCOMPATIBLE_CTIME_R */ + +#ifndef HAVE_SETTIMEOFDAY +#define HAVE_SETTIMEOFDAY 3 +#endif /* !defined HAVE_SETTIMEOFDAY */ + +#ifndef HAVE_SYMLINK +#define HAVE_SYMLINK 1 +#endif /* !defined HAVE_SYMLINK */ + +#ifndef HAVE_SYS_STAT_H +#define HAVE_SYS_STAT_H 1 +#endif /* !defined HAVE_SYS_STAT_H */ + +#ifndef HAVE_SYS_WAIT_H +#define HAVE_SYS_WAIT_H 1 +#endif /* !defined HAVE_SYS_WAIT_H */ + +#ifndef HAVE_UNISTD_H +#define HAVE_UNISTD_H 1 +#endif /* !defined HAVE_UNISTD_H */ + +#ifndef HAVE_UTMPX_H +#define HAVE_UTMPX_H 0 +#endif /* !defined HAVE_UTMPX_H */ + +#ifndef LOCALE_HOME +#define LOCALE_HOME "/usr/lib/locale" +#endif /* !defined LOCALE_HOME */ + +#if HAVE_INCOMPATIBLE_CTIME_R +#define asctime_r _incompatible_asctime_r +#define ctime_r _incompatible_ctime_r +#endif /* HAVE_INCOMPATIBLE_CTIME_R */ + +/* +** Nested includes +*/ + +#include "sys/types.h" /* for time_t */ +#include "stdio.h" +#include "errno.h" +#include "string.h" +#include "limits.h" /* for CHAR_BIT et al. */ +#include "time.h" +#include "stdlib.h" + +#if HAVE_GETTEXT +#include "libintl.h" +#endif /* HAVE_GETTEXT */ + +#if HAVE_SYS_WAIT_H +#include /* for WIFEXITED and WEXITSTATUS */ +#endif /* HAVE_SYS_WAIT_H */ + +#ifndef WIFEXITED +#define WIFEXITED(status) (((status) & 0xff) == 0) +#endif /* !defined WIFEXITED */ +#ifndef WEXITSTATUS +#define WEXITSTATUS(status) (((status) >> 8) & 0xff) +#endif /* !defined WEXITSTATUS */ + +#if HAVE_UNISTD_H +#include "unistd.h" /* for F_OK, R_OK, and other POSIX goodness */ +#endif /* HAVE_UNISTD_H */ + +#ifndef F_OK +#define F_OK 0 +#endif /* !defined F_OK */ +#ifndef R_OK +#define R_OK 4 +#endif /* !defined R_OK */ + +/* Unlike 's isdigit, this also works if c < 0 | c > UCHAR_MAX. */ +#define is_digit(c) ((unsigned)(c) - '0' <= 9) + +/* +** Define HAVE_STDINT_H's default value here, rather than at the +** start, since __GLIBC__'s value depends on previously-included +** files. +** (glibc 2.1 and later have stdint.h, even with pre-C99 compilers.) +*/ +#ifndef HAVE_STDINT_H +#define HAVE_STDINT_H \ + (199901 <= __STDC_VERSION__ || \ + 2 < (__GLIBC__ + (0 < __GLIBC_MINOR__))) +#endif /* !defined HAVE_STDINT_H */ + +#if HAVE_STDINT_H +#include "stdint.h" +#endif /* !HAVE_STDINT_H */ + +#ifndef INT_FAST64_MAX +/* Pre-C99 GCC compilers define __LONG_LONG_MAX__ instead of LLONG_MAX. */ +#if defined LLONG_MAX || defined __LONG_LONG_MAX__ +typedef long long int_fast64_t; +#else /* ! (defined LLONG_MAX || defined __LONG_LONG_MAX__) */ +#if (LONG_MAX >> 31) < 0xffffffff +Please use a compiler that supports a 64-bit integer type (or wider); +you may need to compile with "-DHAVE_STDINT_H". +#endif /* (LONG_MAX >> 31) < 0xffffffff */ +typedef long int_fast64_t; +#endif /* ! (defined LLONG_MAX || defined __LONG_LONG_MAX__) */ +#endif /* !defined INT_FAST64_MAX */ + +#ifndef INT32_MAX +#define INT32_MAX 0x7fffffff +#endif /* !defined INT32_MAX */ +#ifndef INT32_MIN +#define INT32_MIN (-1 - INT32_MAX) +#endif /* !defined INT32_MIN */ + +/* +** Workarounds for compilers/systems. +*/ + +/* +** Some time.h implementations don't declare asctime_r. +** Others might define it as a macro. +** Fix the former without affecting the latter. +*/ + +#ifndef asctime_r +extern char * asctime_r(struct tm const *, char *); +#endif + +/* +** Private function declarations. +*/ + +char * icalloc(int nelem, int elsize); +char * icatalloc(char * old, const char * new); +char * icpyalloc(const char * string); +char * imalloc(int n); +void * irealloc(void * pointer, int size); +void icfree(char * pointer); +void ifree(char * pointer); +const char * scheck(const char * string, const char * format); + +/* +** Finally, some convenience items. +*/ + +#ifndef TRUE +#define TRUE 1 +#endif /* !defined TRUE */ + +#ifndef FALSE +#define FALSE 0 +#endif /* !defined FALSE */ + +#ifndef TYPE_BIT +#define TYPE_BIT(type) (sizeof (type) * CHAR_BIT) +#endif /* !defined TYPE_BIT */ + +#ifndef TYPE_SIGNED +#define TYPE_SIGNED(type) (((type) -1) < 0) +#endif /* !defined TYPE_SIGNED */ + +/* +** Since the definition of TYPE_INTEGRAL contains floating point numbers, +** it cannot be used in preprocessor directives. +*/ + +#ifndef TYPE_INTEGRAL +#define TYPE_INTEGRAL(type) (((type) 0.5) != 0.5) +#endif /* !defined TYPE_INTEGRAL */ + +#ifndef INT_STRLEN_MAXIMUM +/* +** 302 / 1000 is log10(2.0) rounded up. +** Subtract one for the sign bit if the type is signed; +** add one for integer division truncation; +** add one more for a minus sign if the type is signed. +*/ +#define INT_STRLEN_MAXIMUM(type) \ + ((TYPE_BIT(type) - TYPE_SIGNED(type)) * 302 / 1000 + \ + 1 + TYPE_SIGNED(type)) +#endif /* !defined INT_STRLEN_MAXIMUM */ + +/* +** INITIALIZE(x) +*/ + +#ifndef GNUC_or_lint +#ifdef lint +#define GNUC_or_lint +#endif /* defined lint */ +#ifndef lint +#ifdef __GNUC__ +#define GNUC_or_lint +#endif /* defined __GNUC__ */ +#endif /* !defined lint */ +#endif /* !defined GNUC_or_lint */ + +#ifndef INITIALIZE +#ifdef GNUC_or_lint +#define INITIALIZE(x) ((x) = 0) +#endif /* defined GNUC_or_lint */ +#ifndef GNUC_or_lint +#define INITIALIZE(x) +#endif /* !defined GNUC_or_lint */ +#endif /* !defined INITIALIZE */ + +/* +** For the benefit of GNU folk... +** `_(MSGID)' uses the current locale's message library string for MSGID. +** The default is to use gettext if available, and use MSGID otherwise. +*/ + +#ifndef _ +#if HAVE_GETTEXT +#define _(msgid) gettext(msgid) +#else /* !HAVE_GETTEXT */ +#define _(msgid) msgid +#endif /* !HAVE_GETTEXT */ +#endif /* !defined _ */ + +#ifndef TZ_DOMAIN +#define TZ_DOMAIN "tz" +#endif /* !defined TZ_DOMAIN */ + +#if HAVE_INCOMPATIBLE_CTIME_R +#undef asctime_r +#undef ctime_r +char *asctime_r(struct tm const *, char *); +char *ctime_r(time_t const *, char *); +#endif /* HAVE_INCOMPATIBLE_CTIME_R */ + +#ifndef YEARSPERREPEAT +#define YEARSPERREPEAT 400 /* years before a Gregorian repeat */ +#endif /* !defined YEARSPERREPEAT */ + +/* +** The Gregorian year averages 365.2425 days, which is 31556952 seconds. +*/ + +#ifndef AVGSECSPERYEAR +#define AVGSECSPERYEAR 31556952L +#endif /* !defined AVGSECSPERYEAR */ + +#ifndef SECSPERREPEAT +#define SECSPERREPEAT ((int_fast64_t) YEARSPERREPEAT * (int_fast64_t) AVGSECSPERYEAR) +#endif /* !defined SECSPERREPEAT */ + +#ifndef SECSPERREPEAT_BITS +#define SECSPERREPEAT_BITS 34 /* ceil(log2(SECSPERREPEAT)) */ +#endif /* !defined SECSPERREPEAT_BITS */ + +/* +** UNIX was a registered trademark of The Open Group in 2003. +*/ + +#endif /* !defined PRIVATE_H */ Property changes on: vendor/tzcode/tzcode2009h/libc/stdtime/private.h ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: vendor/tzcode/tzcode2009h/libc/stdtime/strftime.c =================================================================== --- vendor/tzcode/tzcode2009h/libc/stdtime/strftime.c (nonexistent) +++ vendor/tzcode/tzcode2009h/libc/stdtime/strftime.c (revision 192888) @@ -0,0 +1,761 @@ +#ifndef lint +#ifndef NOID +static char elsieid[] = "@(#)strftime.c 8.3"; +/* +** Based on the UCB version with the ID appearing below. +** This is ANSIish only when "multibyte character == plain character". +*/ +#endif /* !defined NOID */ +#endif /* !defined lint */ + +#include "private.h" + +/* +** Copyright (c) 1989 The Regents of the University of California. +** All rights reserved. +** +** Redistribution and use in source and binary forms are permitted +** provided that the above copyright notice and this paragraph are +** duplicated in all such forms and that any documentation, +** advertising materials, and other materials related to such +** distribution and use acknowledge that the software was developed +** by the University of California, Berkeley. The name of the +** University may not be used to endorse or promote products derived +** from this software without specific prior written permission. +** THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR +** IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED +** WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +*/ + +#ifndef LIBC_SCCS +#ifndef lint +static const char sccsid[] = "@(#)strftime.c 5.4 (Berkeley) 3/14/89"; +#endif /* !defined lint */ +#endif /* !defined LIBC_SCCS */ + +#include "tzfile.h" +#include "fcntl.h" +#include "locale.h" + +struct lc_time_T { + const char * mon[MONSPERYEAR]; + const char * month[MONSPERYEAR]; + const char * wday[DAYSPERWEEK]; + const char * weekday[DAYSPERWEEK]; + const char * X_fmt; + const char * x_fmt; + const char * c_fmt; + const char * am; + const char * pm; + const char * date_fmt; +}; + +#ifdef LOCALE_HOME +#include "sys/stat.h" +static struct lc_time_T localebuf; +static struct lc_time_T * _loc(void); +#define Locale _loc() +#endif /* defined LOCALE_HOME */ +#ifndef LOCALE_HOME +#define Locale (&C_time_locale) +#endif /* !defined LOCALE_HOME */ + +static const struct lc_time_T C_time_locale = { + { + "Jan", "Feb", "Mar", "Apr", "May", "Jun", + "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" + }, { + "January", "February", "March", "April", "May", "June", + "July", "August", "September", "October", "November", "December" + }, { + "Sun", "Mon", "Tue", "Wed", + "Thu", "Fri", "Sat" + }, { + "Sunday", "Monday", "Tuesday", "Wednesday", + "Thursday", "Friday", "Saturday" + }, + + /* X_fmt */ + "%H:%M:%S", + + /* + ** x_fmt + ** C99 requires this format. + ** Using just numbers (as here) makes Quakers happier; + ** it's also compatible with SVR4. + */ + "%m/%d/%y", + + /* + ** c_fmt + ** C99 requires this format. + ** Previously this code used "%D %X", but we now conform to C99. + ** Note that + ** "%a %b %d %H:%M:%S %Y" + ** is used by Solaris 2.3. + */ + "%a %b %e %T %Y", + + /* am */ + "AM", + + /* pm */ + "PM", + + /* date_fmt */ + "%a %b %e %H:%M:%S %Z %Y" +}; + +static char * _add(const char *, char *, const char *); +static char * _conv(int, const char *, char *, const char *); +static char * _fmt(const char *, const struct tm *, char *, const char *, + int *); +static char * _yconv(int, int, int, int, char *, const char *); + +extern char * tzname[]; + +#ifndef YEAR_2000_NAME +#define YEAR_2000_NAME "CHECK_STRFTIME_FORMATS_FOR_TWO_DIGIT_YEARS" +#endif /* !defined YEAR_2000_NAME */ + +#define IN_NONE 0 +#define IN_SOME 1 +#define IN_THIS 2 +#define IN_ALL 3 + +size_t +strftime(s, maxsize, format, t) +char * const s; +const size_t maxsize; +const char * const format; +const struct tm * const t; +{ + char * p; + int warn; + + tzset(); +#ifdef LOCALE_HOME + localebuf.mon[0] = 0; +#endif /* defined LOCALE_HOME */ + warn = IN_NONE; + p = _fmt(((format == NULL) ? "%c" : format), t, s, s + maxsize, &warn); +#ifndef NO_RUN_TIME_WARNINGS_ABOUT_YEAR_2000_PROBLEMS_THANK_YOU + if (warn != IN_NONE && getenv(YEAR_2000_NAME) != NULL) { + (void) fprintf(stderr, "\n"); + if (format == NULL) + (void) fprintf(stderr, "NULL strftime format "); + else (void) fprintf(stderr, "strftime format \"%s\" ", + format); + (void) fprintf(stderr, "yields only two digits of years in "); + if (warn == IN_SOME) + (void) fprintf(stderr, "some locales"); + else if (warn == IN_THIS) + (void) fprintf(stderr, "the current locale"); + else (void) fprintf(stderr, "all locales"); + (void) fprintf(stderr, "\n"); + } +#endif /* !defined NO_RUN_TIME_WARNINGS_ABOUT_YEAR_2000_PROBLEMS_THANK_YOU */ + if (p == s + maxsize) + return 0; + *p = '\0'; + return p - s; +} + +static char * +_fmt(format, t, pt, ptlim, warnp) +const char * format; +const struct tm * const t; +char * pt; +const char * const ptlim; +int * warnp; +{ + for ( ; *format; ++format) { + if (*format == '%') { +label: + switch (*++format) { + case '\0': + --format; + break; + case 'A': + pt = _add((t->tm_wday < 0 || + t->tm_wday >= DAYSPERWEEK) ? + "?" : Locale->weekday[t->tm_wday], + pt, ptlim); + continue; + case 'a': + pt = _add((t->tm_wday < 0 || + t->tm_wday >= DAYSPERWEEK) ? + "?" : Locale->wday[t->tm_wday], + pt, ptlim); + continue; + case 'B': + pt = _add((t->tm_mon < 0 || + t->tm_mon >= MONSPERYEAR) ? + "?" : Locale->month[t->tm_mon], + pt, ptlim); + continue; + case 'b': + case 'h': + pt = _add((t->tm_mon < 0 || + t->tm_mon >= MONSPERYEAR) ? + "?" : Locale->mon[t->tm_mon], + pt, ptlim); + continue; + case 'C': + /* + ** %C used to do a... + ** _fmt("%a %b %e %X %Y", t); + ** ...whereas now POSIX 1003.2 calls for + ** something completely different. + ** (ado, 1993-05-24) + */ + pt = _yconv(t->tm_year, TM_YEAR_BASE, 1, 0, + pt, ptlim); + continue; + case 'c': + { + int warn2 = IN_SOME; + + pt = _fmt(Locale->c_fmt, t, pt, ptlim, &warn2); + if (warn2 == IN_ALL) + warn2 = IN_THIS; + if (warn2 > *warnp) + *warnp = warn2; + } + continue; + case 'D': + pt = _fmt("%m/%d/%y", t, pt, ptlim, warnp); + continue; + case 'd': + pt = _conv(t->tm_mday, "%02d", pt, ptlim); + continue; + case 'E': + case 'O': + /* + ** C99 locale modifiers. + ** The sequences + ** %Ec %EC %Ex %EX %Ey %EY + ** %Od %oe %OH %OI %Om %OM + ** %OS %Ou %OU %OV %Ow %OW %Oy + ** are supposed to provide alternate + ** representations. + */ + goto label; + case 'e': + pt = _conv(t->tm_mday, "%2d", pt, ptlim); + continue; + case 'F': + pt = _fmt("%Y-%m-%d", t, pt, ptlim, warnp); + continue; + case 'H': + pt = _conv(t->tm_hour, "%02d", pt, ptlim); + continue; + case 'I': + pt = _conv((t->tm_hour % 12) ? + (t->tm_hour % 12) : 12, + "%02d", pt, ptlim); + continue; + case 'j': + pt = _conv(t->tm_yday + 1, "%03d", pt, ptlim); + continue; + case 'k': + /* + ** This used to be... + ** _conv(t->tm_hour % 12 ? + ** t->tm_hour % 12 : 12, 2, ' '); + ** ...and has been changed to the below to + ** match SunOS 4.1.1 and Arnold Robbins' + ** strftime version 3.0. That is, "%k" and + ** "%l" have been swapped. + ** (ado, 1993-05-24) + */ + pt = _conv(t->tm_hour, "%2d", pt, ptlim); + continue; +#ifdef KITCHEN_SINK + case 'K': + /* + ** After all this time, still unclaimed! + */ + pt = _add("kitchen sink", pt, ptlim); + continue; +#endif /* defined KITCHEN_SINK */ + case 'l': + /* + ** This used to be... + ** _conv(t->tm_hour, 2, ' '); + ** ...and has been changed to the below to + ** match SunOS 4.1.1 and Arnold Robbin's + ** strftime version 3.0. That is, "%k" and + ** "%l" have been swapped. + ** (ado, 1993-05-24) + */ + pt = _conv((t->tm_hour % 12) ? + (t->tm_hour % 12) : 12, + "%2d", pt, ptlim); + continue; + case 'M': + pt = _conv(t->tm_min, "%02d", pt, ptlim); + continue; + case 'm': + pt = _conv(t->tm_mon + 1, "%02d", pt, ptlim); + continue; + case 'n': + pt = _add("\n", pt, ptlim); + continue; + case 'p': + pt = _add((t->tm_hour >= (HOURSPERDAY / 2)) ? + Locale->pm : + Locale->am, + pt, ptlim); + continue; + case 'R': + pt = _fmt("%H:%M", t, pt, ptlim, warnp); + continue; + case 'r': + pt = _fmt("%I:%M:%S %p", t, pt, ptlim, warnp); + continue; + case 'S': + pt = _conv(t->tm_sec, "%02d", pt, ptlim); + continue; + case 's': + { + struct tm tm; + char buf[INT_STRLEN_MAXIMUM( + time_t) + 1]; + time_t mkt; + + tm = *t; + mkt = mktime(&tm); + if (TYPE_SIGNED(time_t)) + (void) sprintf(buf, "%ld", + (long) mkt); + else (void) sprintf(buf, "%lu", + (unsigned long) mkt); + pt = _add(buf, pt, ptlim); + } + continue; + case 'T': + pt = _fmt("%H:%M:%S", t, pt, ptlim, warnp); + continue; + case 't': + pt = _add("\t", pt, ptlim); + continue; + case 'U': + pt = _conv((t->tm_yday + DAYSPERWEEK - + t->tm_wday) / DAYSPERWEEK, + "%02d", pt, ptlim); + continue; + case 'u': + /* + ** From Arnold Robbins' strftime version 3.0: + ** "ISO 8601: Weekday as a decimal number + ** [1 (Monday) - 7]" + ** (ado, 1993-05-24) + */ + pt = _conv((t->tm_wday == 0) ? + DAYSPERWEEK : t->tm_wday, + "%d", pt, ptlim); + continue; + case 'V': /* ISO 8601 week number */ + case 'G': /* ISO 8601 year (four digits) */ + case 'g': /* ISO 8601 year (two digits) */ +/* +** From Arnold Robbins' strftime version 3.0: "the week number of the +** year (the first Monday as the first day of week 1) as a decimal number +** (01-53)." +** (ado, 1993-05-24) +** +** From "http://www.ft.uni-erlangen.de/~mskuhn/iso-time.html" by Markus Kuhn: +** "Week 01 of a year is per definition the first week which has the +** Thursday in this year, which is equivalent to the week which contains +** the fourth day of January. In other words, the first week of a new year +** is the week which has the majority of its days in the new year. Week 01 +** might also contain days from the previous year and the week before week +** 01 of a year is the last week (52 or 53) of the previous year even if +** it contains days from the new year. A week starts with Monday (day 1) +** and ends with Sunday (day 7). For example, the first week of the year +** 1997 lasts from 1996-12-30 to 1997-01-05..." +** (ado, 1996-01-02) +*/ + { + int year; + int base; + int yday; + int wday; + int w; + + year = t->tm_year; + base = TM_YEAR_BASE; + yday = t->tm_yday; + wday = t->tm_wday; + for ( ; ; ) { + int len; + int bot; + int top; + + len = isleap_sum(year, base) ? + DAYSPERLYEAR : + DAYSPERNYEAR; + /* + ** What yday (-3 ... 3) does + ** the ISO year begin on? + */ + bot = ((yday + 11 - wday) % + DAYSPERWEEK) - 3; + /* + ** What yday does the NEXT + ** ISO year begin on? + */ + top = bot - + (len % DAYSPERWEEK); + if (top < -3) + top += DAYSPERWEEK; + top += len; + if (yday >= top) { + ++base; + w = 1; + break; + } + if (yday >= bot) { + w = 1 + ((yday - bot) / + DAYSPERWEEK); + break; + } + --base; + yday += isleap_sum(year, base) ? + DAYSPERLYEAR : + DAYSPERNYEAR; + } +#ifdef XPG4_1994_04_09 + if ((w == 52 && + t->tm_mon == TM_JANUARY) || + (w == 1 && + t->tm_mon == TM_DECEMBER)) + w = 53; +#endif /* defined XPG4_1994_04_09 */ + if (*format == 'V') + pt = _conv(w, "%02d", + pt, ptlim); + else if (*format == 'g') { + *warnp = IN_ALL; + pt = _yconv(year, base, 0, 1, + pt, ptlim); + } else pt = _yconv(year, base, 1, 1, + pt, ptlim); + } + continue; + case 'v': + /* + ** From Arnold Robbins' strftime version 3.0: + ** "date as dd-bbb-YYYY" + ** (ado, 1993-05-24) + */ + pt = _fmt("%e-%b-%Y", t, pt, ptlim, warnp); + continue; + case 'W': + pt = _conv((t->tm_yday + DAYSPERWEEK - + (t->tm_wday ? + (t->tm_wday - 1) : + (DAYSPERWEEK - 1))) / DAYSPERWEEK, + "%02d", pt, ptlim); + continue; + case 'w': + pt = _conv(t->tm_wday, "%d", pt, ptlim); + continue; + case 'X': + pt = _fmt(Locale->X_fmt, t, pt, ptlim, warnp); + continue; + case 'x': + { + int warn2 = IN_SOME; + + pt = _fmt(Locale->x_fmt, t, pt, ptlim, &warn2); + if (warn2 == IN_ALL) + warn2 = IN_THIS; + if (warn2 > *warnp) + *warnp = warn2; + } + continue; + case 'y': + *warnp = IN_ALL; + pt = _yconv(t->tm_year, TM_YEAR_BASE, 0, 1, + pt, ptlim); + continue; + case 'Y': + pt = _yconv(t->tm_year, TM_YEAR_BASE, 1, 1, + pt, ptlim); + continue; + case 'Z': +#ifdef TM_ZONE + if (t->TM_ZONE != NULL) + pt = _add(t->TM_ZONE, pt, ptlim); + else +#endif /* defined TM_ZONE */ + if (t->tm_isdst >= 0) + pt = _add(tzname[t->tm_isdst != 0], + pt, ptlim); + /* + ** C99 says that %Z must be replaced by the + ** empty string if the time zone is not + ** determinable. + */ + continue; + case 'z': + { + int diff; + char const * sign; + + if (t->tm_isdst < 0) + continue; +#ifdef TM_GMTOFF + diff = t->TM_GMTOFF; +#else /* !defined TM_GMTOFF */ + /* + ** C99 says that the UTC offset must + ** be computed by looking only at + ** tm_isdst. This requirement is + ** incorrect, since it means the code + ** must rely on magic (in this case + ** altzone and timezone), and the + ** magic might not have the correct + ** offset. Doing things correctly is + ** tricky and requires disobeying C99; + ** see GNU C strftime for details. + ** For now, punt and conform to the + ** standard, even though it's incorrect. + ** + ** C99 says that %z must be replaced by the + ** empty string if the time zone is not + ** determinable, so output nothing if the + ** appropriate variables are not available. + */ + if (t->tm_isdst == 0) +#ifdef USG_COMPAT + diff = -timezone; +#else /* !defined USG_COMPAT */ + continue; +#endif /* !defined USG_COMPAT */ + else +#ifdef ALTZONE + diff = -altzone; +#else /* !defined ALTZONE */ + continue; +#endif /* !defined ALTZONE */ +#endif /* !defined TM_GMTOFF */ + if (diff < 0) { + sign = "-"; + diff = -diff; + } else sign = "+"; + pt = _add(sign, pt, ptlim); + diff /= SECSPERMIN; + diff = (diff / MINSPERHOUR) * 100 + + (diff % MINSPERHOUR); + pt = _conv(diff, "%04d", pt, ptlim); + } + continue; + case '+': + pt = _fmt(Locale->date_fmt, t, pt, ptlim, + warnp); + continue; + case '%': + /* + ** X311J/88-090 (4.12.3.5): if conversion char is + ** undefined, behavior is undefined. Print out the + ** character itself as printf(3) also does. + */ + default: + break; + } + } + if (pt == ptlim) + break; + *pt++ = *format; + } + return pt; +} + +static char * +_conv(n, format, pt, ptlim) +const int n; +const char * const format; +char * const pt; +const char * const ptlim; +{ + char buf[INT_STRLEN_MAXIMUM(int) + 1]; + + (void) sprintf(buf, format, n); + return _add(buf, pt, ptlim); +} + +static char * +_add(str, pt, ptlim) +const char * str; +char * pt; +const char * const ptlim; +{ + while (pt < ptlim && (*pt = *str++) != '\0') + ++pt; + return pt; +} + +/* +** POSIX and the C Standard are unclear or inconsistent about +** what %C and %y do if the year is negative or exceeds 9999. +** Use the convention that %C concatenated with %y yields the +** same output as %Y, and that %Y contains at least 4 bytes, +** with more only if necessary. +*/ + +static char * +_yconv(a, b, convert_top, convert_yy, pt, ptlim) +const int a; +const int b; +const int convert_top; +const int convert_yy; +char * pt; +const char * const ptlim; +{ + register int lead; + register int trail; + +#define DIVISOR 100 + trail = a % DIVISOR + b % DIVISOR; + lead = a / DIVISOR + b / DIVISOR + trail / DIVISOR; + trail %= DIVISOR; + if (trail < 0 && lead > 0) { + trail += DIVISOR; + --lead; + } else if (lead < 0 && trail > 0) { + trail -= DIVISOR; + ++lead; + } + if (convert_top) { + if (lead == 0 && trail < 0) + pt = _add("-0", pt, ptlim); + else pt = _conv(lead, "%02d", pt, ptlim); + } + if (convert_yy) + pt = _conv(((trail < 0) ? -trail : trail), "%02d", pt, ptlim); + return pt; +} + +#ifdef LOCALE_HOME +static struct lc_time_T * +_loc(void) +{ + static const char locale_home[] = LOCALE_HOME; + static const char lc_time[] = "LC_TIME"; + static char * locale_buf; + + int fd; + int oldsun; /* "...ain't got nothin' to do..." */ + char * lbuf; + char * name; + char * p; + const char ** ap; + const char * plim; + char filename[FILENAME_MAX]; + struct stat st; + size_t namesize; + size_t bufsize; + + /* + ** Use localebuf.mon[0] to signal whether locale is already set up. + */ + if (localebuf.mon[0]) + return &localebuf; + name = setlocale(LC_TIME, (char *) NULL); + if (name == NULL || *name == '\0') + goto no_locale; + /* + ** If the locale name is the same as our cache, use the cache. + */ + lbuf = locale_buf; + if (lbuf != NULL && strcmp(name, lbuf) == 0) { + p = lbuf; + for (ap = (const char **) &localebuf; + ap < (const char **) (&localebuf + 1); + ++ap) + *ap = p += strlen(p) + 1; + return &localebuf; + } + /* + ** Slurp the locale file into the cache. + */ + namesize = strlen(name) + 1; + if (sizeof filename < + ((sizeof locale_home) + namesize + (sizeof lc_time))) + goto no_locale; + oldsun = 0; + (void) sprintf(filename, "%s/%s/%s", locale_home, name, lc_time); + fd = open(filename, O_RDONLY); + if (fd < 0) { + /* + ** Old Sun systems have a different naming and data convention. + */ + oldsun = 1; + (void) sprintf(filename, "%s/%s/%s", locale_home, + lc_time, name); + fd = open(filename, O_RDONLY); + if (fd < 0) + goto no_locale; + } + if (fstat(fd, &st) != 0) + goto bad_locale; + if (st.st_size <= 0) + goto bad_locale; + bufsize = namesize + st.st_size; + locale_buf = NULL; + lbuf = (lbuf == NULL) ? malloc(bufsize) : realloc(lbuf, bufsize); + if (lbuf == NULL) + goto bad_locale; + (void) strcpy(lbuf, name); + p = lbuf + namesize; + plim = p + st.st_size; + if (read(fd, p, (size_t) st.st_size) != st.st_size) + goto bad_lbuf; + if (close(fd) != 0) + goto bad_lbuf; + /* + ** Parse the locale file into localebuf. + */ + if (plim[-1] != '\n') + goto bad_lbuf; + for (ap = (const char **) &localebuf; + ap < (const char **) (&localebuf + 1); + ++ap) { + if (p == plim) + goto bad_lbuf; + *ap = p; + while (*p != '\n') + ++p; + *p++ = '\0'; + } + if (oldsun) { + /* + ** SunOS 4 used an obsolescent format; see localdtconv(3). + ** c_fmt had the ``short format for dates and times together'' + ** (SunOS 4 date, "%a %b %e %T %Z %Y" in the C locale); + ** date_fmt had the ``long format for dates'' + ** (SunOS 4 strftime %C, "%A, %B %e, %Y" in the C locale). + ** Discard the latter in favor of the former. + */ + localebuf.date_fmt = localebuf.c_fmt; + } + /* + ** Record the successful parse in the cache. + */ + locale_buf = lbuf; + + return &localebuf; + +bad_lbuf: + free(lbuf); +bad_locale: + (void) close(fd); +no_locale: + localebuf = C_time_locale; + locale_buf = NULL; + return &localebuf; +} +#endif /* defined LOCALE_HOME */ Property changes on: vendor/tzcode/tzcode2009h/libc/stdtime/strftime.c ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: vendor/tzcode/tzcode2009h/libc/stdtime/tzfile.5 =================================================================== --- vendor/tzcode/tzcode2009h/libc/stdtime/tzfile.5 (nonexistent) +++ vendor/tzcode/tzcode2009h/libc/stdtime/tzfile.5 (revision 192888) @@ -0,0 +1,152 @@ +.TH TZFILE 5 +.SH NAME +tzfile \- time zone information +.SH SYNOPSIS +.B +#include +.SH DESCRIPTION +The time zone information files used by +.IR tzset (3) +begin with the magic characters "TZif" to identify then as +time zone information files, +followed by a character identifying the version of the file's format +(as of 2005, either an ASCII NUL or a '2') +followed by fifteen bytes containing zeroes reserved for future use, +followed by six 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_ttisgmtcnt +The number of UTC/local indicators stored in the file. +.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 (with +.I tzh_typecnt +entries) 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 UTC, +.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 +Then 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 +Finally there are +.I tzh_ttisgmtcnt +UTC/local indicators, each stored as a one-byte value; +they tell whether the transition times associated with local time types +were specified as UTC or local 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. +.PP +For version-2-format time zone files, +the above header and data is followed by a second header and data, +identical in format except that +eight bytes are used for each transition time or leap second time. +After the second header and data comes a newline-enclosed, +POSIX-TZ-environment-variable-style string for use in handling instants +after the last transition time stored in the file +(with nothing between the newlines if there is no POSIX representation for +such instants). +.SH SEE ALSO +newctime(3) +.\" @(#)tzfile.5 8.2 +.\" This file is in the public domain, so clarified as of +.\" 1996-06-05 by Arthur David Olson. Index: vendor/tzcode/tzcode2009h/libc/stdtime/tzfile.h =================================================================== --- vendor/tzcode/tzcode2009h/libc/stdtime/tzfile.h (nonexistent) +++ vendor/tzcode/tzcode2009h/libc/stdtime/tzfile.h (revision 192888) @@ -0,0 +1,180 @@ +#ifndef TZFILE_H + +#define TZFILE_H + +/* +** This file is in the public domain, so clarified as of +** 1996-06-05 by Arthur David Olson. +*/ + +/* +** This header is for use ONLY with the time conversion code. +** There is no guarantee that it will remain unchanged, +** or that it will remain at all. +** Do NOT copy it to any system include directory. +** Thank you! +*/ + +/* +** ID +*/ + +#ifndef lint +#ifndef NOID +static char tzfilehid[] = "@(#)tzfile.h 8.1"; +#endif /* !defined NOID */ +#endif /* !defined lint */ + +/* +** Information about time zone files. +*/ + +#ifndef TZDIR +#define TZDIR "/usr/local/etc/zoneinfo" /* Time zone object file directory */ +#endif /* !defined TZDIR */ + +#ifndef TZDEFAULT +#define TZDEFAULT "localtime" +#endif /* !defined TZDEFAULT */ + +#ifndef TZDEFRULES +#define TZDEFRULES "posixrules" +#endif /* !defined TZDEFRULES */ + +/* +** Each file begins with. . . +*/ + +#define TZ_MAGIC "TZif" + +struct tzhead { + char tzh_magic[4]; /* TZ_MAGIC */ + char tzh_version[1]; /* '\0' or '2' as of 2005 */ + char tzh_reserved[15]; /* reserved--must be zero */ + char tzh_ttisgmtcnt[4]; /* coded number of trans. time flags */ + char tzh_ttisstdcnt[4]; /* coded number of trans. time flags */ + char tzh_leapcnt[4]; /* coded number of leap seconds */ + char tzh_timecnt[4]; /* coded number of transition times */ + char tzh_typecnt[4]; /* coded number of local time types */ + char tzh_charcnt[4]; /* coded number of abbr. chars */ +}; + +/* +** . . .followed by. . . +** +** tzh_timecnt (char [4])s coded transition times a la time(2) +** tzh_timecnt (unsigned char)s types of local time starting at above +** tzh_typecnt repetitions of +** one (char [4]) coded UTC offset in seconds +** one (unsigned char) used to set tm_isdst +** one (unsigned char) that's an abbreviation list index +** tzh_charcnt (char)s '\0'-terminated zone abbreviations +** tzh_leapcnt repetitions of +** one (char [4]) coded leap second transition times +** one (char [4]) total correction after above +** tzh_ttisstdcnt (char)s indexed by type; if TRUE, transition +** time is standard time, if FALSE, +** transition time is wall clock time +** if absent, transition times are +** assumed to be wall clock time +** tzh_ttisgmtcnt (char)s indexed by type; if TRUE, transition +** time is UTC, if FALSE, +** transition time is local time +** if absent, transition times are +** assumed to be local time +*/ + +/* +** If tzh_version is '2' or greater, the above is followed by a second instance +** of tzhead and a second instance of the data in which each coded transition +** time uses 8 rather than 4 chars, +** then a POSIX-TZ-environment-variable-style string for use in handling +** instants after the last transition time stored in the file +** (with nothing between the newlines if there is no POSIX representation for +** such instants). +*/ + +/* +** In the current implementation, "tzset()" refuses to deal with files that +** exceed any of the limits below. +*/ + +#ifndef TZ_MAX_TIMES +#define TZ_MAX_TIMES 1200 +#endif /* !defined TZ_MAX_TIMES */ + +#ifndef TZ_MAX_TYPES +#ifndef NOSOLAR +#define TZ_MAX_TYPES 256 /* Limited by what (unsigned char)'s can hold */ +#endif /* !defined NOSOLAR */ +#ifdef NOSOLAR +/* +** Must be at least 14 for Europe/Riga as of Jan 12 1995, +** as noted by Earl Chew. +*/ +#define TZ_MAX_TYPES 20 /* Maximum number of local time types */ +#endif /* !defined NOSOLAR */ +#endif /* !defined TZ_MAX_TYPES */ + +#ifndef TZ_MAX_CHARS +#define TZ_MAX_CHARS 50 /* Maximum number of abbreviation characters */ + /* (limited by what unsigned chars can hold) */ +#endif /* !defined TZ_MAX_CHARS */ + +#ifndef TZ_MAX_LEAPS +#define TZ_MAX_LEAPS 50 /* Maximum number of leap second corrections */ +#endif /* !defined TZ_MAX_LEAPS */ + +#define SECSPERMIN 60 +#define MINSPERHOUR 60 +#define HOURSPERDAY 24 +#define DAYSPERWEEK 7 +#define DAYSPERNYEAR 365 +#define DAYSPERLYEAR 366 +#define SECSPERHOUR (SECSPERMIN * MINSPERHOUR) +#define SECSPERDAY ((long) SECSPERHOUR * HOURSPERDAY) +#define MONSPERYEAR 12 + +#define TM_SUNDAY 0 +#define TM_MONDAY 1 +#define TM_TUESDAY 2 +#define TM_WEDNESDAY 3 +#define TM_THURSDAY 4 +#define TM_FRIDAY 5 +#define TM_SATURDAY 6 + +#define TM_JANUARY 0 +#define TM_FEBRUARY 1 +#define TM_MARCH 2 +#define TM_APRIL 3 +#define TM_MAY 4 +#define TM_JUNE 5 +#define TM_JULY 6 +#define TM_AUGUST 7 +#define TM_SEPTEMBER 8 +#define TM_OCTOBER 9 +#define TM_NOVEMBER 10 +#define TM_DECEMBER 11 + +#define TM_YEAR_BASE 1900 + +#define EPOCH_YEAR 1970 +#define EPOCH_WDAY TM_THURSDAY + +#define isleap(y) (((y) % 4) == 0 && (((y) % 100) != 0 || ((y) % 400) == 0)) + +/* +** Since everything in isleap is modulo 400 (or a factor of 400), we know that +** isleap(y) == isleap(y % 400) +** and so +** isleap(a + b) == isleap((a + b) % 400) +** or +** isleap(a + b) == isleap(a % 400 + b % 400) +** This is true even if % means modulo rather than Fortran remainder +** (which is allowed by C89 but not C99). +** We use this to avoid addition overflow problems. +*/ + +#define isleap_sum(a, b) isleap((a) % 400 + (b) % 400) + +#endif /* !defined TZFILE_H */ Property changes on: vendor/tzcode/tzcode2009h/libc/stdtime/tzfile.h ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: vendor/tzcode/tzcode2009h/unused/Makefile =================================================================== --- vendor/tzcode/tzcode2009h/unused/Makefile (nonexistent) +++ vendor/tzcode/tzcode2009h/unused/Makefile (revision 192888) @@ -0,0 +1,421 @@ +#
+# @(#)Makefile	8.8
+# This file is in the public domain, so clarified as of
+# 2009-05-17 by Arthur David Olson.
+
+# Change the line below for your time zone (after finding the zone you want in
+# the time zone files, or adding it to a time zone file).
+# Alternately, if you discover you've got the wrong time zone, you can just
+#	zic -l rightzone
+# to correct things.
+# Use the command
+#	make zonenames
+# to get a list of the values you can use for LOCALTIME.
+
+LOCALTIME=	Factory
+
+# If you want something other than Eastern United States time as a template
+# for handling POSIX-style time zone environment variables,
+# change the line below (after finding the zone you want in the
+# time zone files, or adding it to a time zone file).
+# (When a POSIX-style environment variable is handled, the rules in the
+# template file are used to determine "spring forward" and "fall back" days and
+# times; the environment variable itself specifies UTC offsets of standard and
+# summer time.)
+# Alternately, if you discover you've got the wrong time zone, you can just
+#	zic -p rightzone
+# to correct things.
+# Use the command
+#	make zonenames
+# to get a list of the values you can use for POSIXRULES.
+# If you want POSIX compatibility, use "America/New_York".
+
+POSIXRULES=	America/New_York
+
+# Also see TZDEFRULESTRING below, which takes effect only
+# if the time zone files cannot be accessed.
+
+# Everything gets put in subdirectories of. . .
+
+TOPDIR=		/usr/local
+
+# "Compiled" time zone information is placed in the "TZDIR" directory
+# (and subdirectories).
+# Use an absolute path name for TZDIR unless you're just testing the software.
+
+TZDIR=		$(TOPDIR)/etc/zoneinfo
+
+# The "tzselect", "zic", and "zdump" commands get installed in. . .
+
+ETCDIR=		$(TOPDIR)/etc
+
+# If you "make INSTALL", the "date" command gets installed in. . .
+
+BINDIR=		$(TOPDIR)/bin
+
+# Manual pages go in subdirectories of. . .
+
+MANDIR=		$(TOPDIR)/man
+
+# Library functions are put in an archive in LIBDIR.
+
+LIBDIR=		$(TOPDIR)/lib
+TZLIB=		$(LIBDIR)/libtz.a
+
+# If you always want time values interpreted as "seconds since the epoch
+# (not counting leap seconds)", use
+#	REDO=		posix_only
+# below.  If you always want right time values interpreted as "seconds since
+# the epoch" (counting leap seconds)", use
+#	REDO=		right_only
+# below.  If you want both sets of data available, with leap seconds not
+# counted normally, use
+#	REDO=		posix_right
+# below.  If you want both sets of data available, with leap seconds counted
+# normally, use
+#	REDO=		right_posix
+# below.
+# POSIX mandates that leap seconds not be counted; for compatibility with it,
+# use either "posix_only" or "posix_right".
+
+REDO=		posix_right
+
+# Since "." may not be in PATH...
+
+YEARISTYPE=	./yearistype
+
+# Non-default libraries needed to link.
+# Add -lintl if you want to use `gettext' on Solaris.
+LDLIBS=
+
+# Add the following to the end of the "CFLAGS=" line as needed.
+#  -DHAVE_ADJTIME=0 if `adjtime' does not exist (SVR0?)
+#  -DHAVE_GETTEXT=1 if `gettext' works (GNU, Linux, Solaris); also see LDLIBS
+#  -DHAVE_INCOMPATIBLE_CTIME_R=1 if your system's time.h declares
+#	ctime_r and asctime_r incompatibly with the POSIX standard (Solaris 8).
+#  -DHAVE_SETTIMEOFDAY=0 if settimeofday does not exist (SVR0?)
+#  -DHAVE_SETTIMEOFDAY=1 if settimeofday has just 1 arg (SVR4)
+#  -DHAVE_SETTIMEOFDAY=2 if settimeofday uses 2nd arg (4.3BSD)
+#  -DHAVE_SETTIMEOFDAY=3 if settimeofday ignores 2nd arg (4.4BSD)
+#  -DHAVE_STDINT_H=1 if you have a pre-C99 compiler with "stdint.h"
+#  -DHAVE_SYMLINK=0 if your system lacks the symlink function
+#  -DHAVE_SYS_STAT_H=0 if your compiler lacks a "sys/stat.h"
+#  -DHAVE_SYS_WAIT_H=0 if your compiler lacks a "sys/wait.h"
+#  -DLOCALE_HOME=\"path\" if locales are in "path", not "/usr/lib/locale"
+#  -DHAVE_UNISTD_H=0 if your compiler lacks a "unistd.h" (Microsoft C++ 7?)
+#  -DHAVE_UTMPX_H=1 if your compiler has a "utmpx.h"
+#  -DTZDEFRULESTRING=\",date/time,date/time\" to default to the specified
+#	DST transitions if the time zone files cannot be accessed
+#  -DTZ_DOMAIN=\"foo\" to use "foo" for gettext domain name; default is "tz"
+#  -TTZ_DOMAINDIR=\"/path\" to use "/path" for gettext directory;
+#	the default is system-supplied, typically "/usr/lib/locale"
+#  $(GCC_DEBUG_FLAGS) if you are using GCC and want lots of checking
+#  -DNO_RUN_TIME_WARNINGS_ABOUT_YEAR_2000_PROBLEMS_THANK_YOU=1
+#	if you do not want run time warnings about formats that may cause
+#	year 2000 grief
+#  -DZIC_MAX_ABBR_LEN_WO_WARN=3
+#	(or some other number) to set the maximum time zone abbreviation length
+#	that zic will accept without a warning (the default is 6)
+GCC_DEBUG_FLAGS = -Dlint -g -O -fno-common \
+	-Wall -Wcast-qual -Wconversion -Wmissing-prototypes \
+	-Wnested-externs -Wpointer-arith -Wshadow \
+	-Wtraditional # -Wstrict-prototypes -Wwrite-strings
+#
+# If you want to use System V compatibility code, add
+#	-DUSG_COMPAT
+# to the end of the "CFLAGS=" line.  This arrange for "timezone" and "daylight"
+# variables to be kept up-to-date by the time conversion functions.  Neither
+# "timezone" nor "daylight" is described in X3J11's work.
+#
+# If your system has a "GMT offset" field in its "struct tm"s
+# (or if you decide to add such a field in your system's "time.h" file),
+# add the name to a define such as
+#	-DTM_GMTOFF=tm_gmtoff
+# or
+#	-DTM_GMTOFF=_tm_gmtoff
+# to the end of the "CFLAGS=" line.
+# Neither tm_gmtoff nor _tm_gmtoff is described in X3J11's work;
+# in its work, use of "tm_gmtoff" is described as non-conforming.
+# Both Linux and BSD have done the equivalent of defining TM_GMTOFF in
+# their recent releases.
+#
+# If your system has a "zone abbreviation" field in its "struct tm"s
+# (or if you decide to add such a field in your system's "time.h" file),
+# add the name to a define such as
+#	-DTM_ZONE=tm_zone
+# or
+#	-DTM_ZONE=_tm_zone
+# to the end of the "CFLAGS=" line.
+# Neither tm_zone nor _tm_zone is described in X3J11's work;
+# in its work, use of "tm_zone" is described as non-conforming.
+# Both UCB and Sun have done the equivalent of defining TM_ZONE in
+# their recent releases.
+#
+# If you want functions that were inspired by early versions of X3J11's work,
+# add
+#	-DSTD_INSPIRED
+# to the end of the "CFLAGS=" line.  This arranges for the functions
+# "tzsetwall", "offtime", "timelocal", "timegm", "timeoff",
+# "posix2time", and "time2posix" to be added to the time conversion library.
+# "tzsetwall" is like "tzset" except that it arranges for local wall clock
+# time (rather than the time specified in the TZ environment variable)
+# to be used.
+# "offtime" is like "gmtime" except that it accepts a second (long) argument
+# that gives an offset to add to the time_t when converting it.
+# "timelocal" is equivalent to "mktime".
+# "timegm" is like "timelocal" except that it turns a struct tm into
+# a time_t using UTC (rather than local time as "timelocal" does).
+# "timeoff" is like "timegm" except that it accepts a second (long) argument
+# that gives an offset to use when converting to a time_t.
+# "posix2time" and "time2posix" are described in an included manual page.
+# X3J11's work does not describe any of these functions.
+# Sun has provided "tzsetwall", "timelocal", and "timegm" in SunOS 4.0.
+# These functions may well disappear in future releases of the time
+# conversion package.
+#
+# If you want Source Code Control System ID's left out of object modules, add
+#	-DNOID
+# to the end of the "CFLAGS=" line.
+#
+# If you'll never want to handle solar-time-based time zones, add
+#	-DNOSOLAR
+# to the end of the "CFLAGS=" line
+# (and comment out the "SDATA=" line below).
+# This reduces (slightly) the run-time data-space requirements of
+# the time conversion functions; it may reduce the acceptability of your system
+# to folks in oil- and cash-rich places.
+#
+# If you want to allocate state structures in localtime, add
+#	-DALL_STATE
+# to the end of the "CFLAGS=" line.  Storage is obtained by calling malloc.
+#
+# If you want an "altzone" variable (a la System V Release 3.1), add
+#	-DALTZONE
+# to the end of the "CFLAGS=" line.
+# This variable is not described in X3J11's work.
+#
+# If you want a "gtime" function (a la MACH), add
+#	-DCMUCS
+# to the end of the "CFLAGS=" line
+# This function is not described in X3J11's work.
+#
+# NIST-PCTS:151-2, Version 1.4, (1993-12-03) is a test suite put
+# out by the National Institute of Standards and Technology
+# which claims to test C and Posix conformance.  If you want to pass PCTS, add
+#	-DPCTS
+# to the end of the "CFLAGS=" line.
+#
+# If you want strict compliance with XPG4 as of 1994-04-09, add
+#	-DXPG4_1994_04_09
+# to the end of the "CFLAGS=" line.  This causes "strftime" to always return
+# 53 as a week number (rather than 52 or 53) for those days in January that
+# before the first Monday in January when a "%V" format is used and January 1
+# falls on a Friday, Saturday, or Sunday.
+
+CFLAGS=
+
+# If you want zic's -s option used when installing, uncomment the next line
+# ZFLAGS=	-s
+
+zic=		./zic
+ZIC=		$(zic) $(ZFLAGS)
+
+# The name of a Posix-compliant `awk' on your system.
+AWK=		nawk
+
+# The path where SGML DTDs are kept.
+SGML_SEARCH_PATH= $(TOPDIR)/share/doc/sgml-lib/REC-html401-19991224/
+
+# The catalog file(s) to use when validating.
+SGML_CATALOG_FILES= HTML4.cat
+
+# The name, arguments and environment of a program to validate your web pages.
+# See  for a validator, and
+#  for a validation library.
+VALIDATE = nsgmls
+VALIDATE_FLAGS = -s -B -wall -wno-unused-param
+VALIDATE_ENV = \
+  SGML_CATALOG_FILES=$(SGML_CATALOG_FILES) \
+  SGML_SEARCH_PATH=$(SGML_SEARCH_PATH) \
+  SP_CHARSET_FIXED=YES \
+  SP_ENCODING=UTF-8
+
+###############################################################################
+
+cc=		cc
+CC=		$(cc) -DTZDIR=\"$(TZDIR)\"
+
+TZCSRCS=	zic.c localtime.c asctime.c scheck.c ialloc.c
+TZCOBJS=	zic.o localtime.o asctime.o scheck.o ialloc.o
+TZDSRCS=	zdump.c localtime.c ialloc.c
+TZDOBJS=	zdump.o localtime.o ialloc.o
+DATESRCS=	date.c localtime.c strftime.c asctime.c
+DATEOBJS=	date.o localtime.o strftime.o asctime.o
+LIBSRCS=	localtime.c asctime.c difftime.c
+LIBOBJS=	localtime.o asctime.o difftime.o
+HEADERS=	tzfile.h private.h
+NONLIBSRCS=	zic.c zdump.c scheck.c ialloc.c
+NEWUCBSRCS=	date.c strftime.c
+SOURCES=	$(HEADERS) $(LIBSRCS) $(NONLIBSRCS) $(NEWUCBSRCS) tzselect.ksh
+MANS=		newctime.3 newstrftime.3 newtzset.3 time2posix.3 \
+			tzfile.5 tzselect.8 zic.8 zdump.8
+DOCS=		README Theory $(MANS) date.1 Makefile
+PRIMARY_YDATA=	africa antarctica asia australasia \
+		europe northamerica southamerica
+YDATA=		$(PRIMARY_YDATA) pacificnew etcetera factory backward
+NDATA=		systemv
+SDATA=		solar87 solar88 solar89
+TDATA=		$(YDATA) $(NDATA) $(SDATA)
+TABDATA=	iso3166.tab zone.tab
+DATA=		$(YDATA) $(NDATA) $(SDATA) $(TABDATA) leapseconds yearistype.sh
+WEB_PAGES=	tz-art.htm tz-link.htm
+MISC=		usno1988 usno1989 usno1989a usno1995 usno1997 usno1998 \
+			itca.jpg $(WEB_PAGES) checktab.awk workman.sh \
+			zoneinfo2tdf.pl
+ENCHILADA=	$(DOCS) $(SOURCES) $(DATA) $(MISC)
+
+# And for the benefit of csh users on systems that assume the user
+# shell should be used to handle commands in Makefiles. . .
+
+SHELL=		/bin/sh
+
+all:		tzselect zic zdump $(LIBOBJS)
+
+ALL:		all date
+
+install:	all $(DATA) $(REDO) $(TZLIB) $(MANS) $(TABDATA)
+		$(ZIC) -y $(YEARISTYPE) \
+			-d $(TZDIR) -l $(LOCALTIME) -p $(POSIXRULES)
+		-rm -f $(TZDIR)/iso3166.tab $(TZDIR)/zone.tab
+		cp iso3166.tab zone.tab $(TZDIR)/.
+		-mkdir $(TOPDIR) $(ETCDIR)
+		cp tzselect zic zdump $(ETCDIR)/.
+		-mkdir $(TOPDIR) $(MANDIR) \
+			$(MANDIR)/man3 $(MANDIR)/man5 $(MANDIR)/man8
+		-rm -f $(MANDIR)/man3/newctime.3 \
+			$(MANDIR)/man3/newtzset.3 \
+			$(MANDIR)/man5/tzfile.5 \
+			$(MANDIR)/man8/tzselect.8 \
+			$(MANDIR)/man8/zdump.8 \
+			$(MANDIR)/man8/zic.8
+		cp newctime.3 newtzset.3 $(MANDIR)/man3/.
+		cp tzfile.5 $(MANDIR)/man5/.
+		cp tzselect.8 zdump.8 zic.8 $(MANDIR)/man8/.
+
+INSTALL:	ALL install date.1
+		-mkdir $(TOPDIR) $(BINDIR)
+		cp date $(BINDIR)/.
+		-mkdir $(TOPDIR) $(MANDIR) $(MANDIR)/man1
+		-rm -f $(MANDIR)/man1/date.1
+		cp date.1 $(MANDIR)/man1/.
+
+zdump:		$(TZDOBJS)
+		$(CC) $(CFLAGS) $(LFLAGS) $(TZDOBJS) $(LDLIBS) -o $@
+
+zic:		$(TZCOBJS) yearistype
+		$(CC) $(CFLAGS) $(LFLAGS) $(TZCOBJS) $(LDLIBS) -o $@
+
+yearistype:	yearistype.sh
+		cp yearistype.sh yearistype
+		chmod +x yearistype
+
+posix_only:	zic $(TDATA)
+		$(ZIC) -y $(YEARISTYPE) -d $(TZDIR) -L /dev/null $(TDATA)
+
+right_only:	zic leapseconds $(TDATA)
+		$(ZIC) -y $(YEARISTYPE) -d $(TZDIR) -L leapseconds $(TDATA)
+
+# In earlier versions of this makefile, the other two directories were
+# subdirectories of $(TZDIR).  However, this led to configuration errors.
+# For example, with posix_right under the earlier scheme,
+# TZ='right/Australia/Adelaide' got you localtime with leap seconds,
+# but gmtime without leap seconds, which led to problems with applications
+# like sendmail that subtract gmtime from localtime.
+# Therefore, the other two directories are now siblings of $(TZDIR).
+# You must replace all of $(TZDIR) to switch from not using leap seconds
+# to using them, or vice versa.
+other_two:	zic leapseconds $(TDATA)
+		$(ZIC) -y $(YEARISTYPE) -d $(TZDIR)-posix -L /dev/null $(TDATA)
+		$(ZIC) -y $(YEARISTYPE) \
+			-d $(TZDIR)-leaps -L leapseconds $(TDATA)
+
+posix_right:	posix_only other_two
+
+right_posix:	right_only other_two
+
+zones:		$(REDO)
+
+$(TZLIB):	$(LIBOBJS)
+		-mkdir $(TOPDIR) $(LIBDIR)
+		ar ru $@ $(LIBOBJS)
+		if [ -x /usr/ucb/ranlib -o -x /usr/bin/ranlib ] ; \
+			then ranlib $@ ; fi
+
+date:		$(DATEOBJS)
+		$(CC) $(CFLAGS) date.o localtime.o asctime.o strftime.o \
+			$(LDLIBS) -lc -o $@
+
+tzselect:	tzselect.ksh
+		sed \
+			-e 's|AWK=[^}]*|AWK=$(AWK)|g' \
+			-e 's|TZDIR=[^}]*|TZDIR=$(TZDIR)|' \
+			<$? >$@
+		chmod +x $@
+
+check:		check_tables check_web
+
+check_tables:	checktab.awk $(PRIMARY_YDATA)
+		$(AWK) -f checktab.awk $(PRIMARY_YDATA)
+
+check_web:	$(WEB_PAGES)
+		$(VALIDATE_ENV) $(VALIDATE) $(VALIDATE_FLAGS) $(WEB_PAGES)
+
+clean:
+		rm -f core *.o *.out tzselect zdump zic yearistype date
+
+maintainer-clean: clean
+		@echo 'This command is intended for maintainers to use; it'
+		@echo 'deletes files that may need special tools to rebuild.'
+		rm -f *.[1-8].txt tzcode.tar.gz tzdata.tar.gz
+
+names:
+		@echo $(ENCHILADA)
+
+# The zics below ensure that each data file can stand on its own.
+# We also do an all-files run to catch links to links.
+
+public:		$(ENCHILADA)
+		make maintainer-clean
+		make "CFLAGS=$(GCC_DEBUG_FLAGS)"
+		-mkdir /tmp/,tzpublic
+		-for i in $(TDATA) ; do zic -v -d /tmp/,tzpublic $$i 2>&1 | grep -v "starting year" ; done
+		for i in $(TDATA) ; do zic -d /tmp/,tzpublic $$i || exit; done
+		zic -v -d /tmp/,tzpublic $(TDATA) || exit
+		rm -f -r /tmp/,tzpublic
+		for i in *.[1-8] ; do sh workman.sh $$i > $$i.txt || exit; done
+		$(AWK) -f checktab.awk $(PRIMARY_YDATA)
+		tar cf - $(DOCS) $(SOURCES) $(MISC) *.[1-8].txt | gzip -9 > tzcode.tar.gz
+		tar cf - $(DATA) | gzip -9 > tzdata.tar.gz
+
+typecheck:
+		make clean
+		for i in "long long" unsigned double; \
+		do \
+			make CFLAGS="-DTYPECHECK -D_TIME_T \"-Dtime_t=$$i\"" ; \
+			./zdump -v Europe/Rome ; \
+			make clean ; \
+		done
+
+zonenames:	$(TDATA)
+		@$(AWK) '/^Zone/ { print $$2 } /^Link/ { print $$3 }' $(TDATA)
+
+asctime.o:	private.h tzfile.h
+date.o:		private.h
+difftime.o:	private.h
+ialloc.o:	private.h
+localtime.o:	private.h tzfile.h
+scheck.o:	private.h
+strftime.o:	tzfile.h
+zic.o:		private.h tzfile.h
+
+.KEEP_STATE:
Index: vendor/tzcode/tzcode2009h/unused/date.1
===================================================================
--- vendor/tzcode/tzcode2009h/unused/date.1	(nonexistent)
+++ vendor/tzcode/tzcode2009h/unused/date.1	(revision 192888)
@@ -0,0 +1,177 @@
+.TH DATE 1
+.SH NAME
+date \- show and set date and time
+.SH SYNOPSIS
+.if n .nh
+.if n .na
+.B date
+[
+.B \-u
+] [
+.B \-c
+] [
+.B \-n
+] [
+.B \-d
+dsttype
+] [
+.B \-t
+minutes-west
+] [
+\fB\-a \fR[\fB+\fR|\fB-]\fIsss\fB.\fIfff\fR
+] [
+.BI + format
+] [
+\fR[\fIyyyy\fR]\fImmddhhmm\fR[\fIyy\fR][\fB.\fIss\fR]
+]
+.SH DESCRIPTION
+.I Date
+without arguments writes the date and time to the standard output in
+the form
+.ce 1
+Wed Mar  8 14:54:40 EST 1989
+.br
+with
+.B EST
+replaced by the local time zone's abbreviation
+(or by the abbreviation for the time zone specified in the
+.B TZ
+environment variable if set).
+The exact output format depends on the locale.
+.PP
+If a command-line argument starts with a plus sign
+.RB (` + '),
+the rest of the argument is used as a
+.I format
+that controls what appears in the output.
+In the format, when a percent sign
+.RB (` % ')
+appears,
+it and the character after it are not output,
+but rather identify part of the date or time
+to be output in a particular way
+(or identify a special character to output):
+.nf
+.sp
+.if t .in +.5i
+.if n .in +2
+.ta \w'%M\0\0'u +\w'Wed Mar  8 14:54:40 EST 1989\0\0'u
+	Sample output	Explanation
+%a	Wed	Abbreviated weekday name*
+%A	Wednesday	Full weekday name*
+%b	Mar	Abbreviated month name*
+%B	March	Full month name*
+%c	Wed Mar 08 14:54:40 1989	Date and time*
+%C	19	Century
+%d	08	Day of month (always two digits)
+%D	03/08/89	Month/day/year (eight characters)
+%e	 8	Day of month (leading zero blanked)
+%h	Mar	Abbreviated month name*
+%H	14	24-hour-clock hour (two digits)
+%I	02	12-hour-clock hour (two digits)
+%j	067	Julian day number (three digits)
+%k	 2	12-hour-clock hour (leading zero blanked)
+%l	14	24-hour-clock hour (leading zero blanked)
+%m	03	Month number (two digits)
+%M	54	Minute (two digits)
+%n	\\n	newline character
+%p	PM	AM/PM designation
+%r	02:54:40 PM	Hour:minute:second AM/PM designation
+%R	14:54	Hour:minute
+%S	40	Second (two digits)
+%t	\\t	tab character
+%T	14:54:40	Hour:minute:second
+%U	10	Sunday-based week number (two digits)
+%w	3	Day number (one digit, Sunday is 0)
+%W	10	Monday-based week number (two digits)
+%x	03/08/89	Date*
+%X	14:54:40	Time*
+%y	89	Last two digits of year
+%Y	1989	Year in full
+%Z	EST	Time zone abbreviation
+%+	Wed Mar  8 14:54:40 EST 1989	Default output format*
+.if t .in -.5i
+.if n .in -2
+* The exact output depends on the locale.
+.sp
+.fi
+If a character other than one of those shown above appears after
+a percent sign in the format,
+that following character is output.
+All other characters in the format are copied unchanged to the output;
+a newline character is always added at the end of the output.
+.PP
+In Sunday-based week numbering,
+the first Sunday of the year begins week 1;
+days preceding it are part of ``week 0.''
+In Monday-based week numbering,
+the first Monday of the year begins week 1.
+.PP
+To set the date, use a command line argument with one of the following forms:
+.nf
+.if t .in +.5i
+.if n .in +2
+.ta \w'198903081454\0'u
+1454	24-hour-clock hours (first two digits) and minutes
+081454	Month day (first two digits), hours, and minutes
+03081454	Month (two digits, January is 01), month day, hours, minutes
+8903081454	Year, month, month day, hours, minutes
+0308145489	Month, month day, hours, minutes, year
+	(on System V-compatible systems)
+030814541989	Month, month day, hours, minutes, four-digit year
+198903081454	Four-digit year, month, month day, hours, minutes
+.if t .in -.5i
+.if n .in -2
+.fi
+If the century, year, month, or month day is not given,
+the current value is used.
+Any of the above forms may be followed by a period and two digits that give
+the seconds part of the new time; if no seconds are given, zero is assumed.
+.PP
+These options are available:
+.TP
+.BR \-u " or " \-c
+Use UTC when setting and showing the date and time.
+.TP
+.B \-n
+Do not notify other networked systems of the time change.
+.TP
+.BI "\-d " dsttype
+Set the kernel-stored Daylight Saving Time type to the given value.
+(The kernel-stored DST type is used mostly by ``old'' binaries.)
+.TP
+.BI "\-t " minutes-west
+Set the kernel-stored ``minutes west of UTC'' value to the one given on the
+command line.
+(The kernel-stored DST type is used mostly by ``old'' binaries.)
+.TP
+.BI "\-a " adjustment
+Change the time forward (or backward) by the number of seconds
+(and fractions thereof) specified in the
+.I adjustment\^
+argument.
+Either the seconds part or the fractions part of the argument (but not both)
+may be omitted.
+On BSD-based systems,
+the adjustment is made by changing the rate at which time advances;
+on System-V-based systems, the adjustment is made by changing the time.
+.SH FILES
+.ta \w'/usr/local/etc/zoneinfo/posixrules\0\0'u
+/usr/lib/locale/\f2L\fP/LC_TIME	description of time locale \f2L\fP
+.br
+/usr/local/etc/zoneinfo	time zone information directory
+.br
+/usr/local/etc/zoneinfo/localtime	local time zone file
+.br
+/usr/local/etc/zoneinfo/posixrules	used with POSIX-style TZ's
+.br
+/usr/local/etc/zoneinfo/GMT	for UTC leap seconds
+.sp
+If
+.B /usr/local/etc/zoneinfo/GMT
+is absent,
+UTC leap seconds are loaded from
+.BR /usr/local/etc/zoneinfo/posixrules .
+.\" @(#)date.1	8.2
+.\" This file is in the public domain, so clarified as of
+.\" 2009-05-17 by Arthur David Olson.
Index: vendor/tzcode/tzcode2009h/unused/newctime.3
===================================================================
--- vendor/tzcode/tzcode2009h/unused/newctime.3	(nonexistent)
+++ vendor/tzcode/tzcode2009h/unused/newctime.3	(revision 192888)
@@ -0,0 +1,241 @@
+.TH NEWCTIME 3
+.SH NAME
+asctime, ctime, difftime, gmtime, localtime, mktime \- convert date and time to ASCII
+.SH SYNOPSIS
+.nf
+.B extern char *tzname[2];
+.PP
+.B void tzset()
+.PP
+.B #include 
+.PP
+.B char *ctime(clock)
+.B const time_t *clock;
+.PP
+.B double difftime(time1, time0)
+.B time_t time1;
+.B time_t time0;
+.PP
+.B #include 
+.PP
+.B char *asctime(tm)
+.B const struct tm *tm;
+.PP
+.B struct tm *localtime(clock)
+.B const time_t *clock;
+.PP
+.B struct tm *gmtime(clock)
+.B const time_t *clock;
+.PP
+.B time_t mktime(tm)
+.B struct tm *tm;
+.PP
+.B cc ... -ltz
+.fi
+.SH DESCRIPTION
+.I Ctime\^
+converts a long integer, pointed to by
+.IR clock ,
+representing the time in seconds since
+00:00:00 UTC, 1970-01-01,
+and returns a pointer to a
+string of the form
+.br
+.ce
+.eo
+Thu Nov 24 18:22:48 1986\n\0
+.br
+.ec
+Years requiring fewer than four characters are padded with leading zeroes.
+For years longer than four characters, the string is of the form
+.br
+.ce
+.eo
+Thu Nov 24 18:22:48     81986\n\0
+.ec
+.br
+with five spaces before the year.
+These unusual formats are designed to make it less likely that older
+software that expects exactly 26 bytes of output will mistakenly output
+misleading values for out-of-range years.
+.PP
+.I Localtime\^
+and
+.I gmtime\^
+return pointers to ``tm'' structures, described below.
+.I Localtime\^
+corrects for the time zone and any time zone adjustments
+(such as Daylight Saving Time in the United States).
+After filling in the ``tm'' structure,
+.I localtime
+sets the
+.BR tm_isdst 'th
+element of
+.B tzname
+to a pointer to an
+ASCII string that's the time zone abbreviation to be used with
+.IR localtime 's
+return value.
+.PP
+.I Gmtime\^
+converts to Coordinated Universal Time.
+.PP
+.I Asctime\^
+converts a time value contained in a
+``tm'' structure to a string,
+as shown in the above example,
+and returns a pointer to the string.
+.PP
+.I Mktime\^
+converts the broken-down time,
+expressed as local time,
+in the structure pointed to by
+.I tm
+into a calendar time value with the same encoding as that of the values
+returned by the
+.I time
+function.
+The original values of the
+.B tm_wday
+and
+.B tm_yday
+components of the structure are ignored,
+and the original values of the other components are not restricted
+to their normal ranges.
+(A positive or zero value for
+.B tm_isdst
+causes
+.I mktime
+to presume initially that summer time (for example, Daylight Saving Time
+in the U.S.A.)
+respectively,
+is or is not in effect for the specified time.
+A negative value for
+.B tm_isdst
+causes the
+.I mktime
+function to attempt to divine whether summer time is in effect
+for the specified time; in this case it does not use a consistent
+rule and may give a different answer when later
+presented with the same argument.)
+On successful completion, the values of the
+.B tm_wday
+and
+.B tm_yday
+components of the structure are set appropriately,
+and the other components are set to represent the specified calendar time,
+but with their values forced to their normal ranges; the final value of
+.B tm_mday
+is not set until
+.B tm_mon
+and
+.B tm_year
+are determined.
+.I Mktime\^
+returns the specified calendar time;
+If the calendar time cannot be represented,
+it returns
+.BR -1 .
+.PP
+.I Difftime\^
+returns the difference between two calendar times,
+.RI ( time1
+-
+.IR time0 ),
+expressed in seconds.
+.PP
+Declarations of all the functions and externals, and the ``tm'' structure,
+are in the
+.B \^
+header file.
+The structure (of type)
+.B struct tm
+includes the following fields:
+.RS
+.PP
+.nf
+.ta .5i +\w'long tm_gmtoff;\0\0'u
+	int tm_sec;	/\(** seconds (0 - 60) \(**/
+	int tm_min;	/\(** minutes (0 - 59) \(**/
+	int tm_hour;	/\(** hours (0 - 23) \(**/
+	int tm_mday;	/\(** day of month (1 - 31) \(**/
+	int tm_mon;	/\(** month of year (0 - 11) \(**/
+	int tm_year;	/\(** year \- 1900 \(**/
+	int tm_wday;	/\(** day of week (Sunday = 0) \(**/
+	int tm_yday;	/\(** day of year (0 - 365) \(**/
+	int tm_isdst;	/\(** is summer time in effect? \(**/
+	char \(**tm_zone;	/\(** abbreviation of timezone name \(**/
+	long tm_gmtoff;	/\(** offset from UTC in seconds \(**/
+.fi
+.RE
+.PP
+The
+.I tm_zone
+and
+.I tm_gmtoff
+fields exist, and are filled in, only if arrangements to do
+so were made when the library containing these functions was
+created.
+There is no guarantee that these fields will continue to exist
+in this form in future releases of this code.
+.PP
+.I Tm_isdst\^
+is non-zero if summer time is in effect.
+.PP
+.I Tm_gmtoff
+is the offset (in seconds) of the time represented
+from UTC, with positive values indicating east
+of the Prime Meridian.
+.SH FILES
+.ta \w'/usr/local/etc/zoneinfo/posixrules\0\0'u
+/usr/local/etc/zoneinfo	time zone information directory
+.br
+/usr/local/etc/zoneinfo/localtime	local time zone file
+.br
+/usr/local/etc/zoneinfo/posixrules	used with POSIX-style TZ's
+.br
+/usr/local/etc/zoneinfo/GMT	for UTC leap seconds
+.sp
+If
+.B /usr/local/etc/zoneinfo/GMT
+is absent,
+UTC leap seconds are loaded from
+.BR /usr/local/etc/zoneinfo/posixrules .
+.SH SEE ALSO
+getenv(3),
+newstrftime(3),
+newtzset(3),
+time(2),
+tzfile(5)
+.SH NOTES
+The return values point to static data;
+the data is overwritten by each call.
+The
+.B tm_zone
+field of a returned
+.B "struct tm"
+points to a static array of characters, which
+will also be overwritten at the next call
+(and by calls to
+.IR tzset ).
+.PP
+.I Asctime\^
+and
+.I ctime\^
+behave strangely for years before 1000 or after 9999.
+The 1989 and 1999 editions of the C Standard say
+that years from \-99 through 999 are converted without
+extra spaces, but this conflicts with longstanding
+tradition and with this implementation.
+Traditional implementations of these two functions are
+restricted to years in the range 1900 through 2099.
+To avoid this portability mess, new programs should use
+.I strftime\^
+instead.
+.PP
+Avoid using out-of-range values with
+.I mktime
+when setting up lunch with promptness sticklers in Riyadh.
+.\" @(#)newctime.3	8.3
+.\" This file is in the public domain, so clarified as of
+.\" 2009-05-17 by Arthur David Olson.
Index: vendor/tzcode/tzcode2009h/unused/newstrftime.3
===================================================================
--- vendor/tzcode/tzcode2009h/unused/newstrftime.3	(nonexistent)
+++ vendor/tzcode/tzcode2009h/unused/newstrftime.3	(revision 192888)
@@ -0,0 +1,232 @@
+.\" Based on the UCB file whose copyright information appears below.
+.\" Copyright (c) 1989, 1991 The Regents of the University of California.
+.\" All rights reserved.
+.\"
+.\" This code is derived from software contributed to Berkeley by
+.\" the American National Standards Committee X3, on Information
+.\" Processing Systems.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\"    notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\"    notice, this list of conditions and the following disclaimer in the
+.\"    documentation and/or other materials provided with the distribution.
+.\" 3. All advertising materials mentioning features or use of this software
+.\"    must display the following acknowledgement:
+.\"	This product includes software developed by the University of
+.\"	California, Berkeley and its contributors.
+.\" 4. Neither the name of the University nor the names of its contributors
+.\"    may be used to endorse or promote products derived from this software
+.\"    without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\"     from: @(#)strftime.3	5.12 (Berkeley) 6/29/91
+.\"	$Id: strftime.3,v 1.4 1993/12/15 20:33:00 jtc Exp $
+.\"
+.TH NEWSTRFTIME 3
+.SH NAME
+strftime \- format date and time
+.SH SYNOPSIS
+.nf
+.B #include 
+.B #include 
+.PP
+.B size_t strftime(buf, maxsize, format, timeptr)
+.B char *buf;
+.B size_t maxsize;
+.B const char *format;
+.B const struct tm *timeptr
+.PP
+.B cc ... -ltz
+.fi
+.SH DESCRIPTION
+The
+.I strftime\^
+function formats the information from
+.I timeptr\^
+into the buffer
+.I buf\^
+according to the string pointed to by
+.IR format\^ .
+.PP
+The
+.I format\^
+string consists of zero or more conversion specifications and
+ordinary characters.
+All ordinary characters are copied directly into the buffer.
+A conversion specification consists of a percent sign
+.Ql %
+and one other character.
+.PP
+No more than
+.I maxsize\^
+characters are be placed into the array.
+If the total number of resulting characters, including the terminating
+null character, is not more than
+.IR maxsize\^ ,
+.I strftime\^
+returns the number of characters in the array, not counting the
+terminating null.
+Otherwise, zero is returned.
+.PP
+Each conversion specification is replaced by the characters as
+follows which are then copied into the buffer.
+.TP
+%A
+is replaced by the locale's full weekday name.
+.TP
+%a
+is replaced by the locale's abbreviated weekday name.
+.TP
+%B
+is replaced by the locale's full month name.
+.TP
+%b or %h
+is replaced by the locale's abbreviated month name.
+.TP
+%C
+is replaced by the century (a year divided by 100 and truncated to an integer)
+as a decimal number (00-99).
+.TP
+%c
+is replaced by the locale's appropriate date and time representation.
+.TP
+%D
+is replaced by the date in the format %m/%d/%y.
+.TP
+%d
+is replaced by the day of the month as a decimal number (01-31).
+.TP
+%e
+is replaced by the day of month as a decimal number (1-31);
+single digits are preceded by a blank.
+.TP
+%F
+is replaced by the date in the format %Y-%m-%d.
+.TP
+%G
+is replaced by the ISO 8601 year with century as a decimal number.
+.TP
+%g
+is replaced by the ISO 8601 year without century as a decimal number (00-99).
+.TP
+%H
+is replaced by the hour (24-hour clock) as a decimal number (00-23).
+.TP
+%I
+is replaced by the hour (12-hour clock) as a decimal number (01-12).
+.TP
+%j
+is replaced by the day of the year as a decimal number (001-366).
+.TP
+%k
+is replaced by the hour (24-hour clock) as a decimal number (0-23);
+single digits are preceded by a blank.
+.TP
+%l
+is replaced by the hour (12-hour clock) as a decimal number (1-12);
+single digits are preceded by a blank.
+.TP
+%M
+is replaced by the minute as a decimal number (00-59).
+.TP
+%m
+is replaced by the month as a decimal number (01-12).
+.TP
+%n
+is replaced by a newline.
+.TP
+%p
+is replaced by the locale's equivalent of either AM or PM.
+.TP
+%R
+is replaced by the time in the format %H:%M.
+.TP
+%r
+is replaced by the locale's representation of 12-hour clock time
+using AM/PM notation.
+.TP
+%S
+is replaced by the second as a decimal number (00-60).
+.TP
+%s
+is replaced by the number of seconds since the Epoch, UTC (see mktime(3)).
+.TP
+%T
+is replaced by the time in the format %H:%M:%S.
+.TP
+%t
+is replaced by a tab.
+.TP
+%U
+is replaced by the week number of the year (Sunday as the first day of
+the week) as a decimal number (00-53).
+.TP
+%u
+is replaced by the weekday (Monday as the first day of the week)
+as a decimal number (1-7).
+.TP
+%V
+is replaced by the week number of the year (Monday as the first day of
+the week) as a decimal number (01-53).  If the week containing January
+1 has four or more days in the new year, then it is week 1; otherwise
+it is week 53 of the previous year, and the next week is week 1.
+.TP
+%W
+is replaced by the week number of the year (Monday as the first day of
+the week) as a decimal number (00-53).
+.TP
+%w
+is replaced by the weekday (Sunday as the first day of the week)
+as a decimal number (0-6).
+.TP
+%X
+is replaced by the locale's appropriate time representation.
+.TP
+%x
+is replaced by the locale's appropriate date representation.
+.TP
+%Y
+is replaced by the year with century as a decimal number.
+.TP
+%y
+is replaced by the year without century as a decimal number (00-99).
+.TP
+%Z
+is replaced by the time zone name,
+or by the empty string if this is not determinable.
+.TP
+%z
+is replaced by the offset from UTC in the format +HHMM or -HHMM as appropriate,
+with positive values representing locations east of Greenwich,
+or by the empty string if this is not determinable.
+.TP
+%%
+is replaced by a single %.
+.TP
+%+
+is replaced by the date and time in date(1) format.
+.SH SEE ALSO
+date(1),
+getenv(3),
+newctime(3),
+newtzset(3),
+time(2),
+tzfile(5)
+.\" @(#)newstrftime.3	8.2
+.\" This file is in the public domain, so clarified as of
+.\" 2009-05-17 by Arthur David Olson.
Index: vendor/tzcode/tzcode2009h/unused/newtzset.3
===================================================================
--- vendor/tzcode/tzcode2009h/unused/newtzset.3	(nonexistent)
+++ vendor/tzcode/tzcode2009h/unused/newtzset.3	(revision 192888)
@@ -0,0 +1,239 @@
+.TH NEWTZSET 3
+.SH NAME
+tzset \- initialize time conversion information
+.SH SYNOPSIS
+.nf
+.B void tzset()
+.PP
+.B cc ... -ltz
+.fi
+.SH DESCRIPTION
+.I Tzset
+uses the value of the environment variable
+.B TZ
+to set time conversion information used by
+.IR localtime .
+If
+.B TZ
+does not appear in the environment,
+the best available approximation to local wall clock time, as specified
+by the
+.IR tzfile (5)-format
+file
+.B localtime
+in the system time conversion information directory, is used by
+.IR localtime .
+If
+.B TZ
+appears in the environment but its value is a null string,
+Coordinated Universal Time (UTC) is used (without leap second
+correction).  If
+.B TZ
+appears in the environment and its value is not a null string:
+.IP
+if the value begins with a colon, it is used as a pathname of a file
+from which to read the time conversion information;
+.IP
+if the value does not begin with a colon, it is first used as the
+pathname of a file from which to read the time conversion information,
+and, if that file cannot be read, is used directly as a specification of
+the time conversion information.
+.PP
+When
+.B TZ
+is used as a pathname, if it begins with a slash,
+it is used as an absolute pathname; otherwise,
+it is used as a pathname relative to a system time conversion information
+directory.
+The file must be in the format specified in
+.IR tzfile (5).
+.PP
+When
+.B TZ
+is used directly as a specification of the time conversion information,
+it must have the following syntax (spaces inserted for clarity):
+.IP
+\fIstd\|offset\fR[\fIdst\fR[\fIoffset\fR][\fB,\fIrule\fR]]
+.PP
+Where:
+.RS
+.TP 15
+.IR std " and " dst
+Three or more bytes that are the designation for the standard
+.RI ( std )
+or summer
+.RI ( dst )
+time zone.  Only
+.I std
+is required; if
+.I dst
+is missing, then summer time does not apply in this locale.
+Upper- and lowercase letters are explicitly allowed.  Any characters
+except a leading colon
+.RB ( : ),
+digits, comma
+.RB ( , ),
+minus
+.RB ( \(mi ),
+plus
+.RB ( \(pl ),
+and ASCII NUL are allowed.
+.TP
+.I offset
+Indicates the value one must add to the local time to arrive at
+Coordinated Universal Time.  The
+.I offset
+has the form:
+.RS
+.IP
+\fIhh\fR[\fB:\fImm\fR[\fB:\fIss\fR]]
+.RE
+.IP
+The minutes
+.RI ( mm )
+and seconds
+.RI ( ss )
+are optional.  The hour
+.RI ( hh )
+is required and may be a single digit.  The
+.I offset
+following
+.I std
+is required.  If no
+.I offset
+follows
+.IR dst ,
+summer time is assumed to be one hour ahead of standard time.  One or
+more digits may be used; the value is always interpreted as a decimal
+number.  The hour must be between zero and 24, and the minutes (and
+seconds) \(em if present \(em between zero and 59.  If preceded by a
+.RB `` \(mi '',
+the time zone shall be east of the Prime Meridian; otherwise it shall be
+west (which may be indicated by an optional preceding
+.RB `` \(pl '').
+.TP
+.I rule
+Indicates when to change to and back from summer time.  The
+.I rule
+has the form:
+.RS
+.IP
+\fIdate\fB/\fItime\fB,\fIdate\fB/\fItime\fR
+.RE
+.IP
+where the first
+.I date
+describes when the change from standard to summer time occurs and the
+second
+.I date
+describes when the change back happens.  Each
+.I time
+field describes when, in current local time, the change to the other
+time is made.
+.IP
+The format of
+.I date
+is one of the following:
+.RS
+.TP 10
+.BI J n
+The Julian day
+.I n
+.RI "(1\ \(<=" "\ n\ " "\(<=\ 365).
+Leap days are not counted; that is, in all years \(em including leap
+years \(em February 28 is day 59 and March 1 is day 60.  It is
+impossible to explicitly refer to the occasional February 29.
+.TP
+.I n
+The zero-based Julian day
+.RI "(0\ \(<=" "\ n\ " "\(<=\ 365).
+Leap days are counted, and it is possible to refer to February 29.
+.TP
+.BI M m . n . d
+The
+.IR d' th
+day
+.RI "(0\ \(<=" "\ d\ " "\(<=\ 6)
+of week
+.I n
+of month
+.I m
+of the year
+.RI "(1\ \(<=" "\ n\ " "\(<=\ 5,
+.RI "1\ \(<=" "\ m\ " "\(<=\ 12,
+where week 5 means ``the last
+.I d
+day in month
+.IR m ''
+which may occur in either the fourth or the fifth week).  Week 1 is the
+first week in which the
+.IR d' th
+day occurs.  Day zero is Sunday.
+.RE
+.IP "" 15
+The
+.I time
+has the same format as
+.I offset
+except that no leading sign
+.RB (`` \(mi ''
+or
+.RB `` \(pl '')
+is allowed.  The default, if
+.I time
+is not given, is
+.BR 02:00:00 .
+.RE
+.LP
+If no
+.I rule
+is present in
+.BR TZ ,
+the rules specified
+by the
+.IR tzfile (5)-format
+file
+.B posixrules
+in the system time conversion information directory are used, with the
+standard and summer time offsets from UTC replaced by those specified by
+the
+.I offset
+values in
+.BR TZ .
+.PP
+For compatibility with System V Release 3.1, a semicolon
+.RB ( ; )
+may be used to separate the
+.I rule
+from the rest of the specification.
+.PP
+If the
+.B TZ
+environment variable does not specify a
+.IR tzfile (5)-format
+and cannot be interpreted as a direct specification,
+UTC is used.
+.SH FILES
+.ta \w'/usr/local/etc/zoneinfo/posixrules\0\0'u
+/usr/local/etc/zoneinfo	time zone information directory
+.br
+/usr/local/etc/zoneinfo/localtime	local time zone file
+.br
+/usr/local/etc/zoneinfo/posixrules	used with POSIX-style TZ's
+.br
+/usr/local/etc/zoneinfo/GMT	for UTC leap seconds
+.sp
+If
+.B /usr/local/etc/zoneinfo/GMT
+is absent,
+UTC leap seconds are loaded from
+.BR /usr/local/etc/zoneinfo/posixrules .
+.SH SEE ALSO
+getenv(3),
+newctime(3),
+newstrftime(3),
+time(2),
+tzfile(5)
+.\" @(#)newtzset.3	8.2
+.\" This file is in the public domain, so clarified as of
+.\" 2009-05-17 by Arthur David Olson.
Index: vendor/tzcode/tzcode2009h/unused/tz-art.htm
===================================================================
--- vendor/tzcode/tzcode2009h/unused/tz-art.htm	(nonexistent)
+++ vendor/tzcode/tzcode2009h/unused/tz-art.htm	(revision 192888)
@@ -0,0 +1,406 @@
+
+
+
+
+Time and the Arts
+
+
+

Time and the Arts

+
+@(#)tz-art.htm 8.12 +
+

+This file is in the public domain, so clarified as of +2009-05-17 by Arthur David Olson. +

+

+Please send corrections to this web page to the +time zone mailing list.

+

+See also Sources for Time Zone and Daylight Saving Time Data.

+
+

+Data on recordings of "Save That Time," Russ Long, Serrob Publishing, BMI:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ArtistKarrin Allyson
CDI Didn't Know About You
Copyright Date1993
LabelConcord Jazz, Inc.
IDCCD-4543
Track Time3:44
PersonnelKarrin Allyson, vocal; +Russ Long, piano; +Gerald Spaits, bass; +Todd Strait, drums
NotesCD notes "additional lyric by Karrin Allyson; +arranged by Russ Long and Karrin Allyson"
ADO Rating1 star
AMG Rating4 stars
Penguin Rating3.5 stars
 
ArtistKevin Mahogany
CDDouble Rainbow
Copyright Date1993
LabelEnja Records
IDENJ-7097 2
Track Time6:27
PersonnelKevin Mahogany, vocal; +Kenny Barron, piano; +Ray Drummond, bass; +Ralph Moore, tenor saxophone; +Lewis Nash, drums
ADO Rating1.5 stars
AMG Rating3 stars
Penguin Rating3 stars
 
ArtistJoe Williams
CDHere's to Life
Copyright Date1994
LabelTelarc International Corporation
IDCD-83357
Track Time3:58
PersonnelJoe Williams, vocal +The Robert Farnon [39 piece] Orchestra
NotesThis CD is also available as part of a 3-CD package from +Telarc, "Triple Play" (CD-83461)
ADO Ratingblack dot
AMG Rating2 stars
Penguin Rating3 stars
 
ArtistCharles Fambrough
CDKeeper of the Spirit
Copyright Date1995
LabelAudioQuest Music
IDAQ-CD1033
Track Time7:07
PersonnelCharles Fambrough, bass; +Joel Levine, tenor recorder; +Edward Simon, piano; +Lenny White, drums; +Marion Simon, percussion
NotesOn-line information and samples available at +http://wwmusic.com/~music/audioq/rel/1033.html
ADO Rating2 stars
AMG Ratingunrated
Penguin Rating3 stars
+
+

Also of note:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ArtistHolly Cole Trio
CDBlame It On My Youth
Copyright Date1992
LabelManhattan
IDCDP 7 97349 2
Total Time37:45
PersonnelHolly Cole, voice; +Aaron Davis, piano; +David Piltch, string bass
NotesLyrical reference to "Eastern Standard Time" in +Tom Waits' "Purple Avenue"
ADO Rating2.5 stars
AMG Rating3 stars
Penguin Ratingunrated
 
ArtistMilt Hinton
CDOld Man Time
Copyright Date1990
LabelChiaroscuro
IDCR(D) 310
Total Time149:38 (two CDs)
PersonnelMilt Hinton, bass; +Doc Cheatham, Dizzy Gillespie, Clark Terry, trumpet; +Al Grey, trombone; +Eddie Barefield, Joe Camel (Flip Phillips), Buddy Tate, +clarinet and saxophone; +John Bunch, Red Richards, Norman Simmons, Derek Smith, +Ralph Sutton, piano; +Danny Barker, Al Casey, guitar; +Gus Johnson, Gerryck King, Bob Rosengarden, Jackie Williams, +drums; +Lionel Hampton, vibraphone; +Cab Calloway, Joe Williams, vocal; +Buck Clayton, arrangements
Notestunes include Old Man Time, Time After Time, +Sometimes I'm Happy, +A Hot Time in the Old Town Tonight, +Four or Five Times, Now's the Time, +Time on My Hands, This Time It's Us, +and Good Time Charlie +On-line samples available at +http://www.chiaroscurojazz.com/albuminfo.php3?albumid=49
ADO Rating3 stars
AMG Rating4.5 stars
Penguin Rating3 stars
 
ArtistAlan Broadbent
CDPacific Standard Time
Copyright Date1995
LabelConcord Jazz, Inc.
IDCCD-4664
Total Time62:42
PersonnelAlan Broadbent, piano; +Putter Smith, Bass; +Frank Gibson, Jr., drums
NotesThe CD cover features an analemma for equation-of-time fans
ADO Rating1 star
AMG Rating4 stars
Penguin Rating3.5 stars
 
ArtistAnthony Braxton/Richard Teitelbaum
CDSilence/Time Zones
Copyright Date1996
LabelBlack Lion
IDBLCD 760221
Total Time72:58
PersonnelAnthony Braxton, sopranino and alto saxophones, +contrebasse clarinet, miscellaneous instruments; +Leo Smith, trumpet and miscellaneous instruments; +Leroy Jenkins, violin and miscellaneous instruments; +Richard Teitelbaum, modular moog and micromoog synthesizer
ADO Ratingblack dot
AMG Ratingunrated
 
ArtistCharles Gayle
CDTime Zones
Copyright Date2006
LabelTompkins Square
IDTSQ2839
Total Time49:06
PersonnelCharles Gayle, piano
ADO Rating1 star
AMG Rating4.5 stars
 
ArtistThe Get Up Kids
CDEudora
Copyright Date2001
LabelVagrant
ID357
Total Time65:12
NotesIncludes the song "Central Standard Time." Thanks to Colin Bowern for this information.
AMG Rating2.5 stars
 
ArtistColdplay
SongClocks
Copyright Date2003
LabelCapitol Records
ID52608
Total Time4:13
NotesWon the 2004 Record of the Year honor at the +Grammy Awards. Co-written and performed by Chris Martin, +great-great-grandson of DST inventor William Willett. The song's first +line is "Lights go out and I can't be saved".
 
ArtistIrving Kahal and Harry Richman
SongThere Ought to be a Moonlight Saving Time
Copyright Date1931
NotesThis musical standard was a #1 hit for Guy Lombardo +in 1931, and was also performed by Maurice Chevalier, Blossom Dearie +and many others. The phrase "Moonlight saving time" also appears in +the 1995 country song "Not Enough Hours in the Night" written by Aaron +Barker, Kim Williams and Rob Harbin and performed by Doug +Supernaw.
 
ArtistThe Microscopic Septet
CDLobster Leaps In
Copyright Date2008
LabelCuneiform
ID272
Total Time73:05
NotesIncludes the song "Twilight Time Zone."
AMG Rating3.5 stars
ADO Rating2 stars
 
ArtistBob Dylan
CDThe Time They Are A-Changin'
Copyright Date1964
LabelColumbia
IDCK-8905
Total Time45:36
AMG Rating4.5 stars
ADO Rating1.5 stars
NotesThe title song is also available on "Bob Dylan's Greatest Hits" and "The Essential Bob Dylan."
 
TV episode titleThe Lost Hour
TV seriesEerie, Indiana
TV episode number10
NetworkNBC
Air date1991-12-01
NotesDespite Indiana's then-lack of DST, Marshall changes his clock with unusual consequences.
 
TV episode titleTime Tunnel
TV seriesThe Adventures of Pete & Pete
TV episode number5, season 2
NetworkNickelodeon
Air date1994-10-23
NotesThe two Petes travel back in time an hour on the day that DST ends.
 
TV episode titleKing-Size Homer
TV seriesThe Simpsons
TV episode number135
NetworkFox
Air date1995-11-05
NotesHomer, working from home, remarks "8:58, first +time I've ever been early for work. Except for all those daylight +savings days. Lousy farmers."
 
ArtistJules Verne
BookLe Tour du Monde en Quatre-Vingts Jours +(Around the World in Eighty Days)
NotesWall-clock time plays a central role in the plot. +European readers of the 1870s clearly held the U.S. press in +deep contempt; the protagonists cross the U.S. without once +reading a paper. +An on-line French-language version of the book +"with illustrations from the original 1873 French-language edition" +is available at +http://fourmilab.ch/etexts/www/tdm80j +An on-line English-language translation of the book is available at +http://www.literature.org/Works/Jules-Verne/eighty
 
ArtistUmberto Eco
BookThe Island of the Day Before +(L'isola del giorno prima)
Copyright Date1994
Notes +"...the story of a 17th century Italian nobleman trapped near an island +on the International Date Line. Time and time zones play an integral +part in the novel." (Paul Eggert, 2006-04-22) +
 
ArtistDavid Jebb
Book +The Thirteenth Time Zone
Notes +"It's fiction, but it's based on his experiences and travels." (Paul Eggert, 2006-04-22) +
 
ArtistJohn Dunning
BookTwo +O'Clock, Eastern Wartime
Copyright Date2001
Notes +Mystery, history, daylight saving time, and old-time radio. +
 
FilmBell Science - About Time
NotesThe Frank Baxter/Richard Deacon extravaganza. +Information is available at +http://www.videoflicks.com/titles/1035/1035893.htm
+
+
    +
  • +An episode of "The Adventures of Superman" entitled "The Mysterious +Cube," first aired 1958-02-24, had Superman convincing the controllers +of WWV to broadcast time signals five minutes ahead of actual time; +doing so got a crook trying to beat the statute of limitations to +emerge a bit too early from the titular enclosure. +
  • +
  • +The 1960s ITC television series "The Prisoner" included an episode +entitled "The Chimes of Big Ben" in which our protagonist tumbled to +the fraudulent nature of a Poland-to-England escape upon hearing "Big +Ben" chiming on Polish local time. +
  • +
  • +The series "Seinfeld" included an episode entitled "The Susie," first +broadcast 1997-02-13, in which Kramer decides that daylight saving time +isn't coming fast enough, so he sets his watch ahead an hour. +
  • +
  • +The syndicated comic strip "Dilbert" featured an all-too-rare example of +time zone humor on 1998-03-14. +
  • +
  • +Surrealist artist Guy Billout's work "Date Line" appeared on page 103 +of the 1999-11 Atlantic Monthly. +
  • +
  • +"Gloom, Gloom, Go Away" by Walter Kirn appeared on page 106 of Time +Magazine's 2002-11-11 issue; among other things, it proposed +year-round DST as a way of lessening wintertime despair. +
  • +
  • +The "20 Hours in America" episode of "The West Wing," first aired 2002-09-25, +saw White House staffers stranded in Indiana; they thought they had time to +catch Air Force One but were done in by intra-Indiana local time changes. +
  • +
  • +"In what time zone would you find New York City?" was a $200 question on +the 1999-11-13 United States airing of "Who Wants to Be a Millionaire?" +"In 1883, what industry led the movement to divide the U.S. into four time +zones?" was a $32,000 question on the 2001-05-23 United States airing of +"Who Wants to Be a Millionaire?" At this rate, the million-dollar time-zone +question should have been asked 2002-06-04. +
  • +
  • +A private jet's mid-flight change of time zones distorts Alison Dubois' +premonition in the "We Had a Dream" episode of "Medium" +(originally aired 2007-02-28). +
  • +
+
+
    +
  • +"We're been using the five-cent nickle in this country since 1492. +Now that's pretty near 100 years, daylight savings [sic]." +(Groucho Marx as Captain Spaulding in "Animal Crackers", 1930, +as noted by Will Fitzerald) +
  • +
  • +"Good news." +"What did they do? Extend Daylight Saving Time year round?" +(Professional tanner George Hamilton, in dialog from a +May, 1999 episode of the syndicated television series "Baywatch") +
  • +
  • +"A fundamental belief held by Americans is that if you are on land, you +cannot be killed by a fish...So most Americans remain on land, believing +they're safe. Unfortunately, this belief—like so many myths, such as that +there's a reason for 'Daylight Saving Time'—is false." +(Dave Barry column, 2000-07-02) +
  • +
  • +"I once had sex for an hour and five minutes, but that was on the day +when you turn the clocks ahead." +(Garry Shandling, 52nd Annual Emmys, 2000-09-10) +
  • +
  • +"Would it impress you if I told you I invented Daylight Savings Time?" +("Sahjhan" to "Lilah" in dialog from the "Loyalty" episode of "Angel," +originally aired 2002-02-25) +
  • +
  • +"I thought you said Tulsa was a three hour flight." +"Well, you're forgetting about the time difference." +("Chandler" and "Joey" in dialog from the episode of "Friends" first +aired 2002-12-05) +
  • +
  • +"Is that a pertinent fact, +or are you trying to dazzle me with your command of time zones?" +(Kelsey Grammer as "Frasier Crane") +
  • +
  • +"Don't worry about the world coming to an end today. +It is already tomorrow in Australia." +(Charles M. Schulz, provided by Steve Summit) +
  • +
+ + Property changes on: vendor/tzcode/tzcode2009h/unused/tz-art.htm ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: vendor/tzcode/tzcode2009h/unused/tz-link.htm =================================================================== --- vendor/tzcode/tzcode2009h/unused/tz-link.htm (nonexistent) +++ vendor/tzcode/tzcode2009h/unused/tz-link.htm (revision 192888) @@ -0,0 +1,652 @@ + + + +Sources for Time Zone and Daylight Saving Time Data + + + + + + + + + + +

Sources for Time Zone and Daylight Saving Time Data

+
+@(#)tz-link.htm 8.19 +
+

+This file is in the public domain, so clarified as of +2009-05-17 by Arthur David Olson. +

+

+Please send corrections to this web page to the +time zone mailing list.

+

The tz database

+

+The public-domain +time zone database contains code and data +that represent the history of local time +for many representative locations around the globe. +It is updated periodically to reflect changes made by political bodies +to time zone +boundaries, UTC offsets, and +daylight-saving +rules. +This database (often called tz or zoneinfo) +is used by several implementations, +including +the +GNU +C Library used in +GNU/Linux, +FreeBSD, +NetBSD, +OpenBSD, +Cygwin, +DJGPP, +AIX, +Mac OS X, +OpenVMS, +Oracle Database, +Solaris, +Tru64, and +UnixWare.

+

+Each location in the database represents a national region where all +clocks keeping local time have agreed since 1970. +Locations are identified by continent or ocean and then by the name of +the location, which is typically the largest city within the region. +For example, America/New_York +represents most of the US eastern time zone; +America/Phoenix represents most of Arizona, which +uses mountain time without daylight saving time (DST); +America/Detroit represents most of Michigan, which uses +eastern time but with different DST rules in 1975; +and other entries represent smaller regions like Starke County, +Indiana, which switched from central to eastern time in 1991 +and switched back in 2006. +To use the database on an extended POSIX +implementation set the TZ environment variable to +the location's full name, e.g., TZ="America/New_York".

+

+In the tz database's +FTP distribution +the code is in the file tzcodeC.tar.gz, +where C is the code's version; +similarly, the data are in tzdataD.tar.gz, +where D is the data's version. +The following shell commands download +these files to a GNU/Linux or similar host; +see the downloaded +README file for what to do next.

+
wget 'ftp://elsie.nci.nih.gov/pub/tz*.tar.gz'
+gzip -dc tzcode*.tar.gz | tar -xf -
+gzip -dc tzdata*.tar.gz | tar -xf -
+
+

+The code lets you compile the tz source files into +machine-readable binary files, one for each location. It also lets +you read a tz binary file and interpret time stamps for that +location.

+

+The data are by no means authoritative. If you find errors, please +send changes to the time zone +mailing list. You can also browse recent +messages sent to the mailing list, subscribe to it, +retrieve the full archive of old +messages (in gzip compressed format), or retrieve archived older versions of code +and data; there is also a smaller HTTP +mirror.

+

+The Web has several other sources for time zone and daylight saving time data. +Here are some recent links that may be of interest. +

+

Web pages using recent versions of the tz database

+

+These are listed roughly in ascending order of complexity and fanciness. +

+ +

Other time zone database formats

+ +

Other tz compilers

+ +

Other tz binary file readers

+
    +
  • The GNU C +Library +has an independent, thread-safe implementation of +a tz binary file reader. +This library is freely available under the + +GNU Lesser General Public License +(LGPL), +and is widely used in GNU/Linux systems.
  • +
  • ZoneInfo.java +is a tz binary file reader written in Java. +It is freely available under the LGPL.
  • +
  • Tcl, mentioned above, also contains a +tz binary file reader.
  • +
+

Other tz-based time zone software

+
    +
  • FoxClocks +is an extension for Mozilla +Toolkit applications like Firefox, Thunderbird, and +Sunbird. +It displays multiple clocks in the application window, and has a mapping +interface to Google Earth. +It is freely available under the GPL.
  • +
  • International +clock (intclock) is a multi-timezone clock for +GNU/Linux and similar systems. It is freely available +under the GPL.
  • +
  • PublicDomain +has a copy of a recent tz database, accessed via a C# library. As its +name suggests, it is in the public domain. Only current time stamps +are well supported; historical data are compiled into the runtime but +are not easily accessible.
  • +
  • Sun Java releases since 1.4 +contain a copy of a subset of a recent tz database in a +Java-specific format.
  • +
  • Time Zone is +a WordPress plugin. It is freely +available under a BSD-style license.
  • +
  • VelaTerra is +a Mac OS X program. Its developers +offer free +licenses to tz contributors.
  • +
  • World Time Explorer is a +Microsoft Windows program.
  • +
+

Other time zone databases

+ +

Maps

+ +

Time zone boundaries

+ +

Civil time concepts and history

+ +

National histories of legal time

+
+
Australia
+
The Parliamentary Library has commissioned research +note on daylight saving time in Australia. +The Bureau of Meteorology publishes a list of +Implementation Dates of Daylight Savings Time within Australia.
+
Belgium
+
The Royal Observatory of Belgium maintains a table of time in Belgium (in Dutch).
+
Brazil
+
The Time Service Department of the National Observatory +records Brazil's daylight saving time decrees (in +Portuguese).
+
Canada
+
The Institute for National Measurement Standards publishes current +and some older information about Time +Zones & Daylight Saving Time.
+
Chile
+
The Chilean Hydrographic and Oceanographic Service publishes a history of +official time (in Spanish).
+
Germany
+
The National Institute for Science and Technology maintains the Realisation of +Legal Time in Germany.
+
Israel
+
The Interior Ministry periodically issues announcements (in Hebrew).
+
Mexico
+
The Investigation and Analysis Service of the Mexican Library of +Congress has published a history of Mexican local time (in Spanish).
+
Malaysia
+
See Singapore below.
+
Netherlands
+
Legal time in the Netherlands (in Dutch) +covers the history of local time in the Netherlands from ancient times.
+
New Zealand
+
The Department of Internal Affairs maintains a brief history About +Daylight Saving. The privately-maintained History of New Zealand +time has more details.
+
Norway
+
The Norwegian Meteorological Institute lists +Summer +time in Norway (in Norwegian), citing the +Institute of Theoretical Astrophysics, Oslo.
+
Singapore
+
Why +is Singapore in the "Wrong" Time Zone? details the +history of legal time in Singapore and Malaysia.
+
United Kingdom
+
History of +legal time in Britain discusses in detail the country +with perhaps the best-documented history of clock adjustments. +The National Physical Laboratory also maintains an Archive +of Summer time dates.
+
+

Precision timekeeping

+ +

Time notation

+
    +
  • +A Summary of +the International Standard Date and Time Notation is a good +summary of +ISO +8601:2004 -- Data elements and interchange formats -- Information +interchange -- Representation of dates and times.
  • +
  • +XML +Schema: Datatypes - dateTime specifies a format inspired by +ISO 8601 that is in common use in XML data.
  • +
  • +Internet +Message Format (Internet RFC 2822) §3.3 +specifies the time notation used in email and HTTP +headers.
  • +
  • +Date and Time +on the Internet: Timestamps (Internet RFC 3339) +specifies an ISO 8601 +profile for use in new Internet +protocols.
  • +
  • +Date & Time +Formats on the Web surveys web- and Internet-oriented date and time +formats.
  • +
  • +The +Best of Dates, the Worst of Dates covers many problems encountered +by software developers when handling dates and time stamps.
  • +
  • The Unicode Common Locale Data Repository +(CLDR) Project has localizations for time zone names, +abbreviations, identifiers, and formats. For example, it contains +French translations for "Eastern European Summer Time", "EEST", and +"Bucharest". By-Type +Chart: names.metazone shows these values for many locales. +ICU contains a mechanism for using this data.
  • +
  • Alphabetic time zone abbreviations should not be used as unique +identifiers for UTC offsets as they are ambiguous in +practice. For example, "EST" denotes 5 hours behind +UTC in English-speaking North America, but it denotes 10 +or 11 hours ahead of UTC in Australia; and +French-speaking North Americans prefer +"HNE" to +"EST". For POSIX the tz +database contains English abbreviations for all time stamps but in +many cases these are merely inventions of the database +maintainers.
  • +
  • Numeric time zone abbreviations typically count hours east of +UTC, e.g., +09 for Japan and +-10 for Hawaii. However, the POSIX +TZ environment variable uses the opposite convention. For +example, one might use TZ="JST-9" and +TZ="HST10" for Japan and Hawaii, respectively. If the +tz database is available, it is usually better to use +settings like TZ="Asia/Tokyo" and +TZ="Pacific/Honolulu" instead, as this should avoid +confusion, handle old time stamps better, and insulate you better from +any future changes to the rules. One should never set +POSIX TZ to a value like +"GMT-9", though, since this would falsely claim that +local time is nine hours ahead of UTC and the time zone +is called "GMT".
  • +
+

Related indexes

+ + + Property changes on: vendor/tzcode/tzcode2009h/unused/tz-link.htm ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: vendor/tzcode/tzcode2009h/unused/tzselect.8 =================================================================== --- vendor/tzcode/tzcode2009h/unused/tzselect.8 (nonexistent) +++ vendor/tzcode/tzcode2009h/unused/tzselect.8 (revision 192888) @@ -0,0 +1,43 @@ +.TH TZSELECT 8 +.SH NAME +tzselect \- select a time zone +.SH SYNOPSIS +.B tzselect +.SH DESCRIPTION +The +.B tzselect +program asks the user for information about the current location, +and outputs the resulting time zone description to standard output. +The output is suitable as a value for the TZ environment variable. +.PP +All interaction with the user is done via standard input and standard error. +.SH "ENVIRONMENT VARIABLES" +.TP +\f3AWK\fP +Name of a Posix-compliant +.I awk +program (default: +.BR awk ). +.TP +\f3TZDIR\fP +Name of the directory containing time zone data files (default: +.BR /usr/local/etc/zoneinfo ). +.SH FILES +.TP +\f2TZDIR\fP\f3/iso3166.tab\fP +Table of ISO 3166 2-letter country codes and country names. +.TP +\f2TZDIR\fP\f3/zone.tab\fP +Table of country codes, latitude and longitude, TZ values, and +descriptive comments. +.TP +\f2TZDIR\fP\f3/\fP\f2TZ\fP +Time zone data file for time zone \f2TZ\fP. +.SH "EXIT STATUS" +The exit status is zero if a time zone was successfully obtained from the user, +nonzero otherwise. +.SH "SEE ALSO" +newctime(3), tzfile(5), zdump(8), zic(8) +.\" @(#)tzselect.8 8.2 +.\" This file is in the public domain, so clarified as of +.\" 2009-05-17 by Arthur David Olson. Index: vendor/tzcode/tzcode2009h/unused/workman.sh =================================================================== --- vendor/tzcode/tzcode2009h/unused/workman.sh (nonexistent) +++ vendor/tzcode/tzcode2009h/unused/workman.sh (revision 192888) @@ -0,0 +1,32 @@ +#! /bin/sh + +#
+# @(#)workman.sh	8.2
+# This file is in the public domain, so clarified as of
+# 2009-05-17 by Arthur David Olson.
+
+# Tell groff not to emit SGR escape sequences (ANSI color escapes).
+GROFF_NO_SGR=1
+export GROFF_NO_SGR
+
+echo ".am TH
+.hy 0
+.na
+..
+.rm }H
+.rm }F" | nroff -man - ${1+"$@"} | perl -ne '
+	chomp;
+	s/.\010//g;
+	s/\s*$//;
+	if (/^$/) {
+		$sawblank = 1;
+		next;
+	} else {
+		if ($sawblank && $didprint) {
+			print "\n";
+			$sawblank = 0;
+		}
+		print "$_\n";
+		$didprint = 1;
+	}
+'
Index: vendor/tzcode/tzcode2009h/unused/checktab.awk
===================================================================
--- vendor/tzcode/tzcode2009h/unused/checktab.awk	(nonexistent)
+++ vendor/tzcode/tzcode2009h/unused/checktab.awk	(revision 192888)
@@ -0,0 +1,159 @@
+# Check tz tables for consistency.
+
+# @(#)checktab.awk	8.1
+
+# Contributed by Paul Eggert.
+
+BEGIN {
+	FS = "\t"
+
+	if (!iso_table) iso_table = "iso3166.tab"
+	if (!zone_table) zone_table = "zone.tab"
+	if (!want_warnings) want_warnings = -1
+
+	while (getline >"/dev/stderr"
+			status = 1
+		}
+		cc = $1
+		name = $2
+		if (cc !~ /^[A-Z][A-Z]$/) {
+			printf "%s:%d: invalid country code `%s'\n", \
+				iso_table, iso_NR, cc >>"/dev/stderr"
+			status = 1
+		}
+		if (cc <= cc0) {
+			if (cc == cc0) {
+				s = "duplicate";
+			} else {
+				s = "out of order";
+			}
+
+			printf "%s:%d: country code `%s' is %s\n", \
+				iso_table, iso_NR, cc, s \
+				>>"/dev/stderr"
+			status = 1
+		}
+		cc0 = cc
+		if (name2cc[name]) {
+			printf "%s:%d: `%s' and `%s' have the sname name\n", \
+				iso_table, iso_NR, name2cc[name], cc \
+				>>"/dev/stderr"
+			status = 1
+		}
+		name2cc[name] = cc
+		cc2name[cc] = name
+		cc2NR[cc] = iso_NR
+	}
+
+	zone_table = "zone.tab"
+	cc0 = ""
+
+	while (getline >"/dev/stderr"
+			status = 1
+		}
+		cc = $1
+		coordinates = $2
+		tz = $3
+		comments = $4
+		if (cc < cc0) {
+			printf "%s:%d: country code `%s' is out of order\n", \
+				zone_table, zone_NR, cc >>"/dev/stderr"
+			status = 1
+		}
+		cc0 = cc
+		if (tz2cc[tz]) {
+			printf "%s:%d: %s: duplicate TZ column\n", \
+				zone_table, zone_NR, tz >>"/dev/stderr"
+			status = 1
+		}
+		tz2cc[tz] = cc
+		tz2comments[tz] = comments
+		tz2NR[tz] = zone_NR
+		if (cc2name[cc]) {
+			cc_used[cc]++
+		} else {
+			printf "%s:%d: %s: unknown country code\n", \
+				zone_table, zone_NR, cc >>"/dev/stderr"
+			status = 1
+		}
+		if (coordinates !~ /^[-+][0-9][0-9][0-5][0-9][-+][01][0-9][0-9][0-5][0-9]$/ \
+		    && coordinates !~ /^[-+][0-9][0-9][0-5][0-9][0-5][0-9][-+][01][0-9][0-9][0-5][0-9][0-5][0-9]$/) {
+			printf "%s:%d: %s: invalid coordinates\n", \
+				zone_table, zone_NR, coordinates >>"/dev/stderr"
+			status = 1
+		}
+	}
+
+	for (tz in tz2cc) {
+		if (cc_used[tz2cc[tz]] == 1) {
+			if (tz2comments[tz]) {
+				printf "%s:%d: unnecessary comment `%s'\n", \
+					zone_table, tz2NR[tz], tz2comments[tz] \
+					>>"/dev/stderr"
+				status = 1
+			}
+		} else {
+			if (!tz2comments[tz]) {
+				printf "%s:%d: missing comment\n", \
+					zone_table, tz2NR[tz] >>"/dev/stderr"
+				status = 1
+			}
+		}
+	}
+
+	FS = " "
+}
+
+{
+	tz = ""
+	if ($1 == "Zone") tz = $2
+	if ($1 == "Link") {
+		# Ignore Link commands if source and destination basenames
+		# are identical, e.g. Europe/Istanbul versus Asia/Istanbul.
+		src = $2
+		dst = $3
+		while ((i = index(src, "/"))) src = substr(src, i+1)
+		while ((i = index(dst, "/"))) dst = substr(dst, i+1)
+		if (src != dst) tz = $3
+	}
+	if (tz && tz ~ /\//) {
+		if (!tz2cc[tz]) {
+			printf "%s: no data for `%s'\n", zone_table, tz \
+				>>"/dev/stderr"
+			status = 1
+		}
+		zoneSeen[tz] = 1
+	}
+}
+
+END {
+	for (tz in tz2cc) {
+		if (!zoneSeen[tz]) {
+			printf "%s:%d: no Zone table for `%s'\n", \
+				zone_table, tz2NR[tz], tz >>"/dev/stderr"
+			status = 1
+		}
+	}
+
+	if (0 < want_warnings) {
+		for (cc in cc2name) {
+			if (!cc_used[cc]) {
+				printf "%s:%d: warning: " \
+					"no Zone entries for %s (%s)\n", \
+					iso_table, cc2NR[cc], cc, cc2name[cc]
+			}
+		}
+	}
+
+	exit status
+}
Index: vendor/tzcode/tzcode2009h/unused/date.1.txt
===================================================================
--- vendor/tzcode/tzcode2009h/unused/date.1.txt	(nonexistent)
+++ vendor/tzcode/tzcode2009h/unused/date.1.txt	(revision 192888)
@@ -0,0 +1,127 @@
+NAME
+
+     date - show and set date and time
+
+SYNOPSIS
+     date [ -u ] [ -c ] [ -n ] [ -d dsttype ] [ -t minutes-west ]
+     [ -a [+|-]sss.fff ] [ +format ] [ [yyyy]mmddhhmm[yy][.ss] ]
+
+DESCRIPTION
+     Date without arguments writes the date and time to the
+     standard output in the form
+                     Wed Mar  8 14:54:40 EST 1989
+     with EST replaced by the local time zone's abbreviation (or
+     by the abbreviation for the time zone specified in the TZ
+     environment variable if set).  The exact output format
+     depends on the locale.
+
+     If a command-line argument starts with a plus sign (`+'),
+     the rest of the argument is used as a format that controls
+     what appears in the output.  In the format, when a percent
+     sign (`%') appears, it and the character after it are not
+     output, but rather identify part of the date or time to be
+     output in a particular way (or identify a special character
+     to output):
+
+           Sample output                 Explanation
+       %a  Wed                           Abbreviated weekday name*
+       %A  Wednesday                     Full weekday name*
+       %b  Mar                           Abbreviated month name*
+       %B  March                         Full month name*
+       %c  Wed Mar 08 14:54:40 1989      Date and time*
+       %C  19                            Century
+       %d  08                            Day of month (always two digits)
+       %D  03/08/89                      Month/day/year (eight characters)
+       %e   8                            Day of month (leading zero blanked)
+       %h  Mar                           Abbreviated month name*
+       %H  14                            24-hour-clock hour (two digits)
+       %I  02                            12-hour-clock hour (two digits)
+       %j  067                           Julian day number (three digits)
+       %k   2                            12-hour-clock hour (leading zero blanked)
+       %l  14                            24-hour-clock hour (leading zero blanked)
+       %m  03                            Month number (two digits)
+       %M  54                            Minute (two digits)
+       %n  \n                            newline character
+       %p  PM                            AM/PM designation
+       %r  02:54:40 PM                   Hour:minute:second AM/PM designation
+       %R  14:54                         Hour:minute
+       %S  40                            Second (two digits)
+       %t  \t                            tab character
+       %T  14:54:40                      Hour:minute:second
+       %U  10                            Sunday-based week number (two digits)
+       %w  3                             Day number (one digit, Sunday is 0)
+       %W  10                            Monday-based week number (two digits)
+       %x  03/08/89                      Date*
+       %X  14:54:40                      Time*
+       %y  89                            Last two digits of year
+       %Y  1989                          Year in full
+       %Z  EST                           Time zone abbreviation
+       %+  Wed Mar  8 14:54:40 EST 1989  Default output format*
+     * The exact output depends on the locale.
+
+     If a character other than one of those shown above appears
+     after a percent sign in the format, that following character
+     is output.  All other characters in the format are copied
+     unchanged to the output; a newline character is always added
+     at the end of the output.
+     In Sunday-based week numbering, the first Sunday of the year
+     begins week 1; days preceding it are part of ``week 0.''  In
+     Monday-based week numbering, the first Monday of the year
+     begins week 1.
+
+     To set the date, use a command line argument with one of the
+     following forms:
+       1454         24-hour-clock hours (first two digits) and minutes
+       081454       Month day (first two digits), hours, and minutes
+       03081454     Month (two digits, January is 01), month day, hours, minutes
+       8903081454   Year, month, month day, hours, minutes
+       0308145489   Month, month day, hours, minutes, year
+                    (on System V-compatible systems)
+       030814541989 Month, month day, hours, minutes, four-digit year
+       198903081454 Four-digit year, month, month day, hours, minutes
+     If the century, year, month, or month day is not given, the
+     current value is used.  Any of the above forms may be
+     followed by a period and two digits that give the seconds
+     part of the new time; if no seconds are given, zero is
+     assumed.
+
+     These options are available:
+
+     -u or -c
+          Use UTC when setting and showing the date and time.
+
+     -n   Do not notify other networked systems of the time
+          change.
+
+     -d dsttype
+          Set the kernel-stored Daylight Saving Time type to the
+          given value.  (The kernel-stored DST type is used
+          mostly by ``old'' binaries.)
+
+     -t minutes-west
+          Set the kernel-stored ``minutes west of UTC'' value to
+          the one given on the command line.  (The kernel-stored
+          DST type is used mostly by ``old'' binaries.)
+
+     -a adjustment
+          Change the time forward (or backward) by the number of
+          seconds (and fractions thereof) specified in the
+          adjustment argument.  Either the seconds part or the
+          fractions part of the argument (but not both) may be
+          omitted.  On BSD-based systems, the adjustment is made
+          by changing the rate at which time advances; on System-
+          V-based systems, the adjustment is made by changing the
+          time.
+
+FILES
+     /usr/lib/locale/L/LC_TIME           description of time
+     locale L
+     /usr/local/etc/zoneinfo             time zone information
+     directory
+     /usr/local/etc/zoneinfo/localtime   local time zone file
+     /usr/local/etc/zoneinfo/posixrules  used with POSIX-style
+     TZ's
+     /usr/local/etc/zoneinfo/GMT         for UTC leap seconds
+
+     If /usr/local/etc/zoneinfo/GMT is absent, UTC leap seconds
+     are loaded from /usr/local/etc/zoneinfo/posixrules.
Index: vendor/tzcode/tzcode2009h/unused/date.c
===================================================================
--- vendor/tzcode/tzcode2009h/unused/date.c	(nonexistent)
+++ vendor/tzcode/tzcode2009h/unused/date.c	(revision 192888)
@@ -0,0 +1,945 @@
+#ifndef lint
+#ifndef NOID
+static char	elsieid[] = "@(#)date.c	8.4";
+/*
+** Modified from the UCB version with the SCCS ID appearing below.
+*/
+#endif /* !defined NOID */
+#endif /* !defined lint */
+
+/*
+ * Copyright (c) 1985, 1987, 1988 The Regents of the University of California.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms are permitted
+ * provided that the above copyright notice and this paragraph are
+ * duplicated in all such forms and that any documentation,
+ * advertising materials, and other materials related to such
+ * distribution and use acknowledge that the software was developed
+ * by the University of California, Berkeley.  The name of the
+ * University may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANT[A]BILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ */
+
+#ifndef lint
+char copyright[] =
+"@(#) Copyright (c) 1985, 1987, 1988 The Regents of the University of California.\n\
+ All rights reserved.\n";
+#endif /* not lint */
+
+#ifndef lint
+static char sccsid[] = "@(#)date.c	4.23 (Berkeley) 9/20/88";
+#endif /* not lint */
+
+#include "private.h"
+#if HAVE_ADJTIME || HAVE_SETTIMEOFDAY
+#include "sys/time.h"	/* for struct timeval, struct timezone */
+#endif /* HAVE_ADJTIME || HAVE_SETTIMEOFDAY */
+#include "locale.h"
+#include "utmp.h"	/* for OLD_TIME (or its absence) */
+#if HAVE_UTMPX_H
+#include "utmpx.h"
+#endif
+
+#ifndef OTIME_MSG
+#define OTIME_MSG "old time"
+#endif
+#ifndef NTIME_MSG
+#define NTIME_MSG "new time"
+#endif
+
+/*
+** The two things date knows about time are. . .
+*/
+
+#ifndef TM_YEAR_BASE
+#define TM_YEAR_BASE	1900
+#endif /* !defined TM_YEAR_BASE */
+
+#ifndef SECSPERMIN
+#define SECSPERMIN	60
+#endif /* !defined SECSPERMIN */
+
+extern double		atof();
+extern char **		environ;
+extern char *		getlogin();
+extern time_t		mktime();
+extern char *		optarg;
+extern int		optind;
+extern char *		strchr();
+extern time_t		time();
+extern char *		tzname[2];
+
+static int		retval = EXIT_SUCCESS;
+
+static void		checkfinal(const char *, int, time_t, time_t);
+static int		comptm(const struct tm *, const struct tm *);
+static time_t		convert(const char *, int, time_t);
+static void		display(const char *);
+static void		dogmt(void);
+static void		errensure(void);
+static void		iffy(time_t, time_t, const char *, const char *);
+int			main(int, char**);
+static const char *	nondigit(const char *);
+static void		oops(const char *);
+static void		reset(time_t, int);
+static void		timeout(FILE *, const char *, const struct tm *);
+static void		usage(void);
+static void		wildinput(const char *, const char *,
+				const char *);
+
+int
+main(argc, argv)
+const int	argc;
+char *		argv[];
+{
+	register const char *	format;
+	register const char *	value;
+	register const char *	cp;
+	register int		ch;
+	register int		dousg;
+	register int		aflag = 0;
+	register int		dflag = 0;
+	register int		nflag = 0;
+	register int		tflag = 0;
+	register int		minuteswest;
+	register int		dsttime;
+	register double		adjust;
+	time_t			now;
+	time_t			t;
+
+	INITIALIZE(dousg);
+	INITIALIZE(minuteswest);
+	INITIALIZE(dsttime);
+	INITIALIZE(adjust);
+	INITIALIZE(t);
+#ifdef LC_ALL
+	(void) setlocale(LC_ALL, "");
+#endif /* defined(LC_ALL) */
+#if HAVE_GETTEXT
+#ifdef TZ_DOMAINDIR
+	(void) bindtextdomain(TZ_DOMAIN, TZ_DOMAINDIR);
+#endif /* defined(TEXTDOMAINDIR) */
+	(void) textdomain(TZ_DOMAIN);
+#endif /* HAVE_GETTEXT */
+	(void) time(&now);
+	format = value = NULL;
+	while ((ch = getopt(argc, argv, "ucnd:t:a:")) != EOF && ch != -1) {
+		switch (ch) {
+		default:
+			usage();
+		case 'u':		/* do it in UTC */
+		case 'c':
+			dogmt();
+			break;
+		case 'n':		/* don't set network */
+			nflag = 1;
+			break;
+		case 'd':		/* daylight saving time */
+			if (dflag) {
+				(void) fprintf(stderr,
+					_("date: error: multiple -d's used"));
+				usage();
+			}
+			dflag = 1;
+			cp = optarg;
+			dsttime = atoi(cp);
+			if (*cp == '\0' || *nondigit(cp) != '\0')
+				wildinput(_("-t value"), optarg,
+					_("must be a non-negative number"));
+			break;
+		case 't':		/* minutes west of UTC */
+			if (tflag) {
+				(void) fprintf(stderr,
+					_("date: error: multiple -t's used"));
+				usage();
+			}
+			tflag = 1;
+			cp = optarg;
+			minuteswest = atoi(cp);
+			if (*cp == '+' || *cp == '-')
+				++cp;
+			if (*cp == '\0' || *nondigit(cp) != '\0')
+				wildinput(_("-d value"), optarg,
+					_("must be a number"));
+			break;
+		case 'a':		/* adjustment */
+			if (aflag) {
+				(void) fprintf(stderr,
+					_("date: error: multiple -a's used"));
+				usage();
+			}
+			aflag = 1;
+			cp = optarg;
+			adjust = atof(cp);
+			if (*cp == '+' || *cp == '-')
+				++cp;
+			if (*cp == '\0' || strcmp(cp, ".") == 0)
+				wildinput(_("-a value"), optarg,
+					_("must be a number"));
+			cp = nondigit(cp);
+			if (*cp == '.')
+				++cp;
+			if (*nondigit(cp) != '\0')
+				wildinput(_("-a value"), optarg,
+					_("must be a number"));
+			break;
+		}
+	}
+	while (optind < argc) {
+		cp = argv[optind++];
+		if (*cp == '+')
+			if (format == NULL)
+				format = cp + 1;
+			else {
+				(void) fprintf(stderr,
+_("date: error: multiple formats in command line\n"));
+				usage();
+			}
+		else	if (value == NULL)
+				value = cp;
+			else {
+				(void) fprintf(stderr,
+_("date: error: multiple values in command line\n"));
+				usage();
+			}
+	}
+	if (value != NULL) {
+		/*
+		** This order ensures that "reasonable" twelve-digit inputs
+		** (such as 120203042006) won't be misinterpreted
+		** even if time_t's range all the way back to the thirteenth
+		** century.  Do not change the order.
+		*/
+		t = convert(value, (dousg = TRUE), now);
+		if (t == -1)
+			t = convert(value, (dousg = FALSE), now);
+		if (t == -1) {
+			/*
+			** Out of range values,
+			** or time that falls in a DST transition hole?
+			*/
+			if ((cp = strchr(value, '.')) != NULL) {
+				/*
+				** Ensure that the failure of
+				**	TZ=America/New_York date 8712312359.60
+				** doesn't get misdiagnosed.  (It was
+				**	TZ=America/New_York date 8712311859.60
+				** when the leap second was inserted.)
+				** The normal check won't work since
+				** the given time is valid in UTC.
+				*/
+				if (atoi(cp + 1) >= SECSPERMIN)
+					wildinput(_("time"), value,
+					    _("out of range seconds given"));
+			}
+			dogmt();
+			t = convert(value, FALSE, now);
+			if (t == -1)
+				t = convert(value, TRUE, now);
+			wildinput(_("time"), value,
+				(t == -1) ?
+				_("out of range value given") :
+				_("time skipped when clock springs forward"));
+		}
+	}
+	/*
+	** Entire command line has now been checked.
+	*/
+	if (aflag) {
+#if HAVE_ADJTIME
+		struct timeval	tv;
+
+		tv.tv_sec = (int) adjust;
+		tv.tv_usec = (int) ((adjust - tv.tv_sec) * 1000000L);
+		if (adjtime(&tv, (struct timeval *) NULL) != 0)
+			oops("adjtime");
+#endif /* HAVE_ADJTIME */
+#if !HAVE_ADJTIME
+		reset((time_t) (now + adjust), nflag);
+#endif /* !HAVE_ADJTIME */
+		/*
+		** Sun silently ignores everything else; we follow suit.
+		*/
+		exit(retval);
+	}
+	if (dflag || tflag) {
+#if HAVE_SETTIMEOFDAY == 2
+		struct timezone	tz;
+
+		if (!dflag || !tflag)
+			if (gettimeofday((struct timeval *) NULL, &tz) != 0)
+				oops("gettimeofday");
+		if (dflag)
+			tz.tz_dsttime = dsttime;
+		if (tflag)
+			tz.tz_minuteswest = minuteswest;
+		if (settimeofday((struct timeval *) NULL, &tz) != 0)
+			oops("settimeofday");
+#endif /* HAVE_SETTIMEOFDAY == 2 */
+#if HAVE_SETTIMEOFDAY != 2
+		(void) fprintf(stderr,
+_("date: warning: kernel doesn't keep -d/-t information, option ignored\n"));
+#endif /* HAVE_SETTIMEOFDAY != 2 */
+	}
+
+	if (value == NULL)
+		display(format);
+
+	reset(t, nflag);
+
+	checkfinal(value, dousg, t, now);
+
+#ifdef EBUG
+	{
+		struct tm	tm;
+
+		tm = *localtime(&t);
+		timeout(stdout, "%c\n", &tm);
+		exit(retval);
+	}
+#endif /* defined EBUG */
+
+	display(format);
+
+	/* gcc -Wall pacifier */
+	for ( ; ; )
+		continue;
+}
+
+static void
+dogmt(void)
+{
+	static char **	fakeenv;
+
+	if (fakeenv == NULL) {
+		register int	from;
+		register int	to;
+		register int	n;
+		static char	tzegmt0[] = "TZ=GMT0";
+
+		for (n = 0;  environ[n] != NULL;  ++n)
+			continue;
+		fakeenv = (char **) malloc((size_t) (n + 2) * sizeof *fakeenv);
+		if (fakeenv == NULL) {
+			(void) perror(_("Memory exhausted"));
+			errensure();
+			exit(retval);
+		}
+		to = 0;
+		fakeenv[to++] = tzegmt0;
+		for (from = 1; environ[from] != NULL; ++from)
+			if (strncmp(environ[from], "TZ=", 3) != 0)
+				fakeenv[to++] = environ[from];
+		fakeenv[to] = NULL;
+		environ = fakeenv;
+	}
+}
+
+#ifdef OLD_TIME
+
+/*
+** We assume we're on a System-V-based system,
+** should use stime,
+** should write System-V-format utmp entries,
+** and don't have network notification to worry about.
+*/
+
+#include "fcntl.h"	/* for O_WRONLY, O_APPEND */
+
+/*ARGSUSED*/
+static void
+reset(const time_t newt, const int nflag)
+{
+	register int		fid;
+	time_t			oldt;
+	static struct {
+		struct utmp	before;
+		struct utmp	after;
+	} s;
+#if HAVE_UTMPX_H
+	static struct {
+		struct utmpx	before;
+		struct utmpx	after;
+	} sx;
+#endif
+
+	/*
+	** Wouldn't it be great if stime returned the old time?
+	*/
+	(void) time(&oldt);
+	if (stime(&newt) != 0)
+		oops("stime");
+	s.before.ut_type = OLD_TIME;
+	s.before.ut_time = oldt;
+	(void) strcpy(s.before.ut_line, OTIME_MSG);
+	s.after.ut_type = NEW_TIME;
+	s.after.ut_time = newt;
+	(void) strcpy(s.after.ut_line, NTIME_MSG);
+	fid = open(WTMP_FILE, O_WRONLY | O_APPEND);
+	if (fid < 0)
+		oops(_("log file open"));
+	if (write(fid, (char *) &s, sizeof s) != sizeof s)
+		oops(_("log file write"));
+	if (close(fid) != 0)
+		oops(_("log file close"));
+#if !HAVE_UTMPX_H
+	pututline(&s.before);
+	pututline(&s.after);
+#endif /* !HAVE_UTMPX_H */
+#if HAVE_UTMPX_H
+	sx.before.ut_type = OLD_TIME;
+	sx.before.ut_tv.tv_sec = oldt;
+	(void) strcpy(sx.before.ut_line, OTIME_MSG);
+	sx.after.ut_type = NEW_TIME;
+	sx.after.ut_tv.tv_sec = newt;
+	(void) strcpy(sx.after.ut_line, NTIME_MSG);
+#if !SUPPRESS_WTMPX_FILE_UPDATE
+	/* In Solaris 2.5 (and presumably other systems),
+	   `date' does not update /var/adm/wtmpx.
+	   This must be a bug.  If you'd like to reproduce the bug,
+	   define SUPPRESS_WTMPX_FILE_UPDATE to be nonzero.  */
+	fid = open(WTMPX_FILE, O_WRONLY | O_APPEND);
+	if (fid < 0)
+		oops(_("log file open"));
+	if (write(fid, (char *) &sx, sizeof sx) != sizeof sx)
+		oops(_("log file write"));
+	if (close(fid) != 0)
+		oops(_("log file close"));
+#endif /* !SUPPRESS_WTMPX_FILE_UPDATE */
+	pututxline(&sx.before);
+	pututxline(&sx.after);
+#endif /* HAVE_UTMPX_H */
+}
+
+#endif /* defined OLD_TIME */
+#ifndef OLD_TIME
+
+/*
+** We assume we're on a BSD-based system,
+** should use settimeofday,
+** should write BSD-format utmp entries (using logwtmp),
+** and may get to worry about network notification.
+** The "time name" changes between 4.3-tahoe and 4.4;
+** we include sys/param.h to determine which we should use.
+*/
+
+#ifndef TIME_NAME
+#include "sys/param.h"
+#ifdef BSD4_4
+#define TIME_NAME	"date"
+#endif /* defined BSD4_4 */
+#ifndef BSD4_4
+#define TIME_NAME	""
+#endif /* !defined BSD4_4 */
+#endif /* !defined TIME_NAME */
+
+#include "syslog.h"
+#include "sys/socket.h"
+#include "netinet/in.h"
+#include "netdb.h"
+#define TSPTYPES
+#include "protocols/timed.h"
+
+extern int		logwtmp();
+
+#if HAVE_SETTIMEOFDAY == 1
+#define settimeofday(t, tz) (settimeofday)(t)
+#endif /* HAVE_SETTIMEOFDAY == 1 */
+
+#ifndef TSP_SETDATE
+/*ARGSUSED*/
+#endif /* !defined TSP_SETDATE */
+static void
+reset(newt, nflag)
+const time_t	newt;
+const int	nflag;
+{
+	register const char *	username;
+	static struct timeval	tv;	/* static so tv_usec is 0 */
+
+#ifdef EBUG
+	return;
+#endif /* defined EBUG */
+	username = getlogin();
+	if (username == NULL || *username == '\0') /* single-user or no tty */
+		username = "root";
+	tv.tv_sec = newt;
+#ifdef TSP_SETDATE
+	if (nflag || !netsettime(tv))
+#endif /* defined TSP_SETDATE */
+	{
+		/*
+		** "old" entry is always written, for compatibility.
+		*/
+		logwtmp("|", TIME_NAME, "");
+		if (settimeofday(&tv, (struct timezone *) NULL) == 0) {
+			logwtmp("{", TIME_NAME, "");	/* } */
+			syslog(LOG_AUTH | LOG_NOTICE, _("date set by %s"),
+				username);
+		} else	oops("settimeofday");
+	}
+}
+
+#endif /* !defined OLD_TIME */
+
+static void
+wildinput(item, value, reason)
+const char * const	item;
+const char * const	value;
+const char * const	reason;
+{
+	(void) fprintf(stderr,
+		_("date: error: bad command line %s \"%s\", %s\n"),
+		item, value, reason);
+	usage();
+}
+
+static void
+errensure(void)
+{
+	if (retval == EXIT_SUCCESS)
+		retval = EXIT_FAILURE;
+}
+
+static const char *
+nondigit(cp)
+register const char *	cp;
+{
+	while (is_digit(*cp))
+		++cp;
+	return cp;
+}
+
+static void
+usage(void)
+{
+	(void) fprintf(stderr, _("date: usage is date [-u] [-c] [-n] [-d dst] \
+[-t min-west] [-a sss.fff] [[yyyy]mmddhhmm[yyyy][.ss]] [+format]\n"));
+	errensure();
+	exit(retval);
+}
+
+static void
+oops(string)
+const char * const	string;
+{
+	int		e = errno;
+
+	(void) fprintf(stderr, _("date: error: "));
+	errno = e;
+	(void) perror(string);
+	errensure();
+	display((char *) NULL);
+}
+
+static void
+display(format)
+const char * const	format;
+{
+	struct tm	tm;
+	time_t		now;
+
+	(void) time(&now);
+	tm = *localtime(&now);
+	timeout(stdout, format ? format : "%+", &tm);
+	(void) putchar('\n');
+	(void) fflush(stdout);
+	(void) fflush(stderr);
+	if (ferror(stdout) || ferror(stderr)) {
+		(void) fprintf(stderr,
+			_("date: error: couldn't write results\n"));
+		errensure();
+	}
+	exit(retval);
+}
+
+extern size_t	strftime();
+
+#define INCR	1024
+
+static void
+timeout(fp, format, tmp)
+FILE * const		fp;
+const char * const	format;
+const struct tm * const	tmp;
+{
+	char *	cp;
+	size_t	result;
+	size_t	size;
+
+	if (*format == '\0')
+		return;
+	size = INCR;
+	cp = malloc((size_t) size);
+	for ( ; ; ) {
+		if (cp == NULL) {
+			(void) fprintf(stderr,
+				_("date: error: can't get memory\n"));
+			errensure();
+			exit(retval);
+		}
+		cp[0] = '\1';
+		result = strftime(cp, size, format, tmp);
+		if (result != 0 || cp[0] == '\0')
+			break;
+		size += INCR;
+		cp = realloc(cp, (size_t) size);
+	}
+	(void) fwrite(cp, 1, result, fp);
+	free(cp);
+}
+
+static int
+comptm(atmp, btmp)
+register const struct tm * const atmp;
+register const struct tm * const btmp;
+{
+	register int	result;
+
+	if ((result = (atmp->tm_year - btmp->tm_year)) == 0 &&
+		(result = (atmp->tm_mon - btmp->tm_mon)) == 0 &&
+		(result = (atmp->tm_mday - btmp->tm_mday)) == 0 &&
+		(result = (atmp->tm_hour - btmp->tm_hour)) == 0 &&
+		(result = (atmp->tm_min - btmp->tm_min)) == 0)
+			result = atmp->tm_sec - btmp->tm_sec;
+	return result;
+}
+
+/*
+** convert --
+**	convert user's input into a time_t.
+*/
+
+#define ATOI2(ar)	(ar[0] - '0') * 10 + (ar[1] - '0'); ar += 2;
+
+static time_t
+convert(register const char * const value, const int dousg, const time_t t)
+{
+	register const char *	cp;
+	register const char *	dotp;
+	register int	cent, year_in_cent, month, hour, day, mins, secs;
+	struct tm	tm, outtm;
+	time_t		outt;
+
+	tm = *localtime(&t);
+#define DIVISOR	100
+	year_in_cent = tm.tm_year % DIVISOR + TM_YEAR_BASE % DIVISOR;
+	cent = tm.tm_year / DIVISOR + TM_YEAR_BASE / DIVISOR +
+		year_in_cent / DIVISOR;
+	year_in_cent %= DIVISOR;
+	if (year_in_cent < 0) {
+		year_in_cent += DIVISOR;
+		--cent;
+	}
+	month = tm.tm_mon + 1;
+	day = tm.tm_mday;
+	hour = tm.tm_hour;
+	mins = tm.tm_min;
+	secs = 0;
+
+	dotp = strchr(value, '.');
+	for (cp = value; *cp != '\0'; ++cp)
+		if (!is_digit(*cp) && cp != dotp)
+			wildinput(_("time"), value, _("contains a nondigit"));
+
+	if (dotp == NULL)
+		dotp = strchr(value, '\0');
+	else {
+		cp = dotp + 1;
+		if (strlen(cp) != 2)
+			wildinput(_("time"), value,
+				_("seconds part is not two digits"));
+		secs = ATOI2(cp);
+	}
+
+	cp = value;
+	switch (dotp - cp) {
+		default:
+			wildinput(_("time"), value,
+				_("main part is wrong length"));
+		case 12:
+			if (!dousg) {
+				cent = ATOI2(cp);
+				year_in_cent = ATOI2(cp);
+			}
+			month = ATOI2(cp);
+			day = ATOI2(cp);
+			hour = ATOI2(cp);
+			mins = ATOI2(cp);
+			if (dousg) {
+				cent = ATOI2(cp);
+				year_in_cent = ATOI2(cp);
+			}
+			break;
+		case 8:	/* mmddhhmm */
+			month = ATOI2(cp);
+			/* fall through to. . . */
+		case 6:	/* ddhhmm */
+			day = ATOI2(cp);
+			/* fall through to. . . */
+		case 4:	/* hhmm */
+			hour = ATOI2(cp);
+			mins = ATOI2(cp);
+			break;
+		case 10:
+			if (!dousg) {
+				year_in_cent = ATOI2(cp);
+			}
+			month = ATOI2(cp);
+			day = ATOI2(cp);
+			hour = ATOI2(cp);
+			mins = ATOI2(cp);
+			if (dousg) {
+				year_in_cent = ATOI2(cp);
+			}
+			break;
+	}
+
+	tm.tm_year = cent * 100 + year_in_cent - TM_YEAR_BASE;
+	tm.tm_mon = month - 1;
+	tm.tm_mday = day;
+	tm.tm_hour = hour;
+	tm.tm_min = mins;
+	tm.tm_sec = secs;
+	tm.tm_isdst = -1;
+	outtm = tm;
+	outt = mktime(&outtm);
+	return (comptm(&tm, &outtm) == 0) ? outt : -1;
+}
+
+/*
+** Code from here on out is either based on code provided by UCB
+** or is only called just before the program exits.
+*/
+
+/*
+** Check for iffy input.
+*/
+
+static void
+checkfinal(const char * const	value,
+	   const int		didusg,
+	   const time_t		t,
+	   const time_t		oldnow)
+{
+	time_t		othert;
+	struct tm	tm;
+	struct tm	othertm;
+	register int	pass;
+	register long	offset;
+
+	/*
+	** See if there's both a USG and a BSD interpretation.
+	*/
+	othert = convert(value, !didusg, oldnow);
+	if (othert != -1 && othert != t)
+		iffy(t, othert, value, _("year could be at start or end"));
+	/*
+	** See if there's both a DST and a STD version.
+	*/
+	tm = *localtime(&t);
+	othertm = tm;
+	othertm.tm_isdst = !tm.tm_isdst;
+	othert = mktime(&othertm);
+	if (othert != -1 && othertm.tm_isdst != tm.tm_isdst &&
+		comptm(&tm, &othertm) == 0)
+			iffy(t, othert, value,
+			    _("both standard and summer time versions exist"));
+/*
+** Final check.
+**
+** If a jurisdiction shifts time *without* shifting whether time is
+** summer or standard (as Hawaii, the United Kingdom, and Saudi Arabia
+** have done), routine checks for iffy times may not work.
+** So we perform this final check, deferring it until after the time has
+** been set--it may take a while, and we don't want to introduce an unnecessary
+** lag between the time the user enters their command and the time that
+** stime/settimeofday is called.
+**
+** We just check nearby times to see if any have the same representation
+** as the time that convert returned.  We work our way out from the center
+** for quick response in solar time situations.  We only handle common cases--
+** offsets of at most a minute, and offsets of exact numbers of minutes
+** and at most an hour.
+*/
+	for (offset = 1; offset <= 60; ++offset)
+		for (pass = 1; pass <= 4; ++pass) {
+			if (pass == 1)
+				othert = t + offset;
+			else if (pass == 2)
+				othert = t - offset;
+			else if (pass == 3)
+				othert = t + 60 * offset;
+			else	othert = t - 60 * offset;
+			othertm = *localtime(&othert);
+			if (comptm(&tm, &othertm) == 0)
+				iffy(t, othert, value,
+					_("multiple matching times exist"));
+		}
+}
+
+static void
+iffy(const time_t thist, const time_t thatt,
+	const char * const value, const char * const reason)
+{
+	struct tm	tm;
+
+	(void) fprintf(stderr, _("date: warning: ambiguous time \"%s\", %s.\n"),
+		value, reason);
+	tm = *gmtime(&thist);
+	/*
+	** Avoid running afoul of SCCS!
+	*/
+	timeout(stderr, _("Time was set as if you used\n\tdate -u %m%d%H\
+%M\
+%Y.%S\n"), &tm);
+	tm = *localtime(&thist);
+	timeout(stderr, _("to get %c"), &tm);
+	(void) fprintf(stderr, _(" (%s).  Use\n"),
+		tm.tm_isdst ? _("summer time") : _("standard time"));
+	tm = *gmtime(&thatt);
+	timeout(stderr, _("\tdate -u %m%d%H\
+%M\
+%Y.%S\n"), &tm);
+	tm = *localtime(&thatt);
+	timeout(stderr, _("to get %c"), &tm);
+	(void) fprintf(stderr, _(" (%s).\n"),
+		tm.tm_isdst ? _("summer time") : _("standard time"));
+	errensure();
+	exit(retval);
+}
+
+#ifdef TSP_SETDATE
+#define WAITACK		2	/* seconds */
+#define WAITDATEACK	5	/* seconds */
+
+/*
+ * Set the date in the machines controlled by timedaemons
+ * by communicating the new date to the local timedaemon.
+ * If the timedaemon is in the master state, it performs the
+ * correction on all slaves.  If it is in the slave state, it
+ * notifies the master that a correction is needed.
+ * Returns 1 on success, 0 on failure.
+ */
+netsettime(ntv)
+	struct timeval ntv;
+{
+	int s, length, port, timed_ack, found, err;
+	long waittime;
+	fd_set ready;
+	char hostname[MAXHOSTNAMELEN];
+	struct timeval tout;
+	struct servent *sp;
+	struct tsp msg;
+	struct sockaddr_in sin, dest, from;
+
+	sp = getservbyname("timed", "udp");
+	if (sp == 0) {
+		fputs(_("udp/timed: unknown service\n"), stderr);
+		retval = 2;
+		return (0);
+	}
+	dest.sin_port = sp->s_port;
+	dest.sin_family = AF_INET;
+	dest.sin_addr.s_addr = htonl((u_long)INADDR_ANY);
+	s = socket(AF_INET, SOCK_DGRAM, 0);
+	if (s < 0) {
+		if (errno != EPROTONOSUPPORT)
+			perror("date: socket");
+		goto bad;
+	}
+	bzero((char *)&sin, sizeof (sin));
+	sin.sin_family = AF_INET;
+	for (port = IPPORT_RESERVED - 1; port > IPPORT_RESERVED / 2; port--) {
+		sin.sin_port = htons((u_short)port);
+		if (bind(s, (struct sockaddr *)&sin, sizeof (sin)) >= 0)
+			break;
+		if (errno != EADDRINUSE) {
+			if (errno != EADDRNOTAVAIL)
+				perror("date: bind");
+			goto bad;
+		}
+	}
+	if (port == IPPORT_RESERVED / 2) {
+		fputs(_("date: All ports in use\n"), stderr);
+		goto bad;
+	}
+	msg.tsp_type = TSP_SETDATE;
+	msg.tsp_vers = TSPVERSION;
+	if (gethostname(hostname, sizeof (hostname))) {
+		perror("gethostname");
+		goto bad;
+	}
+	(void) strncpy(msg.tsp_name, hostname, sizeof (hostname));
+	msg.tsp_seq = htons((u_short)0);
+	msg.tsp_time.tv_sec = htonl((u_long)ntv.tv_sec);
+	msg.tsp_time.tv_usec = htonl((u_long)ntv.tv_usec);
+	length = sizeof (struct sockaddr_in);
+	if (connect(s, &dest, length) < 0) {
+		perror("date: connect");
+		goto bad;
+	}
+	if (send(s, (char *)&msg, sizeof (struct tsp), 0) < 0) {
+		if (errno != ECONNREFUSED)
+			perror("date: send");
+		goto bad;
+	}
+	timed_ack = -1;
+	waittime = WAITACK;
+loop:
+	tout.tv_sec = waittime;
+	tout.tv_usec = 0;
+	FD_ZERO(&ready);
+	FD_SET(s, &ready);
+	found = select(FD_SETSIZE, &ready, (fd_set *)0, (fd_set *)0, &tout);
+	length = sizeof err;
+	if (getsockopt(s, SOL_SOCKET, SO_ERROR, (char *)&err, &length) == 0
+	    && err) {
+		errno = err;
+		if (errno != ECONNREFUSED)
+			perror(_("date: send (delayed error)"));
+		goto bad;
+	}
+	if (found > 0 && FD_ISSET(s, &ready)) {
+		length = sizeof (struct sockaddr_in);
+		if (recvfrom(s, (char *)&msg, sizeof (struct tsp), 0, &from,
+		    &length) < 0) {
+			if (errno != ECONNREFUSED)
+				perror("date: recvfrom");
+			goto bad;
+		}
+		msg.tsp_seq = ntohs(msg.tsp_seq);
+		msg.tsp_time.tv_sec = ntohl(msg.tsp_time.tv_sec);
+		msg.tsp_time.tv_usec = ntohl(msg.tsp_time.tv_usec);
+		switch (msg.tsp_type) {
+
+		case TSP_ACK:
+			timed_ack = TSP_ACK;
+			waittime = WAITDATEACK;
+			goto loop;
+
+		case TSP_DATEACK:
+			(void)close(s);
+			return (1);
+
+		default:
+			fprintf(stderr,
+				_("date: Wrong ack received from timed: %s\n"),
+				tsptype[msg.tsp_type]);
+			timed_ack = -1;
+			break;
+		}
+	}
+	if (timed_ack == -1)
+		fputs(_("date: Can't reach time daemon, time set locally.\n"),
+			stderr);
+bad:
+	(void)close(s);
+	retval = 2;
+	return (0);
+}
+#endif /* defined TSP_SETDATE */
Index: vendor/tzcode/tzcode2009h/unused/itca.jpg
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: vendor/tzcode/tzcode2009h/unused/itca.jpg
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: vendor/tzcode/tzcode2009h/unused/newctime.3.txt
===================================================================
--- vendor/tzcode/tzcode2009h/unused/newctime.3.txt	(nonexistent)
+++ vendor/tzcode/tzcode2009h/unused/newctime.3.txt	(revision 192888)
@@ -0,0 +1,149 @@
+NAME
+
+     asctime, ctime, difftime, gmtime, localtime, mktime -
+     convert date and time to ASCII
+
+SYNOPSIS
+     extern char *tzname[2];
+
+     void tzset()
+
+     #include 
+
+     char *ctime(clock)
+     const time_t *clock;
+
+     double difftime(time1, time0)
+     time_t time1;
+     time_t time0;
+
+     #include 
+
+     char *asctime(tm)
+     const struct tm *tm;
+
+     struct tm *localtime(clock)
+     const time_t *clock;
+
+     struct tm *gmtime(clock)
+     const time_t *clock;
+
+     time_t mktime(tm)
+     struct tm *tm;
+
+     cc ... -ltz
+
+DESCRIPTION
+     Ctime converts a long integer, pointed to by clock,
+     representing the time in seconds since 00:00:00 UTC,
+     1970-01-01, and returns a pointer to a string of the form
+                     Thu Nov 24 18:22:48 1986\n\0
+     Years requiring fewer than four characters are padded with
+     leading zeroes.  For years longer than four characters, the
+     string is of the form
+                  Thu Nov 24 18:22:48     81986\n\0
+     with five spaces before the year.  These unusual formats are
+     designed to make it less likely that older software that
+     expects exactly 26 bytes of output will mistakenly output
+     misleading values for out-of-range years.
+
+     Localtime and gmtime return pointers to ``tm'' structures,
+     described below.  Localtime corrects for the time zone and
+     any time zone adjustments (such as Daylight Saving Time in
+     the United States).  After filling in the ``tm'' structure,
+     localtime sets the tm_isdst'th element of tzname to a
+     pointer to an ASCII string that's the time zone abbreviation
+     to be used with localtime's return value.
+
+     Gmtime converts to Coordinated Universal Time.
+
+     Asctime converts a time value contained in a ``tm''
+     structure to a string, as shown in the above example, and
+     returns a pointer to the string.
+
+     Mktime converts the broken-down time, expressed as local
+     time, in the structure pointed to by tm into a calendar time
+     value with the same encoding as that of the values returned
+     by the time function.  The original values of the tm_wday
+     and tm_yday components of the structure are ignored, and the
+     original values of the other components are not restricted
+     to their normal ranges.  (A positive or zero value for
+     tm_isdst causes mktime to presume initially that summer time
+     (for example, Daylight Saving Time in the U.S.A.)
+     respectively, is or is not in effect for the specified time.
+     A negative value for tm_isdst causes the mktime function to
+     attempt to divine whether summer time is in effect for the
+     specified time; in this case it does not use a consistent
+     rule and may give a different answer when later presented
+     with the same argument.)  On successful completion, the
+     values of the tm_wday and tm_yday components of the
+     structure are set appropriately, and the other components
+     are set to represent the specified calendar time, but with
+     their values forced to their normal ranges; the final value
+     of tm_mday is not set until tm_mon and tm_year are
+     determined.  Mktime returns the specified calendar time; If
+     the calendar time cannot be represented, it returns -1.
+
+     Difftime returns the difference between two calendar times,
+     (time1 - time0), expressed in seconds.
+
+     Declarations of all the functions and externals, and the
+     ``tm'' structure, are in the  header file.  The
+     structure (of type) struct tm includes the following fields:
+
+               int tm_sec;      /* seconds (0 - 60) */
+               int tm_min;      /* minutes (0 - 59) */
+               int tm_hour;     /* hours (0 - 23) */
+               int tm_mday;     /* day of month (1 - 31) */
+               int tm_mon;      /* month of year (0 - 11) */
+               int tm_year;     /* year - 1900 */
+               int tm_wday;     /* day of week (Sunday = 0) */
+               int tm_yday;     /* day of year (0 - 365) */
+               int tm_isdst;    /* is summer time in effect? */
+               char *tm_zone;   /* abbreviation of timezone name */
+               long tm_gmtoff;  /* offset from UTC in seconds */
+
+     The tm_zone and tm_gmtoff fields exist, and are filled in,
+     only if arrangements to do so were made when the library
+     containing these functions was created.  There is no
+     guarantee that these fields will continue to exist in this
+     form in future releases of this code.
+
+     Tm_isdst is non-zero if summer time is in effect.
+
+     Tm_gmtoff is the offset (in seconds) of the time represented
+     from UTC, with positive values indicating east of the Prime
+     Meridian.
+
+FILES
+     /usr/local/etc/zoneinfo             time zone information
+     directory
+     /usr/local/etc/zoneinfo/localtime   local time zone file
+     /usr/local/etc/zoneinfo/posixrules  used with POSIX-style
+     TZ's
+     /usr/local/etc/zoneinfo/GMT         for UTC leap seconds
+
+     If /usr/local/etc/zoneinfo/GMT is absent, UTC leap seconds
+     are loaded from /usr/local/etc/zoneinfo/posixrules.
+
+SEE ALSO
+     getenv(3), newstrftime(3), newtzset(3), time(2), tzfile(5)
+
+NOTES
+     The return values point to static data; the data is
+     overwritten by each call.  The tm_zone field of a returned
+     struct tm points to a static array of characters, which will
+     also be overwritten at the next call (and by calls to
+     tzset).
+
+     Asctime and ctime behave strangely for years before 1000 or
+     after 9999.  The 1989 and 1999 editions of the C Standard
+     say that years from -99 through 999 are converted without
+     extra spaces, but this conflicts with longstanding tradition
+     and with this implementation.  Traditional implementations
+     of these two functions are restricted to years in the range
+     1900 through 2099.  To avoid this portability mess, new
+     programs should use strftime instead.
+
+     Avoid using out-of-range values with mktime when setting up
+     lunch with promptness sticklers in Riyadh.
Index: vendor/tzcode/tzcode2009h/unused/newstrftime.3.txt
===================================================================
--- vendor/tzcode/tzcode2009h/unused/newstrftime.3.txt	(nonexistent)
+++ vendor/tzcode/tzcode2009h/unused/newstrftime.3.txt	(revision 192888)
@@ -0,0 +1,149 @@
+NAME
+
+     strftime - format date and time
+
+SYNOPSIS
+     #include 
+     #include 
+
+     size_t strftime(buf, maxsize, format, timeptr)
+     char *buf;
+     size_t maxsize;
+     const char *format;
+     const struct tm *timeptr
+
+     cc ... -ltz
+
+DESCRIPTION
+     The strftime function formats the information from timeptr
+     into the buffer buf according to the string pointed to by
+     format.
+
+     The format string consists of zero or more conversion
+     specifications and ordinary characters.  All ordinary
+     characters are copied directly into the buffer.  A
+     conversion specification consists of a percent sign and one
+     other character.
+
+     No more than maxsize characters are be placed into the
+     array.  If the total number of resulting characters,
+     including the terminating null character, is not more than
+     maxsize, strftime returns the number of characters in the
+     array, not counting the terminating null.  Otherwise, zero
+     is returned.
+
+     Each conversion specification is replaced by the characters
+     as follows which are then copied into the buffer.
+
+     %A   is replaced by the locale's full weekday name.
+
+     %a   is replaced by the locale's abbreviated weekday name.
+
+     %B   is replaced by the locale's full month name.
+
+     %b or %h
+          is replaced by the locale's abbreviated month name.
+
+     %C   is replaced by the century (a year divided by 100 and
+          truncated to an integer) as a decimal number (00-99).
+
+     %c   is replaced by the locale's appropriate date and time
+          representation.
+
+     %D   is replaced by the date in the format %m/%d/%y.
+
+     %d   is replaced by the day of the month as a decimal number
+          (01-31).
+
+     %e   is replaced by the day of month as a decimal number
+          (1-31); single digits are preceded by a blank.
+     %F   is replaced by the date in the format %Y-%m-%d.
+
+     %G   is replaced by the ISO 8601 year with century as a
+          decimal number.
+
+     %g   is replaced by the ISO 8601 year without century as a
+          decimal number (00-99).
+     %H   is replaced by the hour (24-hour clock) as a decimal
+          number (00-23).
+
+     %I   is replaced by the hour (12-hour clock) as a decimal
+          number (01-12).
+
+     %j   is replaced by the day of the year as a decimal number
+          (001-366).
+
+     %k   is replaced by the hour (24-hour clock) as a decimal
+          number (0-23); single digits are preceded by a blank.
+
+     %l   is replaced by the hour (12-hour clock) as a decimal
+          number (1-12); single digits are preceded by a blank.
+
+     %M   is replaced by the minute as a decimal number (00-59).
+
+     %m   is replaced by the month as a decimal number (01-12).
+
+     %n   is replaced by a newline.
+
+     %p   is replaced by the locale's equivalent of either AM or
+          PM.
+
+     %R   is replaced by the time in the format %H:%M.
+
+     %r   is replaced by the locale's representation of 12-hour
+          clock time using AM/PM notation.
+
+     %S   is replaced by the second as a decimal number (00-60).
+
+     %s   is replaced by the number of seconds since the Epoch,
+          UTC (see mktime(3)).
+
+     %T   is replaced by the time in the format %H:%M:%S.
+
+     %t   is replaced by a tab.
+
+     %U   is replaced by the week number of the year (Sunday as
+          the first day of the week) as a decimal number (00-53).
+
+     %u   is replaced by the weekday (Monday as the first day of
+          the week) as a decimal number (1-7).
+
+     %V   is replaced by the week number of the year (Monday as
+          the first day of the week) as a decimal number (01-53).
+          If the week containing January 1 has four or more days
+          in the new year, then it is week 1; otherwise it is
+          week 53 of the previous year, and the next week is week
+          1.
+
+     %W   is replaced by the week number of the year (Monday as
+          the first day of the week) as a decimal number (00-53).
+
+     %w   is replaced by the weekday (Sunday as the first day of
+          the week) as a decimal number (0-6).
+
+     %X   is replaced by the locale's appropriate time
+          representation.
+     %x   is replaced by the locale's appropriate date
+          representation.
+
+     %Y   is replaced by the year with century as a decimal
+          number.
+
+     %y   is replaced by the year without century as a decimal
+          number (00-99).
+
+     %Z   is replaced by the time zone name, or by the empty
+          string if this is not determinable.
+
+     %z   is replaced by the offset from UTC in the format +HHMM
+          or -HHMM as appropriate, with positive values
+          representing locations east of Greenwich, or by the
+          empty string if this is not determinable.
+
+     %%   is replaced by a single %.
+
+     %+   is replaced by the date and time in date(1) format.
+
+SEE ALSO
+     date(1), getenv(3), newctime(3), newtzset(3), time(2),
+     tzfile(5)
Index: vendor/tzcode/tzcode2009h/unused/newtzset.3.txt
===================================================================
--- vendor/tzcode/tzcode2009h/unused/newtzset.3.txt	(nonexistent)
+++ vendor/tzcode/tzcode2009h/unused/newtzset.3.txt	(revision 192888)
@@ -0,0 +1,153 @@
+NAME
+
+     tzset - initialize time conversion information
+
+SYNOPSIS
+     void tzset()
+
+     cc ... -ltz
+
+DESCRIPTION
+     Tzset uses the value of the environment variable TZ to set
+     time conversion information used by localtime.  If TZ does
+     not appear in the environment, the best available
+     approximation to local wall clock time, as specified by the
+     tzfile(5)-format file localtime in the system time
+     conversion information directory, is used by localtime.  If
+     TZ appears in the environment but its value is a null
+     string, Coordinated Universal Time (UTC) is used (without
+     leap second correction).  If TZ appears in the environment
+     and its value is not a null string:
+
+          if the value begins with a colon, it is used as a
+          pathname of a file from which to read the time
+          conversion information;
+
+          if the value does not begin with a colon, it is first
+          used as the pathname of a file from which to read the
+          time conversion information, and, if that file cannot
+          be read, is used directly as a specification of the
+          time conversion information.
+
+     When TZ is used as a pathname, if it begins with a slash, it
+     is used as an absolute pathname; otherwise, it is used as a
+     pathname relative to a system time conversion information
+     directory.  The file must be in the format specified in
+     tzfile(5).
+
+     When TZ is used directly as a specification of the time
+     conversion information, it must have the following syntax
+     (spaces inserted for clarity):
+
+          stdoffset[dst[offset][,rule]]
+
+     Where:
+
+          std and dst    Three or more bytes that are the
+                         designation for the standard (std) or
+                         summer (dst) time zone.  Only std is
+                         required; if dst is missing, then summer
+                         time does not apply in this locale.
+                         Upper- and lowercase letters are
+                         explicitly allowed.  Any characters
+                         except a leading colon (:), digits,
+                         comma (,), minus (-), plus (+), and
+                         ASCII NUL are allowed.
+
+          offset         Indicates the value one must add to the
+                         local time to arrive at Coordinated
+                         Universal Time.  The offset has the
+                         form:
+
+                              hh[:mm[:ss]]
+
+                         The minutes (mm) and seconds (ss) are
+                         optional.  The hour (hh) is required and
+                         may be a single digit.  The offset
+                         following std is required.  If no offset
+                         follows dst, summer time is assumed to
+                         be one hour ahead of standard time.  One
+                         or more digits may be used; the value is
+                         always interpreted as a decimal number.
+                         The hour must be between zero and 24,
+                         and the minutes (and seconds) -- if
+                         present -- between zero and 59.  If
+                         preceded by a ``-'', the time zone shall
+                         be east of the Prime Meridian; otherwise
+                         it shall be west (which may be indicated
+                         by an optional preceding ``+'').
+
+          rule           Indicates when to change to and back
+                         from summer time.  The rule has the
+                         form:
+
+                              date/time,date/time
+
+                         where the first date describes when the
+                         change from standard to summer time
+                         occurs and the second date describes
+                         when the change back happens.  Each time
+                         field describes when, in current local
+                         time, the change to the other time is
+                         made.
+
+                         The format of date is one of the
+                         following:
+
+                         Jn        The Julian day n
+                                   (1 <= n <= 365).  Leap days
+                                   are not counted; that is, in
+                                   all years -- including leap
+                                   years -- February 28 is day 59
+                                   and March 1 is day 60.  It is
+                                   impossible to explicitly refer
+                                   to the occasional February 29.
+
+                         n         The zero-based Julian day
+                                   (0 <= n <= 365).  Leap days
+                                   are counted, and it is
+                                   possible to refer to February
+                                   29.
+
+                         Mm.n.d    The d'th day (0 <= d <= 6) of
+                                   week n of month m of the year
+                                   (1 <= n <= 5, 1 <= m <= 12,
+                                   where week 5 means ``the last
+                                   d day in month m'' which may
+                                   occur in either the fourth or
+                                   the fifth week).  Week 1 is
+                                   the first week in which the
+                                   d'th day occurs.  Day zero is
+                                   Sunday.
+
+                         The time has the same format as offset
+                         except that no leading sign (``-'' or
+                         ``+'') is allowed.  The default, if time
+                         is not given, is 02:00:00.
+
+     If no rule is present in TZ, the rules specified by the
+     tzfile(5)-format file posixrules in the system time
+     conversion information directory are used, with the standard
+     and summer time offsets from UTC replaced by those specified
+     by the offset values in TZ.
+     For compatibility with System V Release 3.1, a semicolon (;)
+     may be used to separate the rule from the rest of the
+     specification.
+
+     If the TZ environment variable does not specify a
+     tzfile(5)-format and cannot be interpreted as a direct
+     specification, UTC is used.
+
+FILES
+     /usr/local/etc/zoneinfo             time zone information
+     directory
+     /usr/local/etc/zoneinfo/localtime   local time zone file
+     /usr/local/etc/zoneinfo/posixrules  used with POSIX-style
+     TZ's
+     /usr/local/etc/zoneinfo/GMT         for UTC leap seconds
+
+     If /usr/local/etc/zoneinfo/GMT is absent, UTC leap seconds
+     are loaded from /usr/local/etc/zoneinfo/posixrules.
+
+SEE ALSO
+     getenv(3), newctime(3), newstrftime(3), time(2), tzfile(5)
Index: vendor/tzcode/tzcode2009h/unused/time2posix.3.txt
===================================================================
--- vendor/tzcode/tzcode2009h/unused/time2posix.3.txt	(nonexistent)
+++ vendor/tzcode/tzcode2009h/unused/time2posix.3.txt	(revision 192888)
@@ -0,0 +1,83 @@
+NAME
+
+     time2posix, posix2time - convert seconds since the Epoch
+
+SYNOPSIS
+     #include 
+     #include 
+
+     time_t time2posix(t)
+     time_t t
+
+     time_t posix2time(t)
+     time_t t
+
+     cc ... -ltz
+
+DESCRIPTION
+     IEEE Standard 1003.1 (POSIX) legislates that a time_t value
+     of 536457599 shall correspond to "Wed Dec 31 23:59:59 UTC
+     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.
+
+     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.
+
+     Typically this is not a problem as the type time_t is
+     intended to be (mostly) opaque--time_t values should only be
+     obtained-from and passed-to functions such as time(2),
+     localtime(3), mktime(3), and 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.
+
+     The time2posix and 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.
+
+     Time2posix is single-valued.  That is, every local time_t
+     corresponds to a single POSIX time_t.  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.
+
+     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.
+     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
+
+                     [Note: posix2time(B+1) => A+0 or A+1]
+
+     If leap-second support is not enabled, local time_t's and
+     POSIX time_t's are equivalent, and both time2posix and
+     posix2time degenerate to the identity function.
+
+SEE ALSO
+     difftime(3), localtime(3), mktime(3), time(2)
Index: vendor/tzcode/tzcode2009h/unused/tzfile.5.txt
===================================================================
--- vendor/tzcode/tzcode2009h/unused/tzfile.5.txt	(nonexistent)
+++ vendor/tzcode/tzcode2009h/unused/tzfile.5.txt	(revision 192888)
@@ -0,0 +1,106 @@
+NAME
+
+     tzfile - time zone information
+
+SYNOPSIS
+     #include 
+
+DESCRIPTION
+     The time zone information files used by tzset(3) begin with
+     the magic characters "TZif" to identify then as time zone
+     information files, followed by a character identifying the
+     version of the file's format (as of 2005, either an ASCII
+     NUL or a '2') followed by fifteen bytes containing zeroes
+     reserved for future use, followed by six four-byte values of
+     type long, written in a ``standard'' byte order (the high-
+     order byte of the value is written first).  These values
+     are, in order:
+
+     tzh_ttisgmtcnt
+          The number of UTC/local indicators stored in the file.
+
+     tzh_ttisstdcnt
+          The number of standard/wall indicators stored in the
+          file.
+
+     tzh_leapcnt
+          The number of leap seconds for which data is stored in
+          the file.
+
+     tzh_timecnt
+          The number of "transition times" for which data is
+          stored in the file.
+
+     tzh_typecnt
+          The number of "local time types" for which data is
+          stored in the file (must not be zero).
+
+     tzh_charcnt
+          The number of characters of "time zone abbreviation
+          strings" stored in the file.
+
+     The above header is followed by tzh_timecnt four-byte values
+     of type long, sorted in ascending order.  These values are
+     written in ``standard'' byte order.  Each is used as a
+     transition time (as returned by time(2)) at which the rules
+     for computing local time change.  Next come tzh_timecnt one-
+     byte values of type 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 ttinfo
+     structures (with tzh_typecnt entries) that appears next in
+     the file; these structures are defined as follows:
+
+          struct ttinfo {
+               long          tt_gmtoff;
+               int           tt_isdst;
+               unsigned int  tt_abbrind;
+          };
+
+     Each structure is written as a four-byte value for tt_gmtoff
+     of type long, in a standard byte order, followed by a one-
+     byte value for tt_isdst and a one-byte value for tt_abbrind.
+     In each structure, tt_gmtoff gives the number of seconds to
+     be added to UTC, tt_isdst tells whether tm_isdst should be
+     set by localtime (3) and tt_abbrind serves as an index into
+     the array of time zone abbreviation characters that follow
+     the ttinfo structure(s) in the file.
+
+     Then there are tzh_leapcnt pairs of four-byte values,
+     written in standard byte order; the first value of each pair
+     gives the time (as returned by time(2)) at which a leap
+     second occurs; the second gives the total number of leap
+     seconds to be applied after the given time.  The pairs of
+     values are sorted in ascending order by time.
+
+     Then there are 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.
+
+     Finally there are tzh_ttisgmtcnt UTC/local indicators, each
+     stored as a one-byte value; they tell whether the transition
+     times associated with local time types were specified as UTC
+     or local time, and are used when a time zone file is used in
+     handling POSIX-style time zone environment variables.
+
+     Localtime uses the first standard-time ttinfo structure in
+     the file (or simply the first ttinfo structure in the
+     absence of a standard-time structure) if either tzh_timecnt
+     is zero or the time argument is less than the first
+     transition time recorded in the file.
+
+     For version-2-format time zone files, the above header and
+     data is followed by a second header and data, identical in
+     format except that eight bytes are used for each transition
+     time or leap second time.  After the second header and data
+     comes a newline-enclosed, POSIX-TZ-environment-variable-
+     style string for use in handling instants after the last
+     transition time stored in the file (with nothing between the
+     newlines if there is no POSIX representation for such
+     instants).
+
+SEE ALSO
+     newctime(3)
Index: vendor/tzcode/tzcode2009h/unused/tzselect.8.txt
===================================================================
--- vendor/tzcode/tzcode2009h/unused/tzselect.8.txt	(nonexistent)
+++ vendor/tzcode/tzcode2009h/unused/tzselect.8.txt	(revision 192888)
@@ -0,0 +1,41 @@
+NAME
+
+     tzselect - select a time zone
+
+SYNOPSIS
+     tzselect
+
+DESCRIPTION
+     The tzselect program asks the user for information about the
+     current location, and outputs the resulting time zone
+     description to standard output.  The output is suitable as a
+     value for the TZ environment variable.
+
+     All interaction with the user is done via standard input and
+     standard error.
+
+ENVIRONMENT VARIABLES
+     AWK  Name of a Posix-compliant awk program (default: awk).
+
+     TZDIR
+          Name of the directory containing time zone data files
+          (default: /usr/local/etc/zoneinfo).
+
+FILES
+     TZDIR/iso3166.tab
+          Table of ISO 3166 2-letter country codes and country
+          names.
+
+     TZDIR/zone.tab
+          Table of country codes, latitude and longitude, TZ
+          values, and descriptive comments.
+
+     TZDIR/TZ
+          Time zone data file for time zone TZ.
+
+EXIT STATUS
+     The exit status is zero if a time zone was successfully
+     obtained from the user, nonzero otherwise.
+
+SEE ALSO
+     newctime(3), tzfile(5), zdump(8), zic(8)
Index: vendor/tzcode/tzcode2009h/unused/tzselect.ksh
===================================================================
--- vendor/tzcode/tzcode2009h/unused/tzselect.ksh	(nonexistent)
+++ vendor/tzcode/tzcode2009h/unused/tzselect.ksh	(revision 192888)
@@ -0,0 +1,323 @@
+#! /bin/ksh
+
+VERSION='@(#)tzselect.ksh	8.2'
+
+# Ask the user about the time zone, and output the resulting TZ value to stdout.
+# Interact with the user via stderr and stdin.
+
+# Contributed by Paul Eggert.
+
+# Porting notes:
+#
+# This script requires several features of the Korn shell.
+# If your host lacks the Korn shell,
+# you can use either of the following free programs instead:
+#
+#	
+#	Bourne-Again shell (bash)
+#	
+#
+#	
+#	Public domain ksh
+#	
+#
+# This script also uses several features of modern awk programs.
+# If your host lacks awk, or has an old awk that does not conform to Posix.2,
+# you can use either of the following free programs instead:
+#
+#	
+#	GNU awk (gawk)
+#	
+#
+#	
+#	mawk
+#	
+
+
+# Specify default values for environment variables if they are unset.
+: ${AWK=awk}
+: ${TZDIR=$(pwd)}
+
+# Check for awk Posix compliance.
+($AWK -v x=y 'BEGIN { exit 123 }') /dev/null 2>&1
+[ $? = 123 ] || {
+	echo >&2 "$0: Sorry, your \`$AWK' program is not Posix compatible."
+	exit 1
+}
+
+if [ "$1" = "--help" ]; then
+    cat <&2 "$0: time zone files are not set up correctly"
+		exit 1
+	}
+done
+
+newline='
+'
+IFS=$newline
+
+
+# Work around a bug in bash 1.14.7 and earlier, where $PS3 is sent to stdout.
+case $(echo 1 | (select x in x; do break; done) 2>/dev/null) in
+?*) PS3=
+esac
+
+
+# Begin the main loop.  We come back here if the user wants to retry.
+while
+
+	echo >&2 'Please identify a location' \
+		'so that time zone rules can be set correctly.'
+
+	continent=
+	country=
+	region=
+
+
+	# Ask the user for continent or ocean.
+
+	echo >&2 'Please select a continent or ocean.'
+
+	select continent in \
+	    Africa \
+	    Americas \
+	    Antarctica \
+	    'Arctic Ocean' \
+	    Asia \
+	    'Atlantic Ocean' \
+	    Australia \
+	    Europe \
+	    'Indian Ocean' \
+	    'Pacific Ocean' \
+	    'none - I want to specify the time zone using the Posix TZ format.'
+	do
+	    case $continent in
+	    '')
+		echo >&2 'Please enter a number in range.';;
+	    ?*)
+		case $continent in
+		Americas) continent=America;;
+		*' '*) continent=$(expr "$continent" : '\([^ ]*\)')
+		esac
+		break
+	    esac
+	done
+	case $continent in
+	'')
+		exit 1;;
+	none)
+		# Ask the user for a Posix TZ string.  Check that it conforms.
+		while
+			echo >&2 'Please enter the desired value' \
+				'of the TZ environment variable.'
+			echo >&2 'For example, GST-10 is a zone named GST' \
+				'that is 10 hours ahead (east) of UTC.'
+			read TZ
+			$AWK -v TZ="$TZ" 'BEGIN {
+				tzname = "[^-+,0-9][^-+,0-9][^-+,0-9]+"
+				time = "[0-2]?[0-9](:[0-5][0-9](:[0-5][0-9])?)?"
+				offset = "[-+]?" time
+				date = "(J?[0-9]+|M[0-9]+\.[0-9]+\.[0-9]+)"
+				datetime = "," date "(/" time ")?"
+				tzpattern = "^(:.*|" tzname offset "(" tzname \
+				  "(" offset ")?(" datetime datetime ")?)?)$"
+				if (TZ ~ tzpattern) exit 1
+				exit 0
+			}'
+		do
+			echo >&2 "\`$TZ' is not a conforming" \
+				'Posix time zone string.'
+		done
+		TZ_for_date=$TZ;;
+	*)
+		# Get list of names of countries in the continent or ocean.
+		countries=$($AWK -F'\t' \
+			-v continent="$continent" \
+			-v TZ_COUNTRY_TABLE="$TZ_COUNTRY_TABLE" \
+		'
+			/^#/ { next }
+			$3 ~ ("^" continent "/") {
+				if (!cc_seen[$1]++) cc_list[++ccs] = $1
+			}
+			END {
+				while (getline &2 'Please select a country.'
+			select country in $countries
+			do
+			    case $country in
+			    '') echo >&2 'Please enter a number in range.';;
+			    ?*) break
+			    esac
+			done
+
+			case $country in
+			'') exit 1
+			esac;;
+		*)
+			country=$countries
+		esac
+
+
+		# Get list of names of time zone rule regions in the country.
+		regions=$($AWK -F'\t' \
+			-v country="$country" \
+			-v TZ_COUNTRY_TABLE="$TZ_COUNTRY_TABLE" \
+		'
+			BEGIN {
+				cc = country
+				while (getline &2 'Please select one of the following' \
+				'time zone regions.'
+			select region in $regions
+			do
+				case $region in
+				'') echo >&2 'Please enter a number in range.';;
+				?*) break
+				esac
+			done
+			case $region in
+			'') exit 1
+			esac;;
+		*)
+			region=$regions
+		esac
+
+		# Determine TZ from country and region.
+		TZ=$($AWK -F'\t' \
+			-v country="$country" \
+			-v region="$region" \
+			-v TZ_COUNTRY_TABLE="$TZ_COUNTRY_TABLE" \
+		'
+			BEGIN {
+				cc = country
+				while (getline &2 "$0: time zone files are not set up correctly"
+			exit 1
+		}
+	esac
+
+
+	# Use the proposed TZ to output the current date relative to UTC.
+	# Loop until they agree in seconds.
+	# Give up after 8 unsuccessful tries.
+
+	extra_info=
+	for i in 1 2 3 4 5 6 7 8
+	do
+		TZdate=$(LANG=C TZ="$TZ_for_date" date)
+		UTdate=$(LANG=C TZ=UTC0 date)
+		TZsec=$(expr "$TZdate" : '.*:\([0-5][0-9]\)')
+		UTsec=$(expr "$UTdate" : '.*:\([0-5][0-9]\)')
+		case $TZsec in
+		$UTsec)
+			extra_info="
+Local time is now:	$TZdate.
+Universal Time is now:	$UTdate."
+			break
+		esac
+	done
+
+
+	# Output TZ info and ask the user to confirm.
+
+	echo >&2 ""
+	echo >&2 "The following information has been given:"
+	echo >&2 ""
+	case $country+$region in
+	?*+?*)	echo >&2 "	$country$newline	$region";;
+	?*+)	echo >&2 "	$country";;
+	+)	echo >&2 "	TZ='$TZ'"
+	esac
+	echo >&2 ""
+	echo >&2 "Therefore TZ='$TZ' will be used.$extra_info"
+	echo >&2 "Is the above information OK?"
+
+	ok=
+	select ok in Yes No
+	do
+	    case $ok in
+	    '') echo >&2 'Please enter 1 for Yes, or 2 for No.';;
+	    ?*) break
+	    esac
+	done
+	case $ok in
+	'') exit 1;;
+	Yes) break
+	esac
+do :
+done
+
+case $SHELL in
+*csh) file=.login line="setenv TZ '$TZ'";;
+*) file=.profile line="TZ='$TZ'; export TZ"
+esac
+
+echo >&2 "
+You can make this change permanent for yourself by appending the line
+	$line
+to the file '$file' in your home directory; then log out and log in again.
+
+Here is that TZ value again, this time on standard output so that you
+can use the $0 command in shell scripts:"
+
+echo "$TZ"
Index: vendor/tzcode/tzcode2009h/unused/usno1988
===================================================================
--- vendor/tzcode/tzcode2009h/unused/usno1988	(nonexistent)
+++ vendor/tzcode/tzcode2009h/unused/usno1988	(revision 192888)
@@ -0,0 +1,111 @@
+# @(#)usno1988	8.1
+#
+# From Arthur David Olson (1989-01-19):
+#
+# Here's some United States Naval Observatory time zone data from
+# February 1988.  It's here mostly to convince you that the USNO has indeed
+# been updating its files (see its 1989 data elsewhere).
+#
+ANDORRA             1 H AHEAD OF UTC
+ARGENTINA           3 H BEHIND   UTC
+BRASIL   WEST       5 H BEHIND UTC        (CRUZEIRO DO SUL)
+BRASIL   CENTRAL    4 H BEHIND UTC              (MANAUS)
+BRASIL   EAST       3 H BEHIND UTC   COASTAL STATES, RIO, SP, BRASILIA
+BRASIL              2 H BEHIND UTC   ATLANTIC ISLANDS
+BRAZIL              5 H BEHIND UTC   WEST (CRUZEIRO DO SUL)
+BRAZIL              4 H BEHIND UTC   CENTRAL    (MANAUS)
+BRAZIL              3 H BEHIND UTC   COASTAL STATES, RIO, SP, BRASILIA
+BRAZIL              3 H BEHIND UTC   FOR MOST MAJOR AIRPORTS.
+BRAZIL              2 H BEHIND UTC   ATLANTIC ISLANDS
+BULGARIA            2 H AHEAD OF UTC WINTER
+BULGARIA            3 H AHEAD OF UTC SUMMER MAR31 - SEP 85, 0100 LOCAL
+CHINA               8 H AHEAD OF UTC; ALL OF CHINA, INCL TAIWAN
+CUBA                5 H BEHIND UTC IN WINTER
+CUBA                4 H BEHIND UTC MAY 8 - OCT 8
+CYPRUS              2 H AHEAD UTC IN WINTER
+CYPRUS              3 H AHEAD UTC MAR 25 - SEP 30
+DENMARK             1 H AHEAD UTC IN WINTER
+DENMARK             2 H AHEAD UTC MAR 31 - SEP 30  , 0200 LOCAL
+DENMK. FAEROE IS    1 H AHEAD UTC MAR 31 - SEP 30  , 0200 LOCAL
+EGYPT               2 H AHEAD UTC
+EGYPT               3 H AHEAD UTC SUMMER (AFTER RAMADAN)
+ENGLAND             ON UTC IN WINTER; WALES, SCOTLAND, N.I., CH.IS.
+ENGLAND             1 H AHEAD OF UTC; SUMMER TIL 28 OCT 0200 LOCAL
+FINLAND             2 H AHEAD OF UTC IN WINTER
+FINLAND             3 H AHEAD OF UTC MAR 25 - SEP 30
+FRANCE              1 H AHEAD OF UTC IN WINTER
+FRANCE              2 H AHEAD OF UTC MAR 31 - SEP 30 , 0100 LOCAL
+GREECE              2 H AHEAD OF UTC IN WINTER
+GREECE              3 H AHEAD OF UTC IN SUMMER EFF. 31MAR85 02/03 LOCAL
+GREECE              3 H AHEAD OF UTC MAR 25 - SEP 30
+GREENLAND           4 H BEHIND UTC  IN THULE AIRBASE YEAR ROUND
+GREENLAND           3 H BEHIND UTC  IN WINTER AT SONDRESTROM
+GREENLAND           2 H BEHIND UTC  30 MAR - 30 SEP 2200 LOCAL AT -"-
+GREENLAND           2 H BEHIND UTC  AROUND SCORESBY SUND
+ICELAND             ON UTC
+IRAN                3.5H AHEAD OF UTC
+IRELAND             ON UTC IN WINTER
+IRELAND             1 H AHEAD OF UTC MAR 31 - OCT 23  0200 LOCAL
+ITALY               1 H AHEAD OF UTC IN WINTER
+ITALY               2 H AHEAD OF UTC MAR 31 - SEP 30, 0030 LOCAL
+JAMAICA             5 H BEHIND UTC IN WINTER
+JAMAICA             4 H BEHIND UTC APR 29 - OCT 29
+LIBYA               2 H AHEAD OF UTC
+MEXICO BAJA CAL N   8 H BEHIND UTC IN WINTER; NORTH BAJA CAL, TIJUANA
+MEXICO BAJA CAL N   7 H BEHIND UTC APR 29 - OCT 29
+MEXICO BAJA CAL S   7 H BEHIND UTC ALL YEAR; MAZATLAN
+MEXICO CENTRAL      6 H BEHIND UTC ALL YEAR; MEXICO CITY
+MONACO              1 H AHEAD UTC IN WINTER
+MONACO              2 H AHEAD UTC MAR 25 - SEP30
+PARAGUAY            4 H BEHIND UTC IN WINTER
+PARAGUAY            3 H BEHIND UTC SEP 30 - MAR 30
+POLAND              1 H AHEAD OF UTC IN WINTER
+POLAND              2 H AHEAD OF UTC MAR 24 - SEP     0200 LOCAL
+PORTUGAL            ON UTC IN WINTER
+PORTUGAL            1 H AHEAD OF UTC IN SUMMER MAR 31 - SEP 29   0100 LOCAL
+PORTUGAL AZORES     1 H BEHIND UTC IN WINTER
+PORTUGAL AZORES     ON UTC IN SUMMER MAR 31 - SEP 29
+PORTUGAL MADEIRA    ON UTC ALL YEAR;
+ROMANIA             2 H AHEAD OF UTC IN WINTER
+ROMANIA             3 H AHEAD OF UTC APR 3 - SEP 24
+SCOTLAND            SEE ENGLAND
+SWITZERLAND         1 H AHEAD OF UTC IN WINTER
+SWITZERLAND         2 H AHEAD OF UTC MAR 31 - SEP 30  0200 LOCAL
+TURKEY              3 H AHEAD OF UTC
+USA   EASTERN       5 H BEHIND UTC IN WINTER; NEW YORK, WASHINGTON
+USA   EASTERN       4 H BEHIND UTC APR 29 - OCT 29
+USA   CENTRAL       6 H BEHIND UTC IN WINTER; CHICAGO, HOUSTON
+USA   CENTRAL       5 H BEHIND UTC APR 29 - OCT 29
+USA   MOUNTAIN      7 H BEHIND UTC IN WINTER; DENVER
+USA   MOUNTAIN      6 H BEHIND UTC APR 29 - OCT 29
+USA   PACIFIC       8 H BEHIND UTC IN WINTER; L.A., SAN FRANCISCO
+USA   PACIFIC       7 H BEHIND UTC APR 29 - OCT 29
+USA   ALASKA STD    9 H BEHIND UTC IN WINTER; MOST OF ALASKA     (AKST)
+USA   ALASKA STD    8 H BEHIND UTC APR 29 - OCT 29               (AKDT)
+USA   ALEUTIAN     10 H BEHIND UTC IN WINTER; ISLANDS WEST OF 170W
+USA   - " -         9 H BEHIND UTC APR 29 - OCT 29
+USA   HAWAII       10 H BEHIND UTC ALL YEAR;
+USA   BERING       11 H BEHIND UTC ALL YEAR; SAMOA, MIDWAY
+USSR WEST EUROP     3 H AHEAD OF UTC IN WINTER; LENINGRAD, MOSCOW
+USSR WEST EUROP     4 H AHEAD OF UTC APR 1 - SEP 30
+USSR CENTRAL EUR    4 H AHEAD OF UTC IN WINTER; ROSTOV, BAKU
+USSR CENTRAL EUR    5 H AHEAD OF UTC APR 1 - SEP 30
+USSR EAST EUROP     5 H AHEAD OF UTC IN WINTER; SVERDLOVSK
+USSR EAST EUROP     6 H AHEAD OF UTC APR 1 - SEP 30
+USSR WEST SIBERIAN  6 H AHEAD OF UTC IN WINTER; TASHKENT, ALMA ATA
+USSR WEST SIBERIAN  7 H AHEAD OF UTC APR 1 - SEP 30
+USSR WEST-CENTRAL   7 H AHEAD OF UTC IN WINTER; NOVOSIBIRSK
+USSR WEST-CENTRAL   8 H AHEAD OF UTC APR 1 - SEP 30
+USSR WEST-CENTRAL   8 H AHEAD OF UTC IN WINTER; IRKUTSK
+USSR WEST-CENTRAL   9 H AHEAD OF UTC APR 1 - SEP 30
+USSR CENTRAL SIB    9 H AHEAD OF UTC IN WINTER; YAKUTSK
+USSR CENTRAL SIB   10 H AHEAD OF UTC APR 1 - SEP 30
+USSR CENTRAL SIB   10 H AHEAD OF UTC IN WINTER; VLADIVOSTOK
+USSR CENTRAL SIB   11 H AHEAD OF UTC APR 1 - SEP 30
+USSR EAST SIBERIA  11 H AHEAD OF UTC IN WINTER; MAGADAN
+USSR EAST SIBERIA  12 H AHEAD OF UTC APR 1 - SEP 30
+USSR EAST SIBERIA  12 H AHEAD OF UTC IN WINTER; PETROPAVLOVSK
+USSR EAST SIBERIA  13 H AHEAD OF UTC APR 1 - SEP 30
+USSR EAST SIBERIA  13 H AHEAD OF UTC IN WINTER; UELEN
+USSR EAST SIBERIA  14 H AHEAD OF UTC APR 1 - SEP 30
+WALES               SEE ENGLAND
Index: vendor/tzcode/tzcode2009h/unused/usno1989
===================================================================
--- vendor/tzcode/tzcode2009h/unused/usno1989	(nonexistent)
+++ vendor/tzcode/tzcode2009h/unused/usno1989	(revision 192888)
@@ -0,0 +1,452 @@
+# @(#)usno1989	8.1
+#
+# From Arthur David Olson (1989-01-19):
+#
+# Here's time zone information from the United States Naval Observatory;
+# no corrections have been made, and there are some obvious challenges.
+# The USNO warns:
+#	DUE TO FREQUENT CHANGES IN THE LOCAL LAWS GOVERNING DAYLIGHT
+#	SAVING TIME, WE CANNOT GUARANTEE THE ACCURACY OF THIS
+#	INFORMATION.  PLEASE ALERT US TO ANY DISCREPANCY YOU MAY
+#	DISCOVER.
+#
+AFGHANISTAN         4.5H AHEAD OF UTC
+ALBANIA             1 H  AHEAD OF UTC
+ALBANIA             2 H  AHEAD OF UTC  MAR 27 - SEP 24
+ALBANIA                                (ESTIMATED)
+ALGERIA             1 H  AHEAD OF UTC
+AMERICAN SAMOA     11 H  BEHIND UTC
+ANDORRA             1 H  AHEAD OF UTC
+ANDORRA             2 H  AHEAD OF UTC  MAR 27 - SEP 24
+ANDORRA                                (ESTIMATED)
+ANGOLA              1 H  AHEAD OF UTC
+ARGENTINA           3 H  BEHIND UTC
+ARUBA               4 H  BEHIND UTC    ALSO BONAIRE, CURACAO,
+ARUBA                                  ST.MAARTEN
+AUSTRALIA  WEST     8 H  AHEAD OF UTC  PERTH, EXMOUTH
+AUSTRALIA  N.T.     9.5H AHEAD OF UTC  DARWIN  NO ADVANCED TIME
+AUSTRALIA  N.T.                                IN SUMMER
+AUSTRALIA  SOUTH    9.5H AHEAD OF UTC  ADELAIDE
+AUSTRALIA                              INCLUDING BROKEN HILL, NSW
+AUSTRALIA  SOUTH   10.5H AHEAD OF UTC  ADELAIDE OCT 30, '88-MAR
+AUSTRALIA  SOUTH                       18, '89 INCLUDING BROKEN
+AUSTRIALIA SOUTH                       HILL, NSW
+AUSTRALIA  QUEENL  10 H  AHEAD OF UTC
+AUSTRALIA  NSW     10 H  AHEAD OF UTC  SYDNEY
+AUSTRALIA  NSW     11 H  AHEAD OF UTC  SYDNEY OCT 30, '88-MAR 18,
+AUSTRALIA  NSW                         '89
+AUSTRALIA  TASM.   10 H  AHEAD OF UTC  HOBART
+AUSTRALIA  TASM.   11 H  AHEAD OF UTC  HOBART OCT 30, '88-MAR 18,
+AUSTRALIA  TASM.                       '89
+AUSTRIA             1 H  AHEAD OF UTC
+AUSTRIA             2 H  AHEAD OF UTC  MAR 27 - SEPT 24
+AZORES                   SEE PORTUGAL
+BAHAMAS             5 H  BEHIND UTC    EXCLUDING TURKS AND CAICOS
+BAHAMAS                                ISLANDS)
+BAHAMAS             4 H  BEHIND UTC    APR 3 - OCT 29 (SAME
+BAHAMAS                                EXCLUSION)
+BAHRAIN             3 H  AHEAD OF UTC
+BANGLADESH          6 H  AHEAD OF UTC
+BARBADOS            4 H  BEHIND UTC
+BELGIUM             1 H  AHEAD OF UTC
+BELGIUM             2 H  AHEAD OF UTC  MAR 27 - SEP 24
+BELIZE              6 H  BEHIND UTC
+BENIN PEOPLES REP   1 H  AHEAD OF UTC  DAHOMEY
+BERMUDA             4 H  BEHIND UTC
+BERMUDA             3 H  BEHIND UTC    APR 3 - OCT 29
+BHUTAN              6 H  AHEAD OF UTC
+BOLIVIA             4 H  BEHIND UTC
+BONAIRE             4 H  BEHIND UTC    ALSO ARUBA,CURACAO,
+BONAIRE                                ST.MAARTEN, SABA
+BOTSWANA            2 H  AHEAD OF UTC
+BRAZIL     WEST     5 H  BEHIND UTC    TERRITORY OF ACRE
+BRAZIL     WEST     4 H  BEHIND UTC    ACRE OCT 23, '88-FEB 11,
+BRAZIL                                 '89 (ESTIMATED)
+BRAZIL     CENTRAL  4 H  BEHIND UTC    MANAUS
+BRAZIL     CENTRAL  3 H  BEHIND UTC    MANAUS OCT 23, '88-FEB 11,
+BRAZIL     CENTRAL                     '89 (ESTIMATED)
+BRAZIL     EAST     3 H  BEHIND UTC    COASTAL STATES, RIO, SAO
+BRAZIL     EAST                        PAULO, BRASILIA
+BRAZIL     EAST     2 H  BEHIND UTC    COASTAL STATES, RIO, SAO
+BRAZIL                                 PAULO, BRASILIA OCT 23,
+BRAZIL                                 '88-FEB 11, '89
+BRAZIL                                 (ESTIMATED)
+BRAZIL              2 H  BEHIND UTC    ATLANTIC ISLANDS, FERNANDO
+BRAZIL                                 DE NORONHA
+BRAZIL              1 H  BEHIND UTC    OCT 23, '88-FEB 11, '89
+BRAZIL                                 (ESTIMATED)
+BRAZIL              3 H  BEHIND UTC    FOR MOST MAJOR AIRPORTS.
+BRITISH VIRGIN I.   4 H  BEHIND UTC
+BRUNEI              8 H  AHEAD OF UTC
+BULGARIA            2 H  AHEAD OF UTC
+BULGARIA            3 H  AHEAD OF UTC  MAR 27 - SEP 24
+BURKINA FASO        ON UTC
+BURMA               6.5H AHEAD OF UTC
+BURUNDI             2 H  AHEAD OF UTC
+CAMBODIA            SEE KAMPUCHEA
+CAMEROON            1 H  AHEAD OF UTC
+CANADA   NEW FDL    3.5H BEHIND UTC    ST.JOHN'S
+CANADA   NEW FDL    1.5H BEHIND UTC    APR 3 - OCT 29
+CANADA   ATLANTIC   4 H  BEHIND UTC    HALIFAX
+CANADA   ATLANTIC   3 H  BEHIND UTC    APR 3 - OCT 29
+CANADA   EASTERN    5 H  BEHIND UTC    TORONTO, MONTREAL, OTTAWA
+CANADA   EASTERN    4 H  BEHIND UTC    APR 3 - OCT 29
+CANADA   CENTRAL    6 H  BEHIND UTC    REGINA, WINNIPEG
+CANADA   CENTRAL    5 H  BEHIND UTC    APR 3 - OCT 29
+CANADA   MOUNTAIN   7 H  BEHIND UTC    CALGARY, EDMONTON
+CANADA   MOUNTAIN   6 H  BEHIND UTC    APR 3 - OCT 29
+CANADA   PACIFIC    8 H  BEHIND UTC    VANCOUVER
+CANADA   PACIFIC    7 H  BEHIND UTC    APR 3 - OCT 29
+CANADA   YUKON      SAME AS PACIFIC    DAWSON
+CAPE VERDE          1 H  BEHIND UTC
+CAYMAN ISLANDS      5 H  BEHIND UTC
+CAROLINE ISLAND    10 H  AHEAD OF UTC  EXCLUDING PONAPE IS.,
+CAROLINE ISLAND                       KUSAIE, AND PINGELAP
+CENTRAL AFRICA      1 H  AHEAD OF UTC
+CEYLON              5.5H AHEAD OF UTC, SEE SRI LANKA
+CHAD                1 H  AHEAD OF UTC
+CHANNEL ISLANDS     SEE ENGLAND
+CHILE               4 H  BEHIND UTC    CONTINENTAL
+CHILE               3 H  BEHIND UTC    OCT 9, '88-MAR 11, '89
+CHILE               6 H  BEHIND UTC    EASTER ISLAND
+CHILE               5 H  BEHIND UTC    OCT 9, '88-MAR 11, '89
+CHINA               8 H  AHEAD OF UTC  ALL OF CHINA, INCL TAIWAN
+CHINA               9 H  AHEAD OF UTC  APR 17 - SEP 10
+COCOS (Keeling) I.  6.5H AHEAD OF UTC
+COLOMBIA            5 H  BEHIND UTC
+COMOROS             3 H  AHEAD OF UTC
+CONGO               1 H  AHEAD OF UTC
+COOK ISLANDS       10 H  BEHIND UTC
+COOK ISLANDS        9.5H  BEHIND UTC   OCT 30, '88-MAR 24, '89
+COOK ISLANDS                           (ESTIMATED)
+COSTA RICA          6 H  BEHIND UTC
+COTE D'IVOIRE       ON UTC
+CUBA                5 H  BEHIND UTC
+CUBA                4 H  BEHIND UTC    MAR 20 - OCT 8
+CURACAO             4 H  BEHIND UTC    ALSO BONAIRE, ARUBA,
+CURACAO                                ST.MAARTEN
+CYPRUS              2 H  AHEAD OF UTC
+CYPRUS              3 H  AHEAD OF UTC  MAR 27 - SEP 24
+CZECHOSLOVAKIA      1 H  AHEAD OF UTC
+CZECHOSLOVAKIA      2 H  AHEAD OF UTC  MAR 27 - SEP 24
+DENMARK             1 H  AHEAD OF UTC
+DENMARK             2 H  AHEAD OF UTC  MAR 27 - SEP 24
+DENMK. FAEROE IS    1 H  AHEAD OF UTC  MAR 27 - SEP 24
+DJIBOUTI            3 H  AHEAD OF UTC
+DOMINICA            4 H  BEHIND UTC
+DOMINICAN REP       4 H  BEHIND UTC
+ECUADOR             5 H  BEHIND UTC    CONTINENTAL
+ECUADOR             6 H  BEHIND UTC    GALAPAGOS ISLANDS
+EGYPT               2 H  AHEAD OF UTC
+EGYPT               3 H  AHEAD OF UTC  MAY 17 - SEP 30 (AFTER
+EGYPT                                  RAMADAN)
+EL SALVADOR         6 H  BEHIND UTC
+ENGLAND             ON UTC             (WALES, SCOTLAND, N.I.,
+ENGLAND                                CH. IS.)
+ENGLAND             1 H  AHEAD OF UTC  MAR 27 - OCT 22
+ENEZUELA           4 H  BEHIND UTC
+EQUITORIAL GUINEA   1 H  AHEAD OF UTC
+ETHIOPIA            3 H  AHEAD OF UTC
+FALKLAND ISLANDS    4 H  BEHIND UTC
+FALKLAND ISLANDS    3 H  BEHIND UTC    SEP 11, '88-APR 15, '89
+FALKLAND ISLANDS                       (ESTIMATED)
+FAROE ISLAND        ON UTC
+FAROE ISLAND        1 H  AHEAD OF UTC  MAR 27 - SEP 24
+FIJI               12 H  AHEAD OF UTC
+FINLAND             2 H  AHEAD OF UTC
+FINLAND             3 H  AHEAD OF UTC  MAR 27 - SEP 24
+FRANCE              1 H  AHEAD OF UTC
+FRANCE              2 H  AHEAD OF UTC  MAR 27 - SEP 24
+FRENCH GUIANA       3 H  BEHIND UTC
+FRENCH POLYNESIA    9 H  BEHIND UTC    GAMBIER ISLAND
+FRENCH POLYNESIA    9.5H BEHIND UTC    MARQUESAS ISLANDS
+FRENCH POLYNESIA   10 H  BEHIND UTC    SOCIETY ISLANDS, TUBUAI
+FRENCH POLYNESIA                       ISLANDS, TUAMOTU ISLAND,
+FRENCH POLYNESIA                       TAHITI
+GABON               1 H  AHEAD OF UTC
+GAMBIA              ON UTC
+GERMANY ALL         1 H  AHEAD OF UTC
+GERMANY ALL         2 H  AHEAD OF UTC  MAR 27 - SEP 24
+GHANA               ON UTC
+GIBRALTAR           1 H  AHEAD OF UTC
+GIBRALTAR           2 H  AHEAD OF UTC  MAR 27 - SEP 24
+GREECE              2 H  AHEAD OF UTC
+GREECE              3 H  AHEAD OF UTC  MAR 27 - SEP 24
+GREENLAND           4 H  BEHIND UTC    THULE AIRBASE YEAR ROUND
+GREENLAND           3 H  BEHIND UTC    ANGMAGSSALIK AND W. COAST
+GREENLAND           2 H  BEHIND UTC    MAR 27 - SEP 24
+GREENLAND           1 H  BEHIND UTC    SCORESBYSUND
+GREENLAND           ON UTC             MAR 27 - SEP 24
+GRENADA             4 H  BEHIND UTC
+GUADELOUPE          4 H  BEHIND UTC    ST. BARTHELEMY, NORTHERN
+GUADELOUPE                             ST. MARTIN MARTINIQUE
+GUAM               10 H  AHEAD OF UTC
+GUATEMALA           6 H  BEHIND UTC
+GUINEA              ON UTC
+GUINEA BISSAU       ON UTC
+GUINEA REPUBLIC     ON UTC
+GUINEA EQUATORIAL   1 H  AHEAD OF UTC
+GUYANA              3 H  BEHIND UTC
+HAITI               5 H  BEHIND UTC
+HAITI               4 H  BEHIND UTC    APR 3 - OCT 29
+HOLLAND             SEE NETHERLANDS
+HONDURAS            6 H  BEHIND UTC
+HONG KONG           8 H  AHEAD OF UTC
+HUNGARY             1 H  AHEAD OF UTC
+HUNGARY             2 H  AHEAD OF UTC  MAR 27 - SEP 24
+ICELAND             ON UTC
+INDIA               5.5H AHEAD OF UTC  INCLUDING ANDAMAN ISLANDS
+INDONESIA WEST      7 H  AHEAD OF UTC  SUMATRA, JAVA, BALI,
+INDONESIA WEST                         JAKARTA
+INDONESIA CENTRAL   8 H  AHEAD OF UTC  KALIMANTAN, SULAWESI
+INDONESIA EAST      9 H  AHEAD OF UTC  IRIAN, BARAT
+IRAN                3.5H AHEAD OF UTC
+IRAQ                3 H  AHEAD OF UTC
+IRAQ                4 H  AHEAD OF UTC  APR 1 - SEP 30
+IRELAND             ON UTC
+IRELAND             1 H  AHEAD OF UTC  MAR 27 - OCT 22
+ISRAEL              2 H  AHEAD OF UTC
+ISRAEL              3 H  AHEAD OF UTC  APR 10 - SEP 3
+ITALY               1 H  AHEAD OF UTC
+ITALY               2 H  AHEAD OF UTC  MAR 27 - SEP 24
+IVORY COAST         ON UTC
+IWAN              8 H  AHEAD OF UTC
+JAMAICA             5 H  BEHIND UTC
+JAPAN               9 H  AHEAD OF UTC
+JOHNSTON ISLAND    10 H  BEHIND UTC
+JORDAN              2 H  AHEAD OF UTC
+JORDAN              3 H  AHEAD OF UTC  APR 1 - OCT 6
+KAMPUCHEA           7 H  AHEAD OF UTC
+KENYA               3 H  AHEAD OF UTC
+KIRIBATI, REP OF   12 H  AHEAD OF UTC  CANTON, ENDERBURY ISLANDS
+KIRIBATI, REP OF   11 H  AHEAD OF UTC  CHRISTMAS ISLAND
+KOREA               9 H  AHEAD OF UTC
+KOREA, REP OF       9 H  AHEAD OF UTC
+KOREA, REP OF      10 H  AHEAD OF UTC  MAY 8 - OCT 8
+KUWAIT              3 H  AHEAD OF UTC
+KUSAIE, PINGELAP  12 H  AHEAD OF UTC  INCLUDING MARSHALL IS.,
+KUSAIE, PINGELAP                      EXCLUDING KWAJALEIN)
+KWAJALEIN         12 H  BEHIND UTC
+LAOS                7 H  AHEAD OF UTC
+LEBANON             2 H  AHEAD OF UTC
+LEBANON             3 H  AHEAD OF UTC  JUN 1 - OCT 31
+LEEWARD ISLANDS     4 H BEHIND UTC     ANTIGUA, DOMINICA,
+LEEWARD ISLANDS                        MONTSERRAT, ST.
+LEEWARD ISLAANDS                       CHRISTOPHER, ST. KITTS,
+LEEWARD ISLANDS                        NEVIS, ANGUILLA
+LESOTHO             2 H  AHEAD OF UTC
+LIBERIA             ON UTC
+LIBYAN ARAB         1 H  AHEAD OF UTC  JAMAHIRIYA/LIBYA
+LIBYAN ARAB         2 H  AHEAD OF UTC  APR 1 - SEP 30 JAMAHIRIYA/LIBYA
+LIECHTENSTEIN       1 H  AHEAD OF UTC
+LIECHTENSTEIN       2 H  AHEAD OF UTC  MAR 27 - SEP 24
+LUXEMBOURG          1 H  AHEAD OF UTC
+LUXEMBOURG          2 H  AHEAD OF UTC  MAR 27 - SEP 24
+MACAO               8 H  AHEAD OF UTC
+MADAGASCAR          3 H  AHEAD OF UTC
+MADEIRA             SEE PORTUGAL
+MALAWI              2 H  AHEAD OF UTC
+MALAYSIA            8 H  AHEAD OF UTC
+MALDIVES            5 H  AHEAD OF UTC
+MALI                ON UTC
+MALTA               1 H  AHEAD OF UTC
+MALTA               2 H  AHEAD OF UTC  MAR 27 - SEP 24
+MARTINIQUE          4 H  BEHIND UTC
+MAURITANIA          ON UTC
+MAURITIUS           4 H  AHEAD OF UTC
+MARIANA ISLAND    10 H  AHEAD OF UTC  EXCLUDING GUAM
+MEXICO BAJA CAL N   7 H  BEHIND UTC    BAJA CALIFORNIA SUR AND
+MEXICO BAJA CAL N                      N. PACIFIC COAST (STATES
+MEXICO BAJA CAL N                      OF SINALOA AND SONORA)
+MEXICO BAJA CAL N   8 H  BEHIND UTC    ABOVE 28TH PARALLAL APR 3
+MEXICO BAJA CAL N                      - OCT 29
+MEXICO BAJA CAL N   7 H  BEHIND UTC    ABOVE 28TH PARALLAL APR 3
+MEXICO BAJA CAL N                      - 0CT 29
+MEXICO              6 H  BEHIND UTC    STATES OF DURANGO,
+MEXICO                                 COAHUILA, NUEVO LEON,
+MEXICO                                 TAMAULIPAS
+MEXICO              5 H  BEHIND UTC    STATES OF DURANGO,
+MEXICO                                 COAHUILA, NUEVO LEON,
+MEXICO                                 TAMAULIPAS  APR 3 - OCT 29
+MEXICO              6 H  BEHIND UTC    GENERAL MEXICO, STATES OF
+MEXICO                                 CAMPECHE, QUINTANA ROO AND
+MEXICO                                 YUCATAN
+MIDWAY ISLAND      11 H  BEHIND UTC
+MONACO              1 H  AHEAD OF UTC
+MONACO              2 H  AHEAD OF UTC  MAR 27 - SEP 24
+MONGOLIA            8 H  AHEAD OF UTC
+MONGOLIA            9 H  AHEAD OF UTC  MAR 27 - SEP 24
+MONTSERRAT          4 H  BEHIND UTC
+MOROCCO             ON UTC
+MOZAMBIQUE          2 H  AHEAD OF UTC
+NAMIBIA             2 H  AHEAD OF UTC
+NAURU, REP OF      12 H  AHEAD OF UTC
+NEPAL              5H45M AHEAD OF UTC
+NETHERLANDS         1 H  AHEAD OF UTC
+NETHERLANDS         2 H  AHEAD OF UTC  MAR 27 - SEP 24
+NETHERLANDS         4 H  BEHIND UTC    ANTILLES AND SOUTHERN ST.
+NETHERLANDS                            MAARTEN
+NEW CALEDONIA      11 H  AHEAD OF UTC
+NEW HEBRIDES        SEE VANUATU
+NEW ZEALAND        12 H  AHEAD OF UTC  (EXCLUDING CHATHAM ISLAND)
+NEW ZEALAND        13 H  AHEAD OF UTC  OCT 30, '88-MAR 4, '89
+NEW ZEALAND       12H45M AHEAD OF UTC  CHATHAM ISLAND
+NICARAGUA           6 H  BEHIND UTC
+NIGER               1 H  AHEAD OF UTC
+NIGERIA             1 H  AHEAD OF UTC
+NIUE ISLAND        11 H  BEHIND UTC
+NORFOLK ISLAND    11H30M AHEAD OF UTC
+NORTHERN IRELAND    ON UTC             WALES, SCOTLAND, N.I.,
+NORTHERN IRELAND                       CH.IS.
+NORTHERN IRELAND    1 H  AHEAD OF UTC  MAR 27 - OCT 22
+NORWAY              1 H  AHEAD OF UTC
+NORWAY              2 H  AHEAD OF UTC  MAR 27 - SEP 24
+OGO                ON UTC
+OMAN                4 H  AHEAD OF UTC
+PACIFIC ISLAND T.T.
+PALAU ISLAND       9 H  AHEAD OF UTC
+PAKISTAN            5 H  AHEAD OF UTC
+PANAMA              5 H  BEHIND UTC
+PAPUA NEW GUINEA   10 H  AHEAD OF UTC  INCLUDING BOUGAINVILLE
+PAPUA NEW GUINEA                       ISLAND
+PARAGUAY            4 H  BEHIND UTC
+PARAGUAY            3 H  BEHIND UTC    OCT 1, '88-MAR 31, '89
+PERU                5 H  BEHIND UTC
+PHILIPPINES         8 H  AHEAD OF UTC
+PONAPE ISLAND     11 H  AHEAD OF UTC
+POLAND              1 H  AHEAD OF UTC
+POLAND              2 H  AHEAD OF UTC  MAR 27 - SEP 24
+PORTUGAL MAINLAND   ON UTC
+PORTUGAL MAINLAND   1 H  AHEAD OF UTC  MAR 27 - SEP 24
+PORTUGAL AZORES     1 H  BEHIND UTC
+PORTUGAL AZORES     ON UTC             MAR 27 - SEP 24
+PORTUGAL MADEIRA    ON UTC
+PORTUGAL MADEIRA    1 H  AHEAD OF UTC  MAR 27 - SEP 24
+PUERTO RICO         4 H  BEHIND UTC
+QATAR               3 H  AHEAD OF UTC
+ROMANIA             2 H  AHEAD OF UTC
+ROMANIA             3 H  AHEAD OF UTC  MAR 27 - SEP 24
+RUSSIA              SEE USSR
+RWANDA              2 H  AHEAD OF UTC
+SABA                4 H  BEHIND UTC    ALSO BONAIRE, CURACAO,
+SAMOA              11 H  BEHIND UTC
+SAN MARINO          1 H  AHEAD OF UTC
+SAN MARINO          2 H  AHEAD OF UTC  MAR 27 - SEP 24
+SAN SALVADOR        6  H  BEHIND UTC
+SAO TOME ISLAND     ON UTC             AND PRINCIPE ISLAND
+SAUDI ARABIA        3 H  AHEAD OF UTC
+SCOTLAND            SEE ENGLAND
+SENEGAL             ON UTC
+SEYCHELLES          4 H  AHEAD OF UTC
+SIERRA LEONE        ON UTC
+SINGAPORE           8 H  AHEAD OF UTC
+SOLOMON ISLANDS    11 H  AHEAD OF UTC  EXCLUDING BOUGAINVILLE
+SOLOMON ISLANDS                        ISLAND
+SOMALI              3 H  AHEAD OF UTC
+SOUTH AFRICA        2 H  AHEAD OF UTC
+SPAIN  CANARY IS    ON UTC
+SPAIN  CANARY IS    1 H  AHEAD OF UTC  MAR 27 - SEP 24
+SPAIN               1 H  AHEAD OF UTC  CONTINENTAL, BALEARIC AND
+SPAIN                                  MALLORCA ISLANDS
+SPAIN               2 H  AHEAD OF UTC  CONTINENTAL, BALEARIC AND
+SPAIN                                  MALLORCA ISLANDS  MAR 27 -
+SPAIN                                  SEP 24
+SPAIN  MAINLAND     1 H  AHEAD OF UTC  MELILLA
+SPAIN  MAINLAND     2 H  AHEAD OF UTC  MAR 27 - SEP 24
+SRI LANKA          5H30M AHEAD OF UTC
+ST.MAARTEN
+ST.KITTS-NEVIS     4 H  BEHIND UTC
+ST.LUCIA           4 H  BEHIND UTC
+ST.PIERRE          3 H  BEHIND UTC    INCLUDING MIQUELON
+ST.PIERRE          2 H  BEHIND UTC    INLCUDING MIQUELON  APR 3
+ST.PIERRE                             - OCT 29
+ST.VINCENT         4 H  BEHIND UTC    INCLUDING THE GRENADINES
+ST. HELENA          ON UTC
+SURINAME            3 H  BEHIND UTC
+SWAZILAND           2 H  AHEAD OF UTC
+SWEDEN              1 H  AHEAD OF UTC
+SWEDEN              2 H  AHEAD OF UTC  MAR 27 - SEP 24
+SWITZERLAND         1 H  AHEAD OF UTC
+SWITZERLAND         2 H  AHEAD OF UTC  MAR 27 - SEP 24
+SYRIA               2 H  AHEAD OF UTC
+SYRIA               3 H  AHEAD OF UTC  MAR 15 - OCT 30
+TAHITI             10 H  BEHIND UTC
+TANZANIA            3 H  AHEAD OF UTC
+THAILAND            7 H  AHEAD OF UTC
+TRINIDAD / TOBAGO   4 H  BEHIND UTC
+TUNISIA             1 H  AHEAD OF UTC
+TUNISIA             2 H  AHEAD OF UTC  APR 10 - SEP 24
+TURKEY              2 H  AHEAD OF UTC
+TURKEY              3 H  AHEAD OF UTC  MAR 27 - SEP 24
+TURKS AND CAICOS    5 H  BEHIND UTC
+TURKS AND CAICOS    4 H  BEHIND UTC    APR 3 - OCT 29
+TUVALU             12 H  AHEAD OF UTC
+UDAN               2 H  AHEAD OF UTC
+UGANDA              3 H  AHEAD OF UTC
+UNITED ARAB EMIR.   4 H  AHEAD OF UTC  ABU DHABI, DUBAI, SHARJAH,
+UNITED ARAB EMIR                       RAS AL KHAIMAH
+UNITED KINGDOM      ON UTC             WALES, SCOTLAND, N.I., CH.
+UNITED KINGDOM                         IS.
+UNITED KINGDOM      1 H  AHEAD OF UTC  MAR 27 - OCT 22
+UNITED STATES       SEE USA
+UPPER VOLTA         ON UTC
+URUGUAY             3 H  BEHIND UTC
+URUGUAY             2 H  BEHIND UTC    DEC 11, '88-FEB 25, '89
+URAGUAY                                (ESTIMATED)
+USA  EASTERN       5 H  BEHIND UTC    NEW YORK, WASHINGTON
+USA  EASTERN       4 H  BEHIND UTC    APR 3 - OCT 30
+USA  CENTRAL       6 H  BEHIND UTC    CHICAGO, HOUSTON
+USA  CENTRAL       5 H  BEHIND UTC    APR 3 - OCT 30
+USA  MOUNTAIN      7 H  BEHIND UTC    DENVER
+USA  MOUNTAIN      6 H  BEHIND UTC    APR 3 - OCT 30
+USA  PACIFIC       8 H  BEHIND UTC    L.A., SAN FRANCISCO
+USA  PACIFIC       7 H  BEHIND UTC    APR 3 - OCT 30
+USA  ALASKA STD    9 H  BEHIND UTC    MOST OF ALASKA     (AKST)
+USA  ALASKA STD    8 H  BEHIND UTC    APR 3 - OCT 30 (AKDT)
+USA  ALEUTIAN     10 H  BEHIND UTC    ISLANDS WEST OF 170W
+USA  - " -         9 H  BEHIND UTC    APR 3 - OCT 30
+USA  HAWAII       10 H  BEHIND UTC
+USA  BERING       11 H  BEHIND UTC    SAMOA, MIDWAY
+USA  FOR SPECIFIC INFO ON USA ZONES/TIMES CALL DOT 202-426-4520
+USSR WEST EUROP     3 H  AHEAD OF UTC  LENINGRAD, MOSCOW
+USSR WEST EUROP     4 H  AHEAD OF UTC  APR 1 - SEP 30
+USSR CENTRAL EUR    4 H  AHEAD OF UTC  ROSTOV, BAKU
+USSR CENTRAL EUR    5 H  AHEAD OF UTC  APR 1 - SEP 30
+USSR EAST EUROP     5 H  AHEAD OF UTC  SVERDLOVSK
+USSR EAST EUROP     6 H  AHEAD OF UTC  APR 1 - SEP 30
+USSR WEST SIBERIAN  6 H  AHEAD OF UTC  TASHKENT, ALMA ATA
+USSR WEST SIBERIAN  7 H  AHEAD OF UTC  APR 1 - SEP 30
+USSR WEST-CENTRAL   7 H  AHEAD OF UTC  NOVOSIBIRSK
+USSR WEST-CENTRAL   8 H  AHEAD OF UTC  APR 1 - SEP 30
+USSR WEST-CENTRAL   8 H  AHEAD OF UTC  IRKUTSK
+USSR WEST-CENTRAL   9 H  AHEAD OF UTC  APR 1 - SEP 30
+USSR CENTRAL SIB    9 H  AHEAD OF UTC  YAKUTSK
+USSR CENTRAL SIB   10 H  AHEAD OF UTC  APR 1 - SEP 30
+USSR CENTRAL SIB   10 H  AHEAD OF UTC  VLADIVOSTOK
+USSR CENTRAL SIB   11 H  AHEAD OF UTC  APR 1 - SEP 30
+USSR EAST SIBERIA  11 H  AHEAD OF UTC  MAGADAN
+USSR EAST SIBERIA  12 H  AHEAD OF UTC  APR 1 - SEP 30
+USSR EAST SIBERIA  12 H  AHEAD OF UTC  PETROPAVLOVSK
+USSR EAST SIBERIA  13 H  AHEAD OF UTC  APR 1 - SEP 30
+USSR EAST SIBERIA  13 H  AHEAD OF UTC  UELEN
+USSR EAST SIBERIA  14 H  AHEAD OF UTC  APR 1 - SEP 30
+VANUATU            11 H  AHEAD OF UTC  (NEW HEBRIDES)
+VANUATU            12 H  AHEAD OF UTC  SEP 25, '88-MAR 25, '89
+VANUATU                                (ESTIMATED)
+VATICAN             1 H  AHEAD OF UTC
+VATICAN             2 H  AHEAD OF UTC  MAR 27 - SEP 24
+VIETNAM             7 H  AHEAD OF UTC
+VIRGIN ISLANDS      4 H  BEHIND UTC    ST.CROIX, ST.THOMAS,
+VIRGIN ISLANDS                         ST.JOHN
+WAKE ISLAND        12 H  AHEAD OF UTC
+WALES               SEE ENGLAND
+WALLIS/FUTUNA IS.  12 H  AHEAD OF UTC
+WINDWARD ISLANDS    4 H  BEHIND UTC    GRENADA, ST. LUCIA
+YEMEN               3 H  AHEAD OF UTC  BOTH REPUBLICS
+YUGOSLAVIA          1 H  AHEAD OF UTC
+YUGOSLAVIA          2 H  AHEAD OF UTC  MAR 27 - SEP 24
+ZAIRE  EAST         1 H  AHEAD OF UTC  KINSHASA MBANDAKA
+ZAIRE  WEST         2 H  AHEAD OF UTC  LUBUMBASHI, KASAI, KIVU,
+ZAIRE  WEST                            HAUT-ZAIRE, SHABA
+ZAMBIA              2 H  AHEAD OF UTC
+ZIMBABWE            2 H  AHEAD OF UTC
Index: vendor/tzcode/tzcode2009h/unused/usno1989a
===================================================================
--- vendor/tzcode/tzcode2009h/unused/usno1989a	(nonexistent)
+++ vendor/tzcode/tzcode2009h/unused/usno1989a	(revision 192888)
@@ -0,0 +1,452 @@
+# @(#)usno1989a	8.1
+#
+# From Arthur David Olson (1994-02-07):
+#
+# Here's time zone information from the United States Naval Observatory,
+# with corrections from Paul Eggert.
+# The USNO warns:
+#	DUE TO FREQUENT CHANGES IN THE LOCAL LAWS GOVERNING DAYLIGHT
+#	SAVING TIME, WE CANNOT GUARANTEE THE ACCURACY OF THIS
+#	INFORMATION.  PLEASE ALERT US TO ANY DISCREPANCY YOU MAY
+#	DISCOVER.
+#
+AFGHANISTAN         4.5H AHEAD OF UTC
+ALBANIA             1 H  AHEAD OF UTC
+ALBANIA             2 H  AHEAD OF UTC  MAR 27 - SEP 24
+ALBANIA                                (ESTIMATED)
+ALGERIA             1 H  AHEAD OF UTC
+AMERICAN SAMOA     11 H  BEHIND UTC
+ANDORRA             1 H  AHEAD OF UTC
+ANDORRA             2 H  AHEAD OF UTC  MAR 27 - SEP 24
+ANDORRA                                (ESTIMATED)
+ANGOLA              1 H  AHEAD OF UTC
+ARGENTINA           3 H  BEHIND UTC
+ARUBA               4 H  BEHIND UTC    ALSO BONAIRE, CURACAO,
+ARUBA                                  ST.MAARTEN
+AUSTRALIA  WEST     8 H  AHEAD OF UTC  PERTH, EXMOUTH
+AUSTRALIA  N.T.     9.5H AHEAD OF UTC  DARWIN  NO ADVANCED TIME
+AUSTRALIA  N.T.                                IN SUMMER
+AUSTRALIA  SOUTH    9.5H AHEAD OF UTC  ADELAIDE
+AUSTRALIA                              INCLUDING BROKEN HILL, NSW
+AUSTRALIA  SOUTH   10.5H AHEAD OF UTC  ADELAIDE OCT 30, '88-MAR
+AUSTRALIA  SOUTH                       18, '89 INCLUDING BROKEN
+AUSTRIALIA SOUTH                       HILL, NSW
+AUSTRALIA  QUEENL  10 H  AHEAD OF UTC
+AUSTRALIA  NSW     10 H  AHEAD OF UTC  SYDNEY
+AUSTRALIA  NSW     11 H  AHEAD OF UTC  SYDNEY OCT 30, '88-MAR 18,
+AUSTRALIA  NSW                         '89
+AUSTRALIA  TASM.   10 H  AHEAD OF UTC  HOBART
+AUSTRALIA  TASM.   11 H  AHEAD OF UTC  HOBART OCT 30, '88-MAR 18,
+AUSTRALIA  TASM.                       '89
+AUSTRIA             1 H  AHEAD OF UTC
+AUSTRIA             2 H  AHEAD OF UTC  MAR 27 - SEPT 24
+AZORES                   SEE PORTUGAL
+BAHAMAS             5 H  BEHIND UTC    EXCLUDING TURKS AND CAICOS
+BAHAMAS                                ISLANDS)
+BAHAMAS             4 H  BEHIND UTC    APR 3 - OCT 29 (SAME
+BAHAMAS                                EXCLUSION)
+BAHRAIN             3 H  AHEAD OF UTC
+BANGLADESH          6 H  AHEAD OF UTC
+BARBADOS            4 H  BEHIND UTC
+BELGIUM             1 H  AHEAD OF UTC
+BELGIUM             2 H  AHEAD OF UTC  MAR 27 - SEP 24
+BELIZE              6 H  BEHIND UTC
+BENIN PEOPLES REP   1 H  AHEAD OF UTC  DAHOMEY
+BERMUDA             4 H  BEHIND UTC
+BERMUDA             3 H  BEHIND UTC    APR 3 - OCT 29
+BHUTAN              6 H  AHEAD OF UTC
+BOLIVIA             4 H  BEHIND UTC
+BONAIRE             4 H  BEHIND UTC    ALSO ARUBA,CURACAO,
+BONAIRE                                ST.MAARTEN, SABA
+BOTSWANA            2 H  AHEAD OF UTC
+BRAZIL     WEST     5 H  BEHIND UTC    TERRITORY OF ACRE
+BRAZIL     WEST     4 H  BEHIND UTC    ACRE OCT 23, '88-FEB 11,
+BRAZIL                                 '89 (ESTIMATED)
+BRAZIL     CENTRAL  4 H  BEHIND UTC    MANAUS
+BRAZIL     CENTRAL  3 H  BEHIND UTC    MANAUS OCT 23, '88-FEB 11,
+BRAZIL     CENTRAL                     '89 (ESTIMATED)
+BRAZIL     EAST     3 H  BEHIND UTC    COASTAL STATES, RIO, SAO
+BRAZIL     EAST                        PAULO, BRASILIA
+BRAZIL     EAST     2 H  BEHIND UTC    COASTAL STATES, RIO, SAO
+BRAZIL                                 PAULO, BRASILIA OCT 23,
+BRAZIL                                 '88-FEB 11, '89
+BRAZIL                                 (ESTIMATED)
+BRAZIL              2 H  BEHIND UTC    ATLANTIC ISLANDS, FERNANDO
+BRAZIL                                 DE NORONHA
+BRAZIL              1 H  BEHIND UTC    OCT 23, '88-FEB 11, '89
+BRAZIL                                 (ESTIMATED)
+BRAZIL              3 H  BEHIND UTC    FOR MOST MAJOR AIRPORTS.
+BRITISH VIRGIN I.   4 H  BEHIND UTC
+BRUNEI              8 H  AHEAD OF UTC
+BULGARIA            2 H  AHEAD OF UTC
+BULGARIA            3 H  AHEAD OF UTC  MAR 27 - SEP 24
+BURKINA FASO        ON UTC
+BURMA               6.5H AHEAD OF UTC
+BURUNDI             2 H  AHEAD OF UTC
+CAMBODIA            SEE KAMPUCHEA
+CAMEROON            1 H  AHEAD OF UTC
+CANADA   NEW FDL    3.5H BEHIND UTC    ST.JOHN'S
+CANADA   NEW FDL    1.5H BEHIND UTC    APR 3 - OCT 29
+CANADA   ATLANTIC   4 H  BEHIND UTC    HALIFAX
+CANADA   ATLANTIC   3 H  BEHIND UTC    APR 3 - OCT 29
+CANADA   EASTERN    5 H  BEHIND UTC    TORONTO, MONTREAL, OTTAWA
+CANADA   EASTERN    4 H  BEHIND UTC    APR 3 - OCT 29
+CANADA   CENTRAL    6 H  BEHIND UTC    REGINA, WINNIPEG
+CANADA   CENTRAL    5 H  BEHIND UTC    APR 3 - OCT 29
+CANADA   MOUNTAIN   7 H  BEHIND UTC    CALGARY, EDMONTON
+CANADA   MOUNTAIN   6 H  BEHIND UTC    APR 3 - OCT 29
+CANADA   PACIFIC    8 H  BEHIND UTC    VANCOUVER
+CANADA   PACIFIC    7 H  BEHIND UTC    APR 3 - OCT 29
+CANADA   YUKON      SAME AS PACIFIC    DAWSON
+CAPE VERDE          1 H  BEHIND UTC
+CAYMAN ISLANDS      5 H  BEHIND UTC
+CAROLINE ISLAND    10 H  AHEAD OF UTC  EXCLUDING PONAPE IS.,
+CAROLINE ISLAND                        KUSAIE, AND PINGELAP
+CENTRAL AFRICA      1 H  AHEAD OF UTC
+CEYLON              5.5H AHEAD OF UTC, SEE SRI LANKA
+CHAD                1 H  AHEAD OF UTC
+CHANNEL ISLANDS     SEE ENGLAND
+CHILE               4 H  BEHIND UTC    CONTINENTAL
+CHILE               3 H  BEHIND UTC    OCT 9, '88-MAR 11, '89
+CHILE               6 H  BEHIND UTC    EASTER ISLAND
+CHILE               5 H  BEHIND UTC    OCT 9, '88-MAR 11, '89
+CHINA               8 H  AHEAD OF UTC  ALL OF CHINA, INCL TAIWAN
+CHINA               9 H  AHEAD OF UTC  APR 17 - SEP 10
+COCOS (Keeling) I.  6.5H AHEAD OF UTC
+COLOMBIA            5 H  BEHIND UTC
+COMOROS             3 H  AHEAD OF UTC
+CONGO               1 H  AHEAD OF UTC
+COOK ISLANDS       10 H  BEHIND UTC
+COOK ISLANDS        9.5H BEHIND UTC    OCT 30, '88-MAR 24, '89
+COOK ISLANDS                           (ESTIMATED)
+COSTA RICA          6 H  BEHIND UTC
+COTE D'IVOIRE       ON UTC
+CUBA                5 H  BEHIND UTC
+CUBA                4 H  BEHIND UTC    MAR 20 - OCT 8
+CURACAO             4 H  BEHIND UTC    ALSO BONAIRE, ARUBA,
+CURACAO                                ST.MAARTEN
+CYPRUS              2 H  AHEAD OF UTC
+CYPRUS              3 H  AHEAD OF UTC  MAR 27 - SEP 24
+CZECHOSLOVAKIA      1 H  AHEAD OF UTC
+CZECHOSLOVAKIA      2 H  AHEAD OF UTC  MAR 27 - SEP 24
+DENMARK             1 H  AHEAD OF UTC
+DENMARK             2 H  AHEAD OF UTC  MAR 27 - SEP 24
+DENMK. FAEROE IS    1 H  AHEAD OF UTC  MAR 27 - SEP 24
+DJIBOUTI            3 H  AHEAD OF UTC
+DOMINICA            4 H  BEHIND UTC
+DOMINICAN REP       4 H  BEHIND UTC
+ECUADOR             5 H  BEHIND UTC    CONTINENTAL
+ECUADOR             6 H  BEHIND UTC    GALAPAGOS ISLANDS
+EGYPT               2 H  AHEAD OF UTC
+EGYPT               3 H  AHEAD OF UTC  MAY 17 - SEP 30 (AFTER
+EGYPT                                  RAMADAN)
+EL SALVADOR         6 H  BEHIND UTC
+ENGLAND             ON UTC             (WALES, SCOTLAND, N.I.,
+ENGLAND                                CH. IS.)
+ENGLAND             1 H  AHEAD OF UTC  MAR 27 - OCT 22
+EQUATORIAL GUINEA   1 H  AHEAD OF UTC
+ETHIOPIA            3 H  AHEAD OF UTC
+FALKLAND ISLANDS    4 H  BEHIND UTC
+FALKLAND ISLANDS    3 H  BEHIND UTC    SEP 11, '88-APR 15, '89
+FALKLAND ISLANDS                       (ESTIMATED)
+FAROE ISLAND        ON UTC
+FAROE ISLAND        1 H  AHEAD OF UTC  MAR 27 - SEP 24
+FIJI               12 H  AHEAD OF UTC
+FINLAND             2 H  AHEAD OF UTC
+FINLAND             3 H  AHEAD OF UTC  MAR 27 - SEP 24
+FRANCE              1 H  AHEAD OF UTC
+FRANCE              2 H  AHEAD OF UTC  MAR 27 - SEP 24
+FRENCH GUIANA       3 H  BEHIND UTC
+FRENCH POLYNESIA    9 H  BEHIND UTC    GAMBIER ISLAND
+FRENCH POLYNESIA    9.5H BEHIND UTC    MARQUESAS ISLANDS
+FRENCH POLYNESIA   10 H  BEHIND UTC    SOCIETY ISLANDS, TUBUAI
+FRENCH POLYNESIA                       ISLANDS, TUAMOTU ISLAND,
+FRENCH POLYNESIA                       TAHITI
+GABON               1 H  AHEAD OF UTC
+GAMBIA              ON UTC
+GERMANY ALL         1 H  AHEAD OF UTC
+GERMANY ALL         2 H  AHEAD OF UTC  MAR 27 - SEP 24
+GHANA               ON UTC
+GIBRALTAR           1 H  AHEAD OF UTC
+GIBRALTAR           2 H  AHEAD OF UTC  MAR 27 - SEP 24
+GREECE              2 H  AHEAD OF UTC
+GREECE              3 H  AHEAD OF UTC  MAR 27 - SEP 24
+GREENLAND           4 H  BEHIND UTC    THULE AIRBASE YEAR ROUND
+GREENLAND           3 H  BEHIND UTC    ANGMAGSSALIK AND W. COAST
+GREENLAND           2 H  BEHIND UTC    MAR 27 - SEP 24
+GREENLAND           1 H  BEHIND UTC    SCORESBYSUND
+GREENLAND           ON UTC             MAR 27 - SEP 24
+GRENADA             4 H  BEHIND UTC
+GUADELOUPE          4 H  BEHIND UTC    ST. BARTHELEMY, NORTHERN
+GUADELOUPE                             ST. MARTIN MARTINIQUE
+GUAM               10 H  AHEAD OF UTC
+GUATEMALA           6 H  BEHIND UTC
+GUINEA              ON UTC
+GUINEA BISSAU       ON UTC
+GUINEA REPUBLIC     ON UTC
+GUINEA EQUATORIAL   1 H  AHEAD OF UTC
+GUYANA              3 H  BEHIND UTC
+HAITI               5 H  BEHIND UTC
+HAITI               4 H  BEHIND UTC    APR 3 - OCT 29
+HOLLAND             SEE NETHERLANDS
+HONDURAS            6 H  BEHIND UTC
+HONG KONG           8 H  AHEAD OF UTC
+HUNGARY             1 H  AHEAD OF UTC
+HUNGARY             2 H  AHEAD OF UTC  MAR 27 - SEP 24
+ICELAND             ON UTC
+INDIA               5.5H AHEAD OF UTC  INCLUDING ANDAMAN ISLANDS
+INDONESIA WEST      7 H  AHEAD OF UTC  SUMATRA, JAVA, BALI,
+INDONESIA WEST                         JAKARTA
+INDONESIA CENTRAL   8 H  AHEAD OF UTC  KALIMANTAN, SULAWESI
+INDONESIA EAST      9 H  AHEAD OF UTC  IRIAN, BARAT
+IRAN                3.5H AHEAD OF UTC
+IRAQ                3 H  AHEAD OF UTC
+IRAQ                4 H  AHEAD OF UTC  APR 1 - SEP 30
+IRELAND             ON UTC
+IRELAND             1 H  AHEAD OF UTC  MAR 27 - OCT 22
+ISRAEL              2 H  AHEAD OF UTC
+ISRAEL              3 H  AHEAD OF UTC  APR 10 - SEP 3
+ITALY               1 H  AHEAD OF UTC
+ITALY               2 H  AHEAD OF UTC  MAR 27 - SEP 24
+IVORY COAST         ON UTC
+JAMAICA             5 H  BEHIND UTC
+JAPAN               9 H  AHEAD OF UTC
+JOHNSTON ISLAND    10 H  BEHIND UTC
+JORDAN              2 H  AHEAD OF UTC
+JORDAN              3 H  AHEAD OF UTC  APR 1 - OCT 6
+KAMPUCHEA           7 H  AHEAD OF UTC
+KENYA               3 H  AHEAD OF UTC
+KIRIBATI, REP OF   12 H  AHEAD OF UTC  CANTON, ENDERBURY ISLANDS
+KIRIBATI, REP OF   11 H  AHEAD OF UTC  CHRISTMAS ISLAND
+KOREA               9 H  AHEAD OF UTC
+KOREA, REP OF       9 H  AHEAD OF UTC
+KOREA, REP OF      10 H  AHEAD OF UTC  MAY 8 - OCT 8
+KUWAIT              3 H  AHEAD OF UTC
+KUSAIE, PINGELAP   12 H  AHEAD OF UTC  INCLUDING MARSHALL IS.,
+KUSAIE, PINGELAP                       EXCLUDING KWAJALEIN)
+KWAJALEIN          12 H  BEHIND UTC
+LAOS                7 H  AHEAD OF UTC
+LEBANON             2 H  AHEAD OF UTC
+LEBANON             3 H  AHEAD OF UTC  JUN 1 - OCT 31
+LEEWARD ISLANDS     4 H  BEHIND UTC    ANTIGUA, DOMINICA,
+LEEWARD ISLANDS                        MONTSERRAT, ST.
+LEEWARD ISLAANDS                       CHRISTOPHER, ST. KITTS,
+LEEWARD ISLANDS                        NEVIS, ANGUILLA
+LESOTHO             2 H  AHEAD OF UTC
+LIBERIA             ON UTC
+LIBYAN ARAB         1 H  AHEAD OF UTC  JAMAHIRIYA/LIBYA
+LIBYAN ARAB         2 H  AHEAD OF UTC  APR 1 - SEP 30 JAMAHIRIYA/LIBYA
+LIECHTENSTEIN       1 H  AHEAD OF UTC
+LIECHTENSTEIN       2 H  AHEAD OF UTC  MAR 27 - SEP 24
+LUXEMBOURG          1 H  AHEAD OF UTC
+LUXEMBOURG          2 H  AHEAD OF UTC  MAR 27 - SEP 24
+MACAO               8 H  AHEAD OF UTC
+MADAGASCAR          3 H  AHEAD OF UTC
+MADEIRA             SEE PORTUGAL
+MALAWI              2 H  AHEAD OF UTC
+MALAYSIA            8 H  AHEAD OF UTC
+MALDIVES            5 H  AHEAD OF UTC
+MALI                ON UTC
+MALTA               1 H  AHEAD OF UTC
+MALTA               2 H  AHEAD OF UTC  MAR 27 - SEP 24
+MARTINIQUE          4 H  BEHIND UTC
+MAURITANIA          ON UTC
+MAURITIUS           4 H  AHEAD OF UTC
+MARIANA ISLANDS    10 H  AHEAD OF UTC  EXCLUDING GUAM
+MEXICO BAJA CAL N   7 H  BEHIND UTC    BAJA CALIFORNIA SUR AND
+MEXICO BAJA CAL N                      N. PACIFIC COAST (STATES
+MEXICO BAJA CAL N                      OF SINALOA AND SONORA)
+MEXICO BAJA CAL N   8 H  BEHIND UTC    ABOVE 28TH PARALLAL APR 3
+MEXICO BAJA CAL N                      - OCT 29
+MEXICO BAJA CAL N   7 H  BEHIND UTC    ABOVE 28TH PARALLAL APR 3
+MEXICO BAJA CAL N                      - 0CT 29
+MEXICO              6 H  BEHIND UTC    STATES OF DURANGO,
+MEXICO                                 COAHUILA, NUEVO LEON,
+MEXICO                                 TAMAULIPAS
+MEXICO              5 H  BEHIND UTC    STATES OF DURANGO,
+MEXICO                                 COAHUILA, NUEVO LEON,
+MEXICO                                 TAMAULIPAS  APR 3 - OCT 29
+MEXICO              6 H  BEHIND UTC    GENERAL MEXICO, STATES OF
+MEXICO                                 CAMPECHE, QUINTANA ROO AND
+MEXICO                                 YUCATAN
+MIDWAY ISLAND      11 H  BEHIND UTC
+MONACO              1 H  AHEAD OF UTC
+MONACO              2 H  AHEAD OF UTC  MAR 27 - SEP 24
+MONGOLIA            8 H  AHEAD OF UTC
+MONGOLIA            9 H  AHEAD OF UTC  MAR 27 - SEP 24
+MONTSERRAT          4 H  BEHIND UTC
+MOROCCO             ON UTC
+MOZAMBIQUE          2 H  AHEAD OF UTC
+NAMIBIA             2 H  AHEAD OF UTC
+NAURU, REP OF      12 H  AHEAD OF UTC
+NEPAL              5H45M AHEAD OF UTC
+NETHERLANDS         1 H  AHEAD OF UTC
+NETHERLANDS         2 H  AHEAD OF UTC  MAR 27 - SEP 24
+NETHERLANDS         4 H  BEHIND UTC    ANTILLES AND SOUTHERN ST.
+NETHERLANDS                            MAARTEN
+NEW CALEDONIA      11 H  AHEAD OF UTC
+NEW HEBRIDES        SEE VANUATU
+NEW ZEALAND        12 H  AHEAD OF UTC  (EXCLUDING CHATHAM ISLAND)
+NEW ZEALAND        13 H  AHEAD OF UTC  OCT 30, '88-MAR 4, '89
+NEW ZEALAND       12H45M AHEAD OF UTC  CHATHAM ISLAND
+NICARAGUA           6 H  BEHIND UTC
+NIGER               1 H  AHEAD OF UTC
+NIGERIA             1 H  AHEAD OF UTC
+NIUE ISLAND        11 H  BEHIND UTC
+NORFOLK ISLAND    11H30M AHEAD OF UTC
+NORTHERN IRELAND    ON UTC             WALES, SCOTLAND, N.I.,
+NORTHERN IRELAND                       CH.IS.
+NORTHERN IRELAND    1 H  AHEAD OF UTC  MAR 27 - OCT 22
+NORWAY              1 H  AHEAD OF UTC
+NORWAY              2 H  AHEAD OF UTC  MAR 27 - SEP 24
+OMAN                4 H  AHEAD OF UTC
+PACIFIC ISLAND T.T.
+PALAU ISLANDS       9 H  AHEAD OF UTC
+PAKISTAN            5 H  AHEAD OF UTC
+PANAMA              5 H  BEHIND UTC
+PAPUA NEW GUINEA   10 H  AHEAD OF UTC  INCLUDING BOUGAINVILLE
+PAPUA NEW GUINEA                       ISLAND
+PARAGUAY            4 H  BEHIND UTC
+PARAGUAY            3 H  BEHIND UTC    OCT 1, '88-MAR 31, '89
+PERU                5 H  BEHIND UTC
+PHILIPPINES         8 H  AHEAD OF UTC
+PONAPE ISLAND      11 H  AHEAD OF UTC
+POLAND              1 H  AHEAD OF UTC
+POLAND              2 H  AHEAD OF UTC  MAR 27 - SEP 24
+PORTUGAL MAINLAND   ON UTC
+PORTUGAL MAINLAND   1 H  AHEAD OF UTC  MAR 27 - SEP 24
+PORTUGAL AZORES     1 H  BEHIND UTC
+PORTUGAL AZORES     ON UTC             MAR 27 - SEP 24
+PORTUGAL MADEIRA    ON UTC
+PORTUGAL MADEIRA    1 H  AHEAD OF UTC  MAR 27 - SEP 24
+PUERTO RICO         4 H  BEHIND UTC
+QATAR               3 H  AHEAD OF UTC
+ROMANIA             2 H  AHEAD OF UTC
+ROMANIA             3 H  AHEAD OF UTC  MAR 27 - SEP 24
+RUSSIA              SEE USSR
+RWANDA              2 H  AHEAD OF UTC
+SABA                4 H  BEHIND UTC    ALSO BONAIRE, CURACAO,
+SAMOA              11 H  BEHIND UTC
+SAN MARINO          1 H  AHEAD OF UTC
+SAN MARINO          2 H  AHEAD OF UTC  MAR 27 - SEP 24
+SAN SALVADOR        6 H  BEHIND UTC
+SAO TOME ISLAND     ON UTC             AND PRINCIPE ISLAND
+SAUDI ARABIA        3 H  AHEAD OF UTC
+SCOTLAND            SEE ENGLAND
+SENEGAL             ON UTC
+SEYCHELLES          4 H  AHEAD OF UTC
+SIERRA LEONE        ON UTC
+SINGAPORE           8 H  AHEAD OF UTC
+SOLOMON ISLANDS    11 H  AHEAD OF UTC  EXCLUDING BOUGAINVILLE
+SOLOMON ISLANDS                        ISLAND
+SOMALI              3 H  AHEAD OF UTC
+SOUTH AFRICA        2 H  AHEAD OF UTC
+SPAIN  CANARY IS    ON UTC
+SPAIN  CANARY IS    1 H  AHEAD OF UTC  MAR 27 - SEP 24
+SPAIN               1 H  AHEAD OF UTC  CONTINENTAL, BALEARIC AND
+SPAIN                                  MALLORCA ISLANDS
+SPAIN               2 H  AHEAD OF UTC  CONTINENTAL, BALEARIC AND
+SPAIN                                  MALLORCA ISLANDS  MAR 27 -
+SPAIN                                  SEP 24
+SPAIN  MAINLAND     1 H  AHEAD OF UTC  MELILLA
+SPAIN  MAINLAND     2 H  AHEAD OF UTC  MAR 27 - SEP 24
+SRI LANKA          5H30M AHEAD OF UTC
+ST. MAARTEN
+ST. KITTS-NEVIS     4 H  BEHIND UTC
+ST. LUCIA           4 H  BEHIND UTC
+ST. PIERRE          3 H  BEHIND UTC    INCLUDING MIQUELON
+ST. PIERRE          2 H  BEHIND UTC    INLCUDING MIQUELON  APR 3
+ST. PIERRE                             - OCT 29
+ST. VINCENT         4 H  BEHIND UTC    INCLUDING THE GRENADINES
+ST. HELENA          ON UTC
+SUDAN               2 H  AHEAD OF UTC
+SURINAME            3 H  BEHIND UTC
+SWAZILAND           2 H  AHEAD OF UTC
+SWEDEN              1 H  AHEAD OF UTC
+SWEDEN              2 H  AHEAD OF UTC  MAR 27 - SEP 24
+SWITZERLAND         1 H  AHEAD OF UTC
+SWITZERLAND         2 H  AHEAD OF UTC  MAR 27 - SEP 24
+SYRIA               2 H  AHEAD OF UTC
+SYRIA               3 H  AHEAD OF UTC  MAR 15 - OCT 30
+TAHITI             10 H  BEHIND UTC
+TAIWAN              8 H  AHEAD OF UTC
+TANZANIA            3 H  AHEAD OF UTC
+THAILAND            7 H  AHEAD OF UTC
+TOGO                ON UTC
+TRINIDAD / TOBAGO   4 H  BEHIND UTC
+TUNISIA             1 H  AHEAD OF UTC
+TUNISIA             2 H  AHEAD OF UTC  APR 10 - SEP 24
+TURKEY              2 H  AHEAD OF UTC
+TURKEY              3 H  AHEAD OF UTC  MAR 27 - SEP 24
+TURKS AND CAICOS    5 H  BEHIND UTC
+TURKS AND CAICOS    4 H  BEHIND UTC    APR 3 - OCT 29
+TUVALU             12 H  AHEAD OF UTC
+UGANDA              3 H  AHEAD OF UTC
+UNITED ARAB EMIR.   4 H  AHEAD OF UTC  ABU DHABI, DUBAI, SHARJAH,
+UNITED ARAB EMIR                       RAS AL KHAIMAH
+UNITED KINGDOM      ON UTC             WALES, SCOTLAND, N.I., CH.
+UNITED KINGDOM                         IS.
+UNITED KINGDOM      1 H  AHEAD OF UTC  MAR 27 - OCT 22
+UNITED STATES       SEE USA
+UPPER VOLTA         ON UTC
+URUGUAY             3 H  BEHIND UTC
+URUGUAY             2 H  BEHIND UTC    DEC 11, '88-FEB 25, '89
+URAGUAY                                (ESTIMATED)
+USA   EASTERN       5 H  BEHIND UTC    NEW YORK, WASHINGTON
+USA   EASTERN       4 H  BEHIND UTC    APR 3 - OCT 30
+USA   CENTRAL       6 H  BEHIND UTC    CHICAGO, HOUSTON
+USA   CENTRAL       5 H  BEHIND UTC    APR 3 - OCT 30
+USA   MOUNTAIN      7 H  BEHIND UTC    DENVER
+USA   MOUNTAIN      6 H  BEHIND UTC    APR 3 - OCT 30
+USA   PACIFIC       8 H  BEHIND UTC    L.A., SAN FRANCISCO
+USA   PACIFIC       7 H  BEHIND UTC    APR 3 - OCT 30
+USA   ALASKA STD    9 H  BEHIND UTC    MOST OF ALASKA     (AKST)
+USA   ALASKA STD    8 H  BEHIND UTC    APR 3 - OCT 30 (AKDT)
+USA   ALEUTIAN     10 H  BEHIND UTC    ISLANDS WEST OF 170W
+USA   - " -         9 H  BEHIND UTC    APR 3 - OCT 30
+USA   HAWAII       10 H  BEHIND UTC
+USA   BERING       11 H  BEHIND UTC    SAMOA, MIDWAY
+USA  FOR SPECIFIC INFO ON USA ZONES/TIMES CALL DOT 202-426-4520
+USSR WEST EUROP     3 H  AHEAD OF UTC  LENINGRAD, MOSCOW
+USSR WEST EUROP     4 H  AHEAD OF UTC  APR 1 - SEP 30
+USSR CENTRAL EUR    4 H  AHEAD OF UTC  ROSTOV, BAKU
+USSR CENTRAL EUR    5 H  AHEAD OF UTC  APR 1 - SEP 30
+USSR EAST EUROP     5 H  AHEAD OF UTC  SVERDLOVSK
+USSR EAST EUROP     6 H  AHEAD OF UTC  APR 1 - SEP 30
+USSR WEST SIBERIAN  6 H  AHEAD OF UTC  TASHKENT, ALMA ATA
+USSR WEST SIBERIAN  7 H  AHEAD OF UTC  APR 1 - SEP 30
+USSR WEST-CENTRAL   7 H  AHEAD OF UTC  NOVOSIBIRSK
+USSR WEST-CENTRAL   8 H  AHEAD OF UTC  APR 1 - SEP 30
+USSR WEST-CENTRAL   8 H  AHEAD OF UTC  IRKUTSK
+USSR WEST-CENTRAL   9 H  AHEAD OF UTC  APR 1 - SEP 30
+USSR CENTRAL SIB    9 H  AHEAD OF UTC  YAKUTSK
+USSR CENTRAL SIB   10 H  AHEAD OF UTC  APR 1 - SEP 30
+USSR CENTRAL SIB   10 H  AHEAD OF UTC  VLADIVOSTOK
+USSR CENTRAL SIB   11 H  AHEAD OF UTC  APR 1 - SEP 30
+USSR EAST SIBERIA  11 H  AHEAD OF UTC  MAGADAN
+USSR EAST SIBERIA  12 H  AHEAD OF UTC  APR 1 - SEP 30
+USSR EAST SIBERIA  12 H  AHEAD OF UTC  PETROPAVLOVSK
+USSR EAST SIBERIA  13 H  AHEAD OF UTC  APR 1 - SEP 30
+USSR EAST SIBERIA  13 H  AHEAD OF UTC  UELEN
+USSR EAST SIBERIA  14 H  AHEAD OF UTC  APR 1 - SEP 30
+VANUATU            11 H  AHEAD OF UTC  (NEW HEBRIDES)
+VANUATU            12 H  AHEAD OF UTC  SEP 25, '88-MAR 25, '89
+VANUATU                                (ESTIMATED)
+VATICAN             1 H  AHEAD OF UTC
+VATICAN             2 H  AHEAD OF UTC  MAR 27 - SEP 24
+VENEZUELA           4 H  BEHIND UTC
+VIETNAM             7 H  AHEAD OF UTC
+VIRGIN ISLANDS      4 H  BEHIND UTC    ST.CROIX, ST.THOMAS,
+VIRGIN ISLANDS                         ST.JOHN
+WAKE ISLAND        12 H  AHEAD OF UTC
+WALES               SEE ENGLAND
+WALLIS/FUTUNA IS.  12 H  AHEAD OF UTC
+WINDWARD ISLANDS    4 H  BEHIND UTC    GRENADA, ST. LUCIA
+YEMEN               3 H  AHEAD OF UTC  BOTH REPUBLICS
+YUGOSLAVIA          1 H  AHEAD OF UTC
+YUGOSLAVIA          2 H  AHEAD OF UTC  MAR 27 - SEP 24
+ZAIRE  EAST         1 H  AHEAD OF UTC  KINSHASA MBANDAKA
+ZAIRE  WEST         2 H  AHEAD OF UTC  LUBUMBASHI, KASAI, KIVU,
+ZAIRE  WEST                            HAUT-ZAIRE, SHABA
+ZAMBIA              2 H  AHEAD OF UTC
+ZIMBABWE            2 H  AHEAD OF UTC
Index: vendor/tzcode/tzcode2009h/unused/usno1995
===================================================================
--- vendor/tzcode/tzcode2009h/unused/usno1995	(nonexistent)
+++ vendor/tzcode/tzcode2009h/unused/usno1995	(revision 192888)
@@ -0,0 +1,326 @@
+# @(#)usno1995	8.1
+#
+# From Arthur David Olson (1995-12-21):
+#
+# Here's time zone information from the United States Naval Observatory
+# via http://tycho.usno.navy.mil/tzones.html. See USNO's note at the end.
+World Time Zones
+For selected countries, the local standard time offset from UTC is given,
+with daylight savings time where observed.
+Time: Thu Dec 21 17:43:00 utc 1995
+Afghanistan: +4.5 hours
+Albania: +1 hours (Local summer +2 hours)
+Algeria: +1 hours (Local summer +2 hours)
+American Samoa: -11 hours
+Andorra: +1 hours (Local summer +2 hours)
+Angola: +1 hours
+Anguilla: -4 hours
+Antarctica: -2 hours (Local summer -3 hours)
+Antigua: -4 hours
+Argentina: -3 hours
+Argentina western prov: -4 hours
+Armenia: +4 hours (Local summer +5 hours)
+Aruba: -4 hours
+Ascension: 0 hours
+Australia Northern Territory: +9.5 hours
+Australia Lord Howe Island: +10.5 hours (Local summer +11 hours)
+Australia New South Wales: +10 hours (Local summer +11 hours)
+Australia Queensland: +10 hours
+Australia Victoria: +10 hours (Local summer +11 hours)
+Australia Australian Captial Territory: +10 hours (Local summer +11 hours)
+Australia South: +9.5 hours (Local summer +10.5 hours)
+Australia Tasmania: +10 hours (Local summer +11 hours)
+Australia Western: +8 hours
+Austria: +1 hours (Local summer +2 hours)
+Azerbajian: +3 hours
+Azores: -1 hours (Local summer 0 hours)
+Bahamas: -5 hours (Local summer -4 hours)
+Bahrain: +3 hours
+Balearic Islands: +1 hours (Local summer +2 hours)
+Bangladesh: +6 hours
+Barbados: -4 hours
+Belarus: +2 hours (Local summer +3 hours)
+Belgium: +1 hours (Local summer +2 hours)
+Belize: -6 hours
+Benin: +1 hours
+Bermuda: -4 hours (Local summer -3 hours)
+Bhutan: +6 hours
+Bolivia: -4 hours
+Bonaire: -4 hours
+Bosnia Hercegovina: +1 hours (Local summer +2 hours)
+Botswana: +2 hours
+Brazil Acre: -4 hours (Local summer -5 hours)
+Brazil Atlantic Islands: -1 hours (Local summer -2 hours)
+Brazil East: -3 hours (Local summer -1 hours)
+Brazil West: -4 hours (Local summer -3 hours)
+British Virgin Islands: -4 hours
+Brunei: +8 hours
+Bulgaria: +2 hours (Local summer +3 hours)
+Burkina Faso: 0 hours
+Burundi: +2 hours
+Cambodia: +7 hours
+Cameroon: +1 hours
+Canada Central: -6 hours (Local summer -5 hours)
+Canada Eastern: -5 hours (Local summer -4 hours)
+Canada Mountain: -7 hours (Local summer -6 hours)
+Canada Yukon & Pacific: -8 hours (Local summer -7 hours)
+Canada Atlantic: -4 hours (Local summer -3 hours)
+Canada Newfoundland: -3.5 hours (Local summer -2.5 hours)
+Canary Islands: 0 hours (Local summer +1 hours)
+Canton Enderbury Islands: -11 hours
+Cape Verde: -1 hours
+Caroline Island: +11 hours
+Cayman Islands: -5 hours
+Central African Rep: +1 hours
+Chad: +1 hours
+Channel Islands: 0 hours (Local summer +1 hours)
+Chatham Island: +12.75 hours (Local summer +13.75 hours)
+Chile: -4 hours (Local summer -3 hours)
+China People's Rep: +8 hours
+Christmas Islands: -10 hours
+Cocos (Keeling) Islands: ( hours (Local summer ) hours)
+Colombia: -5 hours
+Congo: +1 hours
+Cook Islands: -10 hours
+Costa Rica: -6 hours
+Cote d'Ivoire: 0 hours
+Croatia: +1 hours (Local summer +2 hours)
+Cuba: -5 hours (Local summer -4 hours)
+Curacao: -4 hours
+Cyprus: +2 hours (Local summer +3 hours)
+Czech Republic: +1 hours (Local summer +2 hours)
+Dahomey: +1 hours
+Denmark: +1 hours (Local summer +2 hours)
+Djibouti: +3 hours
+Dominica: -4 hours
+Dominican Republic: -4 hours
+Easter Island: -6 hours (Local summer -5 hours)
+Ecuador: -5 hours
+Egypt: +2 hours (Local summer +3 hours)
+El Salvador: -6 hours
+England: 0 hours (Local summer +1 hours)
+Equitorial Guinea: +1 hours
+Eritrea: +3 hours
+Estonia: +2 hours (Local summer +3 hours)
+Ethiopia: +3 hours
+Falkland Islands: -4 hours (Local summer -3 hours)
+Faroe Island: 0 hours (Local summer +1 hours)
+Fiji: +12 hours
+Finland: +2 hours (Local summer +3 hours)
+France: +1 hours (Local summer +2 hours)
+French Guiana: -3 hours
+French Polynesia: -10 hours
+Gabon: +1 hours
+Galapagos Islands: -6 hours
+Gambia: 0 hours
+Gambier Island: -9 hours
+Georgia: +4 hours
+Germany: +1 hours (Local summer +2 hours)
+Ghana: 0 hours
+Gibraltar: +1 hours (Local summer +2 hours)
+Greece: +2 hours (Local summer +3 hours)
+Greenland: -3 hours (Local summer -2 hours)
+Greenland Thule: -4 hours (Local summer -3 hours)
+Greenland Scoresbysun: -1 hours (Local summer 0 hours)
+Grenada: -4 hours
+Grenadines: -4 hours
+Guadeloupe: -4 hours
+Guam: +10 hours
+Guatemala: -6 hours
+Guinea: 0 hours
+Guinea Bissau: - hours (Local summer 0 hours)
+Guyana: -3 hours
+Haiti: -5 hours (Local summer -4 hours)
+Honduras: -6 hours
+Hong kong: +8 hours
+Hungary: +1 hours (Local summer +2 hours)
+Iceland: 0 hours
+India: +5.5 hours
+Indonesia Central: +8 hours
+Indonesia East: +9 hours
+Indonesia West: +7 hours
+Iran: +3.5 hours
+Iraq: +3 hours (Local summer +4 hours)
+Ireland Republic of: 0 hours (Local summer +1 hours)
+Israel: +2 hours (Local summer +3 hours)
+Italy: +1 hours (Local summer +2 hours)
+Jamaica: -5 hours
+Japan: +9 hours
+Johnston Island: -10 hours
+Jordan: +2 hours (Local summer +3 hours)
+Kazakhstan: +6 hours (Local summer +7 hours)
+Kenya: +3 hours
+Kiribati: +12 hours
+Korea Dem Republic of: +9 hours
+Korea Republic of: +9 hours
+Kusaie: +12 hours
+Kuwait: +3 hours
+Kwajalein: -12 hours
+Kyrgyzstan: +5 hours (Local summer +6 hours)
+Laos: +7 hours
+Latvia: +2 hours (Local summer +3 hours)
+Lebanon: +2 hours (Local summer +3 hours)
+Leeward Islands: -4 hours
+Lesotho: +2 hours
+Liberia: 0 hours
+Libya: +2 hours
+Lithuania: +2 hours (Local summer +3 hours)
+Luxembourg: +1 hours (Local summer +2 hours)
+Macedonia: +1 hours (Local summer +2 hours)
+Madagascar: +3 hours
+Madeira: 0 hours (Local summer +1 hours)
+Malawi: +2 hours
+Malaysia: +8 hours
+Maldives: +5 hours
+Mali: 0 hours
+Mallorca Islands: +1 hours (Local summer +2 hours)
+Malta: +1 hours (Local summer +2 hours)
+Mariana Island: +10 hours
+Marquesas Islands: -9.5 hours
+Marshall Islands: +12 hours
+Martinique: -4 hours
+Mauritania: 0 hours
+Mauritius: +4 hours
+Mayotte: +3 hours
+Melilla: +1 hours (Local summer +2 hours)
+Mexico: -6 hours
+Mexico Baja Calif Norte: -8 hours (Local summer -7 hours)
+Mexico Nayarit: -7 hours
+Mexico Sinaloa: -7 hours
+Mexico Sonora: -7 hours
+Midway Island: -11 hours
+Moldova: +2 hours (Local summer +3 hours)
+Moldovian Rep Pridnestrovye: +2 hours (Local summer +3 hours)
+Monaco: +1 hours (Local summer +2 hours)
+Mongolia: +8 hours
+Morocco: 0 hours
+Mozambique: +2 hours
+Myanmar: +6.5 hours
+Namibia: +1 hours (Local summer +2 hours)
+Nauru Republic of: +12 hours
+Nepal: +5.75 hours
+Netherlands: +1 hours (Local summer +2 hours)
+Netherlands Antilles: -4 hours
+Nevis Montserrat: -4 hours
+New Caledonia: +11 hours
+New Hebrides: +11 hours
+New Zealand: +12 hours (Local summer +13 hours)
+Nicaragua: -6 hours (Local summer -5 hours)
+Niger: +1 hours
+Nigeria: +1 hours
+Niue Island: -11 hours
+Norfolk Island: +11.5 hours
+Northern Ireland: 0 hours (Local summer +1 hours)
+Northern Mariana Islands: +10 hours
+Norway: +1 hours (Local summer +2 hours)
+Oman: +4 hours
+Pakistan: +5 hours
+Palau: +9 hours
+Panama: -5 hours
+Papua New Guinea: +10 hours
+Paraguay: -4 hours (Local summer -3 hours)
+Peru: -5 hours
+Philippines: +8 hours
+Pingelap: +12 hours
+Poland: +1 hours (Local summer +2 hours)
+Ponape Island: +11 hours
+Portugal: +1 hours (Local summer +2 hours)
+Principe Island: 0 hours
+Puerto Rico: -4 hours
+Qatar: +3 hours
+Reunion: +4 hours
+Romania: +2 hours (Local summer +3 hours)
+Russian Federation zone eight: +9 hours (Local summer +10 hours)
+Russian Federation zone eleven: +12 hours (Local summer +13 hours)
+Russian Federation zone five: +6 hours (Local summer +7 hours)
+Russian Federation zone four: +5 hours (Local summer +6 hours)
+Russian Federation zone nine: +10 hours (Local summer +11 hours)
+Russian Federation zone one: +2 hours (Local summer +3 hours)
+Russian Federation zone seven: +8 hours (Local summer +9 hours)
+Russian Federation zone six: +7 hours (Local summer +8 hours)
+Russian Federation zone ten: +11 hours (Local summer +12 hours)
+Russian Federation zone three: +4 hours (Local summer +5 hours)
+Russian Federation zone two: +4 hours (Local summer +5 hours)
+Rwanda: +2 hours
+Saba: -4 hours
+Samoa: -11 hours
+San Marino: +1 hours (Local summer +2 hours)
+Sao Tome e Principe: 0 hours
+Saudi Arabia: +3 hours
+Scotland: 0 hours
+Senegal: 0 hours
+Seychelles: +4 hours
+Sierra Leone: 0 hours
+Singapore: +8 hours
+Slovakia: +1 hours (Local summer +2 hours)
+Slovenia: +1 hours (Local summer +2 hours)
+Society Island: -10 hours
+Solomon Islands: +11 hours
+Somalia: +3 hours
+South Africa: +2 hours
+Spain: +1 hours (Local summer +2 hours)
+Sri Lanka: +5.5 hours
+St Christopher: -4 hours
+St Croix: -4 hours
+St Helena: 0 hours
+St John: -4 hours
+St Kitts Nevis: -4 hours
+St Lucia: -4 hours
+St Maarten: -4 hours
+St Pierre & Miquelon: -3 hours (Local summer -2 hours)
+St Thomas: -4 hours
+St Vincent: -4 hours
+Sudan: +2 hours
+Suriname: -3 hours
+Swaziland: +2 hours
+Sweden: +1 hours (Local summer +2 hours)
+Switzerland: +1 hours (Local summer +2 hours)
+Syria: +2 hours (Local summer +3 hours)
+Tahiti: -10 hours
+Taiwan: +8 hours
+Tajikistan: +6 hours
+Tanzania: +3 hours
+Thailand: +7 hours
+Togo: 0 hours
+Tonga: +13 hours
+Trinidad and Tobago: -4 hours
+Tuamotu Island: -10 hours
+Tubuai Island: -10 hours
+Tunisia: +1 hours
+Turkey: +2 hours (Local summer +3 hours)
+Turkmenistan: +5 hours
+Turks and Caicos Islands: -5 hours (Local summer -4 hours)
+Tuvalu: +12 hours
+Uganda: +3 hours
+Ukraine: +2 hours (Local summer +3 hours)
+United Arab Emirates: +4 hours
+United Kingdom: 0 hours (Local summer +1 hours)
+USA Central: -6 hours (Local summer -5 hours)
+USA Eastern: -5 hours (Local summer -4 hours)
+USA Mountain: -7 hours (Local summer -6 hours)
+USA Arizona: -7 hours
+USA Indiana East: -5 hours
+USA Pacific: -8 hours (Local summer -7 hours)
+USA Alaska: -9 hours (Local summer -8 hours)
+USA Hawaii Aleutian: - hours (Local summer -10 hours)
+Uruguay: -3 hours
+Uzbekistan: +5 hours
+Vanuatu: +11 hours (Local summer +12 hours)
+Vatican City: +1 hours (Local summer +2 hours)
+Venezuela: -4 hours
+Vietnam: +7 hours
+Virgin Islands: -4 hours
+Wake Island: +12 hours
+Wales: 0 hours (Local summer +1 hours)
+Wallis and Futuna Islands: +12 hours
+Windward Islands: -4 hours
+Yemen: +3 hours
+Yugoslavia: +1 hours (Local summer +2 hours)
+Zaire Kasai: +2 hours
+Zaire Kinshasa Mbandaka: +1 hours
+Zaire Haut Zaire: +2 hours
+Zaire Kivu: +2 hours
+Zaire Shaba: +2 hours
+Zambia: +2 hours
+Zimbabwe: +2 hours
+All timezone information is non-authoritative...
Index: vendor/tzcode/tzcode2009h/unused/usno1997
===================================================================
--- vendor/tzcode/tzcode2009h/unused/usno1997	(nonexistent)
+++ vendor/tzcode/tzcode2009h/unused/usno1997	(revision 192888)
@@ -0,0 +1,327 @@
+# @(#)usno1997	8.1
+#
+# From Arthur David Olson (1997-03-07):
+#
+# Here's time zone information from the United States Naval Observatory
+# via http://tycho.usno.navy.mil/tzones.html. See USNO's note at the end.
+Unofficial Time Zone Information
+World Time Zones
+For selected countries, the local standard time offset from UTC is given, with  daylight savings time where observed.
+Time:  Fri Mar  7 22:38:58 UTC 1997
+Afghanistan: +4.5 hours
+Albania: +1 hours (Local summer +2 hours)
+Algeria: +1 hours (Local summer +2 hours)
+American Samoa: -11 hours
+Andorra: +1 hours (Local summer +2 hours)
+Angola: +1 hours
+Anguilla: -4 hours
+Antarctica: -2 hours (Local summer -3 hours)
+Antigua: -4 hours
+Argentina: -3 hours
+Argentina western prov: -4 hours
+Armenia: +4 hours (Local summer +5 hours)
+Aruba: -4 hours
+Ascension: 0 hours
+Australia Northern Territory: +9.5 hours
+Australia Lord Howe Island: +10.5 hours (Local summer +11 hours)
+Australia New South Wales: +10 hours (Local summer +11 hours)
+Australia Queensland: +10 hours
+Australia Victoria: +10 hours (Local summer +11 hours)
+Australia Australian Captial Territory: +10 hours (Local summer +11 hours)
+Australia South: +9.5 hours (Local summer +10.5 hours)
+Australia Tasmania: +10 hours (Local summer +11 hours)
+Australia Western: +8 hours
+Austria: +1 hours (Local summer +2 hours)
+Azerbajian: +3 hours
+Azores: -1 hours (Local summer 0 hours)
+Bahamas: -5 hours (Local summer -4 hours)
+Bahrain: +3 hours
+Balearic Islands: +1 hours (Local summer +2 hours)
+Bangladesh: +6 hours
+Barbados: -4 hours
+Belarus: +2 hours (Local summer +3 hours)
+Belgium: +1 hours (Local summer +2 hours)
+Belize: -6 hours
+Benin: +1 hours
+Bermuda: -4 hours (Local summer -3 hours)
+Bhutan: +6 hours
+Bolivia: -4 hours
+Bonaire: -4 hours
+Bosnia Hercegovina: +1 hours (Local summer +2 hours)
+Botswana: +2 hours
+Brazil Acre: -4 hours (Local summer -5 hours)
+Brazil Atlantic Islands: -1 hours (Local summer -2 hours)
+Brazil East: -3 hours (Local summer -1 hours)
+Brazil West: -4 hours (Local summer -3 hours)
+British Virgin Islands: -4 hours
+Brunei: +8 hours
+Bulgaria: +2 hours (Local summer +3 hours)
+Burkina Faso: 0 hours
+Burundi: +2 hours
+Cambodia: +7 hours
+Cameroon: +1 hours
+Canada Central: -6 hours (Local summer -5 hours)
+Canada Eastern: -5 hours (Local summer -4 hours)
+Canada Mountain: -7 hours (Local summer -6 hours)
+Canada Yukon & Pacific: -8 hours (Local summer -7 hours)
+Canada Atlantic: -4 hours (Local summer -3 hours)
+Canada Newfoundland: -3.5 hours (Local summer -2.5 hours)
+Canary Islands: 0 hours (Local summer +1 hours)
+Canton Enderbury Islands: -11 hours
+Cape Verde: -1 hours
+Caroline Island: +11 hours
+Cayman Islands: -5 hours
+Central African Rep: +1 hours
+Chad: +1 hours
+Channel Islands: 0 hours (Local summer +1 hours)
+Chatham Island: +12.75 hours (Local summer +13.75 hours)
+Chile: -4 hours (Local summer -3 hours)
+China People's Rep: +8 hours
+Christmas Islands: -10 hours
+Cocos (Keeling) Islands: ( hours (Local summer ) hours)
+Colombia: -5 hours
+Congo: +1 hours
+Cook Islands: -10 hours
+Costa Rica: -6 hours
+Cote d'Ivoire: 0 hours
+Croatia: +1 hours (Local summer +2 hours)
+Cuba: -5 hours (Local summer -4 hours)
+Curacao: -4 hours
+Cyprus: +2 hours (Local summer +3 hours)
+Czech Republic: +1 hours (Local summer +2 hours)
+Dahomey: +1 hours
+Denmark: +1 hours (Local summer +2 hours)
+Djibouti: +3 hours
+Dominica: -4 hours
+Dominican Republic: -4 hours
+Easter Island: -6 hours (Local summer -5 hours)
+Ecuador: -5 hours
+Egypt: +2 hours (Local summer +3 hours)
+El Salvador: -6 hours
+England: 0 hours (Local summer +1 hours)
+Equitorial Guinea: +1 hours
+Eritrea: +3 hours
+Estonia: +2 hours (Local summer +3 hours)
+Ethiopia: +3 hours
+Falkland Islands: -4 hours (Local summer -3 hours)
+Faroe Island: 0 hours (Local summer +1 hours)
+Fiji: +12 hours
+Finland: +2 hours (Local summer +3 hours)
+France: +1 hours (Local summer +2 hours)
+French Guiana: -3 hours
+French Polynesia: -10 hours
+Gabon: +1 hours
+Galapagos Islands: -5 hours
+Gambia: 0 hours
+Gambier Island: -9 hours
+Georgia: +4 hours
+Germany: +1 hours (Local summer +2 hours)
+Ghana: 0 hours
+Gibraltar: +1 hours (Local summer +2 hours)
+Greece: +2 hours (Local summer +3 hours)
+Greenland: -3 hours (Local summer -2 hours)
+Greenland Thule: -4 hours (Local summer -3 hours)
+Greenland Scoresbysun: -1 hours (Local summer 0 hours)
+Grenada: -4 hours
+Grenadines: -4 hours
+Guadeloupe: -4 hours
+Guam: +10 hours
+Guatemala: -6 hours
+Guinea: 0 hours
+Guinea Bissau: - hours (Local summer 0 hours)
+Guyana: -3 hours
+Haiti: -5 hours (Local summer -4 hours)
+Honduras: -6 hours
+Hong kong: +8 hours
+Hungary: +1 hours (Local summer +2 hours)
+Iceland: 0 hours
+India: +5.5 hours
+Indonesia Central: +8 hours
+Indonesia East: +9 hours
+Indonesia West: +7 hours
+Iran: +3.5 hours
+Iraq: +3 hours (Local summer +4 hours)
+Ireland Republic of: 0 hours (Local summer +1 hours)
+Israel: +2 hours (Local summer +3 hours)
+Italy: +1 hours (Local summer +2 hours)
+Jamaica: -5 hours
+Japan: +9 hours
+Johnston Island: -10 hours
+Jordan: +2 hours (Local summer +3 hours)
+Kazakhstan: +6 hours (Local summer +7 hours)
+Kenya: +3 hours
+Kiribati: +12 hours
+Korea Dem Republic of: +9 hours
+Korea Republic of: +9 hours
+Kusaie: +12 hours
+Kuwait: +3 hours
+Kwajalein: -12 hours
+Kyrgyzstan: +5 hours (Local summer +6 hours)
+Laos: +7 hours
+Latvia: +2 hours (Local summer +3 hours)
+Lebanon: +2 hours (Local summer +3 hours)
+Leeward Islands: -4 hours
+Lesotho: +2 hours
+Liberia: 0 hours
+Libya: +2 hours
+Lithuania: +2 hours (Local summer +3 hours)
+Luxembourg: +1 hours (Local summer +2 hours)
+Macedonia: +1 hours (Local summer +2 hours)
+Madagascar: +3 hours
+Madeira: 0 hours (Local summer +1 hours)
+Malawi: +2 hours
+Malaysia: +8 hours
+Maldives: +5 hours
+Mali: 0 hours
+Mallorca Islands: +1 hours (Local summer +2 hours)
+Malta: +1 hours (Local summer +2 hours)
+Mariana Island: +10 hours
+Marquesas Islands: -9.5 hours
+Marshall Islands: +12 hours
+Martinique: -4 hours
+Mauritania: 0 hours
+Mauritius: +4 hours
+Mayotte: +3 hours
+Melilla: +1 hours (Local summer +2 hours)
+Mexico: -6 hours
+Mexico Baja Calif Norte: -8 hours (Local summer -7 hours)
+Mexico Nayarit: -7 hours
+Mexico Sinaloa: -7 hours
+Mexico Sonora: -7 hours
+Midway Island: -11 hours
+Moldova: +2 hours (Local summer +3 hours)
+Moldovian Rep Pridnestrovye: +2 hours (Local summer +3 hours)
+Monaco: +1 hours (Local summer +2 hours)
+Mongolia: +8 hours
+Morocco: 0 hours
+Mozambique: +2 hours
+Myanmar: +6.5 hours
+Namibia: +1 hours (Local summer +2 hours)
+Nauru Republic of: +12 hours
+Nepal: +5.75 hours
+Netherlands: +1 hours (Local summer +2 hours)
+Netherlands Antilles: -4 hours
+Nevis Montserrat: -4 hours
+New Caledonia: +11 hours
+New Hebrides: +11 hours
+New Zealand: +12 hours (Local summer +13 hours)
+Nicaragua: -6 hours (Local summer -5 hours)
+Niger: +1 hours
+Nigeria: +1 hours
+Niue Island: -11 hours
+Norfolk Island: +11.5 hours
+Northern Ireland: 0 hours (Local summer +1 hours)
+Northern Mariana Islands: +10 hours
+Norway: +1 hours (Local summer +2 hours)
+Oman: +4 hours
+Pakistan: +5 hours
+Palau: +9 hours
+Panama: -5 hours
+Papua New Guinea: +10 hours
+Paraguay: -4 hours (Local summer -3 hours)
+Peru: -5 hours
+Philippines: +8 hours
+Pingelap: +12 hours
+Poland: +1 hours (Local summer +2 hours)
+Ponape Island: +11 hours
+Portugal: +1 hours (Local summer +2 hours)
+Principe Island: 0 hours
+Puerto Rico: -4 hours
+Qatar: +3 hours
+Reunion: +4 hours
+Romania: +2 hours (Local summer +3 hours)
+Russian Federation zone eight: +9 hours (Local summer +10 hours)
+Russian Federation zone eleven: +12 hours (Local summer +13 hours)
+Russian Federation zone five: +6 hours (Local summer +7 hours)
+Russian Federation zone four: +5 hours (Local summer +6 hours)
+Russian Federation zone nine: +10 hours (Local summer +11 hours)
+Russian Federation zone one: +2 hours (Local summer +3 hours)
+Russian Federation zone seven: +8 hours (Local summer +9 hours)
+Russian Federation zone six: +7 hours (Local summer +8 hours)
+Russian Federation zone ten: +11 hours (Local summer +12 hours)
+Russian Federation zone three: +4 hours (Local summer +5 hours)
+Russian Federation zone two: +4 hours (Local summer +5 hours)
+Rwanda: +2 hours
+Saba: -4 hours
+Samoa: -11 hours
+San Marino: +1 hours (Local summer +2 hours)
+Sao Tome e Principe: 0 hours
+Saudi Arabia: +3 hours
+Scotland: 0 hours (Local summer +1 hours)
+Senegal: 0 hours
+Seychelles: +4 hours
+Sierra Leone: 0 hours
+Singapore: +8 hours
+Slovakia: +1 hours (Local summer +2 hours)
+Slovenia: +1 hours (Local summer +2 hours)
+Society Island: -10 hours
+Solomon Islands: +11 hours
+Somalia: +3 hours
+South Africa: +2 hours
+Spain: +1 hours (Local summer +2 hours)
+Sri Lanka: +5.5 hours
+St Christopher: -4 hours
+St Croix: -4 hours
+St Helena: 0 hours
+St John: -4 hours
+St Kitts Nevis: -4 hours
+St Lucia: -4 hours
+St Maarten: -4 hours
+St Pierre & Miquelon: -3 hours (Local summer -2 hours)
+St Thomas: -4 hours
+St Vincent: -4 hours
+Sudan: +2 hours
+Suriname: -3 hours
+Swaziland: +2 hours
+Sweden: +1 hours (Local summer +2 hours)
+Switzerland: +1 hours (Local summer +2 hours)
+Syria: +2 hours (Local summer +3 hours)
+Tahiti: -10 hours
+Taiwan: +8 hours
+Tajikistan: +6 hours
+Tanzania: +3 hours
+Thailand: +7 hours
+Togo: 0 hours
+Tonga: +13 hours
+Trinidad and Tobago: -4 hours
+Tuamotu Island: -10 hours
+Tubuai Island: -10 hours
+Tunisia: +1 hours
+Turkey: +2 hours (Local summer +3 hours)
+Turkmenistan: +5 hours
+Turks and Caicos Islands: -5 hours (Local summer -4 hours)
+Tuvalu: +12 hours
+Uganda: +3 hours
+Ukraine: +2 hours (Local summer +3 hours)
+United Arab Emirates: +4 hours
+United Kingdom: 0 hours (Local summer +1 hours)
+USA Central: -6 hours (Local summer -5 hours)
+USA Eastern: -5 hours (Local summer -4 hours)
+USA Mountain: -7 hours (Local summer -6 hours)
+USA Arizona: -7 hours
+USA Indiana East: -5 hours
+USA Pacific: -8 hours (Local summer -7 hours)
+USA Alaska: -9 hours (Local summer -8 hours)
+USA Aleutian: -10 hours
+USA Hawaii: -10 hours
+Uruguay: -3 hours
+Uzbekistan: +5 hours
+Vanuatu: +11 hours (Local summer +12 hours)
+Vatican City: +1 hours (Local summer +2 hours)
+Venezuela: -4 hours
+Vietnam: +7 hours
+Virgin Islands: -4 hours
+Wake Island: +12 hours
+Wales: 0 hours (Local summer +1 hours)
+Wallis and Futuna Islands: +12 hours
+Windward Islands: -4 hours
+Yemen: +3 hours
+Yugoslavia: +1 hours (Local summer +2 hours)
+Zaire Kasai: +2 hours
+Zaire Kinshasa Mbandaka: +1 hours
+Zaire Haut Zaire: +2 hours
+Zaire Kivu: +2 hours
+Zaire Shaba: +2 hours
+Zambia: +2 hours
+Zimbabwe: +2 hours
+All timezone information is non-authoritative...
Index: vendor/tzcode/tzcode2009h/unused/usno1998
===================================================================
--- vendor/tzcode/tzcode2009h/unused/usno1998	(nonexistent)
+++ vendor/tzcode/tzcode2009h/unused/usno1998	(revision 192888)
@@ -0,0 +1,327 @@
+# @(#)usno1998	8.1
+#
+# From Arthur David Olson (1998-05-26):
+#
+# Here's time zone information from the United States Naval Observatory
+# via http://tycho.usno.navy.mil/tzones.html. See USNO's note at the end.
+Unofficial Time Zone Information
+World Time Zones
+For selected countries, the local standard time offset from UTC is given, with  daylight savings time where observed.
+Time:  Mon May 25 21:14:24 UTC 1998
+Afghanistan: +4.5 hours
+Albania: +1 hours (Local summer +2 hours)
+Algeria: +1 hours (Local summer +2 hours)
+American Samoa: -11 hours
+Andorra: +1 hours (Local summer +2 hours)
+Angola: +1 hours
+Anguilla: -4 hours
+Antarctica: -2 hours (Local summer -3 hours)
+Antigua: -4 hours
+Argentina: -3 hours
+Argentina western prov: -4 hours
+Armenia: +4 hours (Local summer +5 hours)
+Aruba: -4 hours
+Ascension: 0 hours
+Australia Northern Territory: +9.5 hours
+Australia Lord Howe Island: +10.5 hours (Local summer +11 hours)
+Australia New South Wales: +10 hours (Local summer +11 hours)
+Australia Queensland: +10 hours
+Australia Victoria: +10 hours (Local summer +11 hours)
+Australia Australian Captial Territory: +10 hours (Local summer +11 hours)
+Australia South: +9.5 hours (Local summer +10.5 hours)
+Australia Tasmania: +10 hours (Local summer +11 hours)
+Australia Western: +8 hours
+Austria: +1 hours (Local summer +2 hours)
+Azerbajian: +3 hours
+Azores: -1 hours (Local summer 0 hours)
+Bahamas: -5 hours (Local summer -4 hours)
+Bahrain: +3 hours
+Balearic Islands: +1 hours (Local summer +2 hours)
+Bangladesh: +6 hours
+Barbados: -4 hours
+Belarus: +2 hours (Local summer +3 hours)
+Belgium: +1 hours (Local summer +2 hours)
+Belize: -6 hours
+Benin: +1 hours
+Bermuda: -4 hours (Local summer -3 hours)
+Bhutan: +6 hours
+Bolivia: -4 hours
+Bonaire: -4 hours
+Bosnia Hercegovina: +1 hours (Local summer +2 hours)
+Botswana: +2 hours
+Brazil Acre: -4 hours (Local summer -5 hours)
+Brazil Atlantic Islands: -1 hours (Local summer -2 hours)
+Brazil East: -3 hours (Local summer -1 hours)
+Brazil West: -4 hours (Local summer -3 hours)
+British Virgin Islands: -4 hours
+Brunei: +8 hours
+Bulgaria: +2 hours (Local summer +3 hours)
+Burkina Faso: 0 hours
+Burundi: +2 hours
+Cambodia: +7 hours
+Cameroon: +1 hours
+Canada Central: -6 hours (Local summer -5 hours)
+Canada Eastern: -5 hours (Local summer -4 hours)
+Canada Mountain: -7 hours (Local summer -6 hours)
+Canada Yukon & Pacific: -8 hours (Local summer -7 hours)
+Canada Atlantic: -4 hours (Local summer -3 hours)
+Canada Newfoundland: -3.5 hours (Local summer -2.5 hours)
+Canary Islands: 0 hours (Local summer +1 hours)
+Canton Enderbury Islands: -11 hours
+Cape Verde: -1 hours
+Caroline Island: +11 hours
+Cayman Islands: -5 hours
+Central African Rep: +1 hours
+Chad: +1 hours
+Channel Islands: 0 hours (Local summer +1 hours)
+Chatham Island: +12.75 hours (Local summer +13.75 hours)
+Chile: -4 hours (Local summer -3 hours)
+China People's Rep: +8 hours
+Christmas Islands: -10 hours
+Cocos (Keeling) Islands: ( hours (Local summer ) hours)
+Colombia: -5 hours
+Congo: +1 hours
+Cook Islands: -10 hours
+Costa Rica: -6 hours
+Cote d'Ivoire: 0 hours
+Croatia: +1 hours (Local summer +2 hours)
+Cuba: -5 hours (Local summer -4 hours)
+Curacao: -4 hours
+Cyprus: +2 hours (Local summer +3 hours)
+Czech Republic: +1 hours (Local summer +2 hours)
+Dahomey: +1 hours
+Denmark: +1 hours (Local summer +2 hours)
+Djibouti: +3 hours
+Dominica: -4 hours
+Dominican Republic: -4 hours
+Easter Island: -6 hours (Local summer -5 hours)
+Ecuador: -5 hours
+Egypt: +2 hours (Local summer +3 hours)
+El Salvador: -6 hours
+England: 0 hours (Local summer +1 hours)
+Equitorial Guinea: +1 hours
+Eritrea: +3 hours
+Estonia: +2 hours (Local summer +3 hours)
+Ethiopia: +3 hours
+Falkland Islands: -4 hours (Local summer -3 hours)
+Faroe Island: 0 hours (Local summer +1 hours)
+Fiji: +12 hours
+Finland: +2 hours (Local summer +3 hours)
+France: +1 hours (Local summer +2 hours)
+French Guiana: -3 hours
+French Polynesia: -10 hours
+Gabon: +1 hours
+Galapagos Islands: -5 hours
+Gambia: 0 hours
+Gambier Island: -9 hours
+Georgia: +4 hours
+Germany: +1 hours (Local summer +2 hours)
+Ghana: 0 hours
+Gibraltar: +1 hours (Local summer +2 hours)
+Greece: +2 hours (Local summer +3 hours)
+Greenland: -3 hours (Local summer -2 hours)
+Greenland Thule: -4 hours (Local summer -3 hours)
+Greenland Scoresbysun: -1 hours (Local summer 0 hours)
+Grenada: -4 hours
+Grenadines: -4 hours
+Guadeloupe: -4 hours
+Guam: +10 hours
+Guatemala: -6 hours
+Guinea: 0 hours
+Guinea Bissau: - hours (Local summer 0 hours)
+Guyana: -3 hours
+Haiti: -5 hours (Local summer -4 hours)
+Honduras: -6 hours
+Hong kong: +8 hours
+Hungary: +1 hours (Local summer +2 hours)
+Iceland: 0 hours
+India: +5.5 hours
+Indonesia Central: +8 hours
+Indonesia East: +9 hours
+Indonesia West: +7 hours
+Iran: +3.5 hours
+Iraq: +3 hours (Local summer +4 hours)
+Ireland Republic of: 0 hours (Local summer +1 hours)
+Israel: +2 hours (Local summer +3 hours)
+Italy: +1 hours (Local summer +2 hours)
+Jamaica: -5 hours
+Japan: +9 hours
+Johnston Island: -10 hours
+Jordan: +2 hours (Local summer +3 hours)
+Kazakhstan: +6 hours (Local summer +7 hours)
+Kenya: +3 hours
+Kiribati: +12 hours
+Korea Dem Republic of: +9 hours
+Korea Republic of: +9 hours
+Kusaie: +12 hours
+Kuwait: +3 hours
+Kwajalein: -12 hours
+Kyrgyzstan: +5 hours (Local summer +6 hours)
+Laos: +7 hours
+Latvia: +2 hours (Local summer +3 hours)
+Lebanon: +2 hours (Local summer +3 hours)
+Leeward Islands: -4 hours
+Lesotho: +2 hours
+Liberia: 0 hours
+Libya: +2 hours
+Lithuania: +2 hours (Local summer +3 hours)
+Luxembourg: +1 hours (Local summer +2 hours)
+Macedonia: +1 hours (Local summer +2 hours)
+Madagascar: +3 hours
+Madeira: 0 hours (Local summer +1 hours)
+Malawi: +2 hours
+Malaysia: +8 hours
+Maldives: +5 hours
+Mali: 0 hours
+Mallorca Islands: +1 hours (Local summer +2 hours)
+Malta: +1 hours (Local summer +2 hours)
+Mariana Island: +10 hours
+Marquesas Islands: -9.5 hours
+Marshall Islands: +12 hours
+Martinique: -4 hours
+Mauritania: 0 hours
+Mauritius: +4 hours
+Mayotte: +3 hours
+Melilla: +1 hours (Local summer +2 hours)
+Mexico: -6 hours
+Mexico Baja Calif Norte: -8 hours (Local summer -7 hours)
+Mexico Nayarit: -7 hours
+Mexico Sinaloa: -7 hours
+Mexico Sonora: -7 hours
+Midway Island: -11 hours
+Moldova: +2 hours (Local summer +3 hours)
+Moldovian Rep Pridnestrovye: +2 hours (Local summer +3 hours)
+Monaco: +1 hours (Local summer +2 hours)
+Mongolia: +8 hours
+Morocco: 0 hours
+Mozambique: +2 hours
+Myanmar: +6.5 hours
+Namibia: +1 hours (Local summer +2 hours)
+Nauru Republic of: +12 hours
+Nepal: +5.75 hours
+Netherlands: +1 hours (Local summer +2 hours)
+Netherlands Antilles: -4 hours
+Nevis Montserrat: -4 hours
+New Caledonia: +11 hours
+New Hebrides: +11 hours
+New Zealand: +12 hours (Local summer +13 hours)
+Nicaragua: -6 hours (Local summer -5 hours)
+Niger: +1 hours
+Nigeria: +1 hours
+Niue Island: -11 hours
+Norfolk Island: +11.5 hours
+Northern Ireland: 0 hours (Local summer +1 hours)
+Northern Mariana Islands: +10 hours
+Norway: +1 hours (Local summer +2 hours)
+Oman: +4 hours
+Pakistan: +5 hours
+Palau: +9 hours
+Panama: -5 hours
+Papua New Guinea: +10 hours
+Paraguay: -4 hours (Local summer -3 hours)
+Peru: -5 hours
+Philippines: +8 hours
+Pingelap: +12 hours
+Poland: +1 hours (Local summer +2 hours)
+Ponape Island: +11 hours
+Portugal: +1 hours (Local summer +2 hours)
+Principe Island: 0 hours
+Puerto Rico: -4 hours
+Qatar: +3 hours
+Reunion: +4 hours
+Romania: +2 hours (Local summer +3 hours)
+Russian Federation zone eight: +9 hours (Local summer +10 hours)
+Russian Federation zone eleven: +12 hours (Local summer +13 hours)
+Russian Federation zone five: +6 hours (Local summer +7 hours)
+Russian Federation zone four: +5 hours (Local summer +6 hours)
+Russian Federation zone nine: +10 hours (Local summer +11 hours)
+Russian Federation zone one: +2 hours (Local summer +3 hours)
+Russian Federation zone seven: +8 hours (Local summer +9 hours)
+Russian Federation zone six: +7 hours (Local summer +8 hours)
+Russian Federation zone ten: +11 hours (Local summer +12 hours)
+Russian Federation zone three: +4 hours (Local summer +5 hours)
+Russian Federation zone two: +4 hours (Local summer +5 hours)
+Rwanda: +2 hours
+Saba: -4 hours
+Samoa: -11 hours
+San Marino: +1 hours (Local summer +2 hours)
+Sao Tome e Principe: 0 hours
+Saudi Arabia: +3 hours
+Scotland: 0 hours (Local summer +1 hours)
+Senegal: 0 hours
+Seychelles: +4 hours
+Sierra Leone: 0 hours
+Singapore: +8 hours
+Slovakia: +1 hours (Local summer +2 hours)
+Slovenia: +1 hours (Local summer +2 hours)
+Society Island: -10 hours
+Solomon Islands: +11 hours
+Somalia: +3 hours
+South Africa: +2 hours
+Spain: +1 hours (Local summer +2 hours)
+Sri Lanka: +5.5 hours
+St Christopher: -4 hours
+St Croix: -4 hours
+St Helena: 0 hours
+St John: -4 hours
+St Kitts Nevis: -4 hours
+St Lucia: -4 hours
+St Maarten: -4 hours
+St Pierre & Miquelon: -3 hours (Local summer -2 hours)
+St Thomas: -4 hours
+St Vincent: -4 hours
+Sudan: +2 hours
+Suriname: -3 hours
+Swaziland: +2 hours
+Sweden: +1 hours (Local summer +2 hours)
+Switzerland: +1 hours (Local summer +2 hours)
+Syria: +2 hours (Local summer +3 hours)
+Tahiti: -10 hours
+Taiwan: +8 hours
+Tajikistan: +6 hours
+Tanzania: +3 hours
+Thailand: +7 hours
+Togo: 0 hours
+Tonga: +13 hours
+Trinidad and Tobago: -4 hours
+Tuamotu Island: -10 hours
+Tubuai Island: -10 hours
+Tunisia: +1 hours
+Turkey: +2 hours (Local summer +3 hours)
+Turkmenistan: +5 hours
+Turks and Caicos Islands: -5 hours (Local summer -4 hours)
+Tuvalu: +12 hours
+Uganda: +3 hours
+Ukraine: +2 hours (Local summer +3 hours)
+United Arab Emirates: +4 hours
+United Kingdom: 0 hours (Local summer +1 hours)
+USA Central: -6 hours (Local summer -5 hours)
+USA Eastern: -5 hours (Local summer -4 hours)
+USA Mountain: -7 hours (Local summer -6 hours)
+USA Arizona: -7 hours
+USA Indiana East: -5 hours
+USA Pacific: -8 hours (Local summer -7 hours)
+USA Alaska: -9 hours (Local summer -8 hours)
+USA Aleutian: -10 hours
+USA Hawaii: -10 hours
+Uruguay: -3 hours
+Uzbekistan: +5 hours
+Vanuatu: +11 hours (Local summer +12 hours)
+Vatican City: +1 hours (Local summer +2 hours)
+Venezuela: -4 hours
+Vietnam: +7 hours
+Virgin Islands: -4 hours
+Wake Island: +12 hours
+Wales: 0 hours (Local summer +1 hours)
+Wallis and Futuna Islands: +12 hours
+Windward Islands: -4 hours
+Yemen: +3 hours
+Yugoslavia: +1 hours (Local summer +2 hours)
+Zaire Kasai: +2 hours
+Zaire Kinshasa Mbandaka: +1 hours
+Zaire Haut Zaire: +2 hours
+Zaire Kivu: +2 hours
+Zaire Shaba: +2 hours
+Zambia: +2 hours
+Zimbabwe: +2 hours
+All timezone information is non-authoritative...
Index: vendor/tzcode/tzcode2009h/unused/zdump.8.txt
===================================================================
--- vendor/tzcode/tzcode2009h/unused/zdump.8.txt	(nonexistent)
+++ vendor/tzcode/tzcode2009h/unused/zdump.8.txt	(revision 192888)
@@ -0,0 +1,43 @@
+NAME
+
+     zdump - time zone dumper
+
+SYNOPSIS
+     zdump [ --version ] [ -v ] [ -c [loyear,]hiyear ] [ zonename
+     ... ]
+
+DESCRIPTION
+     Zdump prints the current time in each zonename named on the
+     command line.
+
+     These options are available:
+
+     --version
+          Output version information and exit.
+
+     -v   For each zonename on the command line, print the time
+          at the lowest possible time value, the time one day
+          after the lowest possible time value, the times both
+          one second before and exactly at each detected time
+          discontinuity, the time at one day less than the
+          highest possible time value, and the time at the
+          highest possible time value, Each line ends with
+          isdst=1 if the given time is Daylight Saving Time or
+          isdst=0 otherwise.
+
+     -c [loyear,]hiyear
+          Cut off verbose output near the start of the given
+          year(s).  By default, the program cuts off verbose
+          output near the starts of the years -500 and 2500.
+
+LIMITATIONS
+     The -v option may not be used on systems with floating-point
+     time_t values that are neither float nor double.
+
+     Time discontinuities are found by sampling the results
+     returned by localtime at twelve-hour intervals.  This works
+     in all real-world cases; one can construct artificial time
+     zones for which this fails.
+
+SEE ALSO
+     newctime(3), tzfile(5), zic(8)
Index: vendor/tzcode/tzcode2009h/unused/zic.8.txt
===================================================================
--- vendor/tzcode/tzcode2009h/unused/zic.8.txt	(nonexistent)
+++ vendor/tzcode/tzcode2009h/unused/zic.8.txt	(revision 192888)
@@ -0,0 +1,308 @@
+NAME
+
+     zic - time zone compiler
+
+SYNOPSIS
+     zic [ --version ] [ -v ] [ -d directory ] [ -l localtime ] [
+     -p posixrules ] [ -L leapsecondfilename ] [ -s ] [ -y
+     command ] [ filename ... ]
+
+DESCRIPTION
+     Zic reads text from the file(s) named on the command line
+     and creates the time conversion information files specified
+     in this input.  If a filename is -, the standard input is
+     read.
+
+     These options are available:
+
+     --version
+          Output version information and exit.
+
+     -d directory
+          Create time conversion information files in the named
+          directory rather than in the standard directory named
+          below.
+
+     -l timezone
+          Use the given time zone as local time.  Zic will act as
+          if the input contained a link line of the form
+
+               Link timezone       localtime
+
+     -p timezone
+          Use the given time zone's rules when handling POSIX-
+          format time zone environment variables.  Zic will act
+          as if the input contained a link line of the form
+
+               Link timezone       posixrules
+
+     -L leapsecondfilename
+          Read leap second information from the file with the
+          given name.  If this option is not used, no leap second
+          information appears in output files.
+
+     -v   Complain if a year that appears in a data file is
+          outside the range of years representable by time(2)
+          values.  Also complain if a time of 24:00 (which cannot
+          be handled by pre-1998 versions of zic) appears in the
+          input.
+
+     -s   Limit time values stored in output files to values that
+          are the same whether they're taken to be signed or
+          unsigned.  You can use this option to generate SVVS-
+          compatible files.
+
+     -y command
+          Use the given command rather than yearistype when
+          checking year types (see below).
+
+     Input lines are made up of fields.  Fields are separated
+     from one another by any number of white space characters.
+     Leading and trailing white space on input lines is ignored.
+     An unquoted sharp character (#) in the input introduces a
+     comment which extends to the end of the line the sharp
+     character appears on.  White space characters and sharp
+     characters may be enclosed in double quotes (") if they're
+     to be used as part of a field.  Any line that is blank
+     (after comment stripping) is ignored.  Non-blank lines are
+     expected to be of one of three types: rule lines, zone
+     lines, and link lines.
+
+     A rule line has the form
+
+          Rule  NAME  FROM  TO    TYPE  IN   ON       AT    SAVE  LETTER/S
+
+     For example:
+
+          Rule  US    1967  1973  -     Apr  lastSun  2:00  1:00  D
+
+     The fields that make up a rule line are:
+
+     NAME    Gives the (arbitrary) name of the set of rules this
+             rule is part of.
+
+     FROM    Gives the first year in which the rule applies.  Any
+             integer year can be supplied; the Gregorian calendar
+             is assumed.  The word minimum (or an abbreviation)
+             means the minimum year representable as an integer.
+             The word maximum (or an abbreviation) means the
+             maximum year representable as an integer.  Rules can
+             describe times that are not representable as time
+             values, with the unrepresentable times ignored; this
+             allows rules to be portable among hosts with
+             differing time value types.
+
+     TO      Gives the final year in which the rule applies.  In
+             addition to minimum and maximum (as above), the word
+             only (or an abbreviation) may be used to repeat the
+             value of the FROM field.
+
+     TYPE    Gives the type of year in which the rule applies.
+             If TYPE is - then the rule applies in all years
+             between FROM and TO inclusive.  If TYPE is something
+             else, then zic executes the command
+                  yearistype year type
+             to check the type of a year: an exit status of zero
+             is taken to mean that the year is of the given type;
+             an exit status of one is taken to mean that the year
+             is not of the given type.
+
+     IN      Names the month in which the rule takes effect.
+             Month names may be abbreviated.
+
+     ON      Gives the day on which the rule takes effect.
+             Recognized forms include:
+
+                  5        the fifth of the month
+                  lastSun  the last Sunday in the month
+                  lastMon  the last Monday in the month
+                  Sun>=8   first Sunday on or after the eighth
+                  Sun<=25  last Sunday on or before the 25th
+
+             Names of days of the week may be abbreviated or
+             spelled out in full.  Note that there must be no
+             spaces within the ON field.
+     AT      Gives the time of day at which the rule takes
+             effect.  Recognized forms include:
+
+                  2        time in hours
+                  2:00     time in hours and minutes
+                  15:00    24-hour format time (for times after noon)
+                  1:28:14  time in hours, minutes, and seconds
+                  -        equivalent to 0
+
+             where hour 0 is midnight at the start of the day,
+             and hour 24 is midnight at the end of the day.  Any
+             of these forms may be followed by the letter w if
+             the given time is local "wall clock" time, s if the
+             given time is local "standard" time, or u (or g or
+             z) if the given time is universal time; in the
+             absence of an indicator, wall clock time is assumed.
+
+     SAVE    Gives the amount of time to be added to local
+             standard time when the rule is in effect.  This
+             field has the same format as the AT field (although,
+             of course, the w and s suffixes are not used).
+
+     LETTER/S
+             Gives the "variable part" (for example, the "S" or
+             "D" in "EST" or "EDT") of time zone abbreviations to
+             be used when this rule is in effect.  If this field
+             is -, the variable part is null.
+
+     A zone line has the form
+
+          Zone  NAME                GMTOFF  RULES/SAVE  FORMAT  [UNTILYEAR [MONTH [DAY [TIME]]]]
+
+     For example:
+
+          Zone  Australia/Adelaide  9:30    Aus         CST     1971 Oct 31 2:00
+
+     The fields that make up a zone line are:
+
+     NAME  The name of the time zone.  This is the name used in
+           creating the time conversion information file for the
+           zone.
+
+     GMTOFF
+           The amount of time to add to UTC to get standard time
+           in this zone.  This field has the same format as the
+           AT and SAVE fields of rule lines; begin the field with
+           a minus sign if time must be subtracted from UTC.
+
+     RULES/SAVE
+           The name of the rule(s) that apply in the time zone
+           or, alternately, an amount of time to add to local
+           standard time.  If this field is - then standard time
+           always applies in the time zone.
+
+     FORMAT
+           The format for time zone abbreviations in this time
+           zone.  The pair of characters %s is used to show where
+           the "variable part" of the time zone abbreviation
+           goes.  Alternately, a slash (/) separates standard and
+           daylight abbreviations.
+
+     UNTILYEAR [MONTH [DAY [TIME]]]
+           The time at which the UTC offset or the rule(s) change
+           for a location.  It is specified as a year, a month, a
+           day, and a time of day.  If this is specified, the
+           time zone information is generated from the given UTC
+           offset and rule change until the time specified.  The
+           month, day, and time of day have the same format as
+           the IN, ON, and AT fields of a rule; trailing fields
+           can be omitted, and default to the earliest possible
+           value for the missing fields.
+
+           The next line must be a "continuation" line; this has
+           the same form as a zone line except that the string
+           "Zone" and the name are omitted, as the continuation
+           line will place information starting at the time
+           specified as the "until" information in the previous
+           line in the file used by the previous line.
+           Continuation lines may contain "until" information,
+           just as zone lines do, indicating that the next line
+           is a further continuation.
+
+     A link line has the form
+
+          Link  LINK-FROM        LINK-TO
+
+     For example:
+
+          Link  Europe/Istanbul  Asia/Istanbul
+
+     The LINK-FROM field should appear as the NAME field in some
+     zone line; the LINK-TO field is used as an alternate name
+     for that zone.
+
+     Except for continuation lines, lines may appear in any order
+     in the input.
+
+     Lines in the file that describes leap seconds have the
+     following form:
+
+          Leap  YEAR  MONTH  DAY  HH:MM:SS  CORR  R/S
+
+     For example:
+
+          Leap  1974  Dec    31   23:59:60  +     S
+
+     The YEAR, MONTH, DAY, and HH:MM:SS fields tell when the leap
+     second happened.  The CORR field should be "+" if a second
+     was added or "-" if a second was skipped.  The R/S field
+     should be (an abbreviation of) "Stationary" if the leap
+     second time given by the other fields should be interpreted
+     as UTC or (an abbreviation of) "Rolling" if the leap second
+     time given by the other fields should be interpreted as
+     local wall clock time.
+
+EXTENDED EXAMPLE
+     Here is an extended example of zic input, intended to
+     illustrate many of its features.
+
+       # Rule  NAME  FROM  TO    TYPE  IN   ON       AT    SAVE  LETTER/S
+       Rule    Swiss 1940  only  -     Nov  2        0:00  1:00  S
+       Rule    Swiss 1940  only  -     Dec  31       0:00  0     -
+       Rule    Swiss 1941  1942  -     May  Sun>=1   2:00  1:00  S
+       Rule    Swiss 1941  1942  -     Oct  Sun>=1   0:00  0
+       Rule    EU    1977  1980  -     Apr  Sun>=1   1:00u 1:00  S
+       Rule    EU    1977  only  -     Sep  lastSun  1:00u 0     -
+       Rule    EU    1978  only  -     Oct   1       1:00u 0     -
+       Rule    EU    1979  1995  -     Sep  lastSun  1:00u 0     -
+       Rule    EU    1981  max   -     Mar  lastSun  1:00u 1:00  S
+       Rule    EU    1996  max   -     Oct  lastSun  1:00u 0     -
+
+       # Zone  NAME           GMTOFF   RULES       FORMAT  UNTIL
+       Zone    Europe/Zurich  0:34:08  -           LMT     1848 Sep 12
+                              0:29:44  -           BMT     1894 Jun
+                              1:00     Swiss       CE%sT   1981
+                              1:00     EU          CE%sT
+
+       Link    Europe/Zurich  Switzerland
+
+     In this example, the zone is named Europe/Zurich but it has
+     an alias as Switzerland.  Zurich was 34 minutes and 8
+     seconds west of GMT until 1848-09-12 at 00:00, when the
+     offset changed to 29 minutes and 44 seconds.  After
+     1894-06-01 at 00:00 Swiss daylight saving rules (defined
+     with lines beginning with "Rule Swiss") apply, and the GMT
+     offset became one hour.  From 1981 to the present, EU
+     daylight saving rules have applied, and the UTC offset has
+     remained at one hour.
+
+     In 1940, daylight saving time applied from November 2 at
+     00:00 to December 31 at 00:00.  In 1941 and 1942, daylight
+     saving time applied from the first Sunday in May at 02:00 to
+     the first Sunday in October at 00:00.  The pre-1981 EU
+     daylight-saving rules have no effect here, but are included
+     for completeness.  Since 1981, daylight saving has begun on
+     the last Sunday in March at 01:00 UTC.  Until 1995 it ended
+     the last Sunday in September at 01:00 UTC, but this changed
+     to the last Sunday in October starting in 1996.
+
+     For purposes of display, "LMT" and "BMT" were initially
+     used, respectively.  Since Swiss rules and later EU rules
+     were applied, the display name for the timezone has been CET
+     for standard time and CEST for daylight saving time.
+
+NOTES
+     For areas with more than two types of local time, you may
+     need to use local standard time in the AT field of the
+     earliest transition time's rule to ensure that the earliest
+     transition time recorded in the compiled file is correct.
+
+     If, for a particular zone, a clock advance caused by the
+     start of daylight saving coincides with and is equal to a
+     clock retreat caused by a change in UTC offset, zic produces
+     a single transition to daylight saving at the new UTC offset
+     (without any change in wall clock time).  To get separate
+     transitions use multiple zone continuation lines specifying
+     transition instants using universal time.
+
+FILE
+     /usr/local/etc/zoneinfo         standard directory used for
+     created files
+
+SEE ALSO
+     newctime(3), tzfile(5), zdump(8)
Index: vendor/tzcode/tzcode2009h/unused/zoneinfo2tdf.pl
===================================================================
--- vendor/tzcode/tzcode2009h/unused/zoneinfo2tdf.pl	(nonexistent)
+++ vendor/tzcode/tzcode2009h/unused/zoneinfo2tdf.pl	(revision 192888)
@@ -0,0 +1,54 @@
+#! /usr/bin/perl -w
+
+# @(#)zoneinfo2tdf.pl	8.2
+
+# Courtesy Ken Pizzini.
+
+use strict;
+
+#This file released to the public domain.
+
+#Note: error checking is poor --- only trust the output if the input
+#has been checked by zic.
+
+my $contZone = '';
+while (<>) {
+  my $origline = $_;
+  my @fields = ();
+  while (s/^\s*((?:"[^"]*"|[^\s#])+)//) {
+    push @fields, $1;
+  }
+  next unless @fields;
+
+  my $type = lc($fields[0]);
+  if ($contZone) {
+    @fields >= 3 or warn "bad continuation line";
+    unshift @fields, '+', $contZone;
+    $type = 'zone';
+  }
+
+  $contZone = '';
+  if ($type eq 'zone') {
+    # Zone  NAME  GMTOFF  RULES/SAVE  FORMAT  [UNTIL]
+    my $nfields = @fields;
+    $nfields >= 5 or warn "bad zone line";
+    if ($nfields > 6) {
+      #this splice is optional, depending on one's preference
+      #(one big date-time field, or componentized date and time):
+      splice(@fields, 5, $nfields-5, "@fields[5..$nfields-1]");
+    }
+    $contZone = $fields[1] if @fields > 5;
+  } elsif ($type eq 'rule') {
+    # Rule  NAME  FROM  TO  TYPE  IN  ON  AT  SAVE  LETTER/S
+    @fields == 10 or warn "bad rule line";
+  } elsif ($type eq 'link') {
+    # Link  LINK-FROM  LINK-TO
+    @fields == 3 or warn "bad link line";
+  } elsif ($type eq 'leap') {
+    # Leap  YEAR  MONTH  DAY  HH:MM:SS  CORR  R/S
+    @fields == 7 or warn "bad leap line";
+  } else {
+    warn "Fubar at input line $.: $origline";
+  }
+  print join("\t", @fields), "\n";
+}

Property changes on: vendor/tzcode/tzcode2009h/unused/zoneinfo2tdf.pl
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: vendor/tzcode/tzcode2009h/zic/README
===================================================================
--- vendor/tzcode/tzcode2009h/zic/README	(nonexistent)
+++ vendor/tzcode/tzcode2009h/zic/README	(revision 192888)
@@ -0,0 +1,86 @@
+@(#)README	8.3
+This file is in the public domain, so clarified as of
+2009-05-17 by Arthur David Olson.
+
+"What time is it?" -- Richard Deacon as The King
+"Any time you want it to be." -- Frank Baxter as The Scientist
+					(from the Bell System film "About Time")
+
+The 1989 update of the time zone package featured
+
+*	POSIXization (including interpretation of POSIX-style TZ environment
+	variables, provided by Guy Harris),
+*	ANSIfication (including versions of "mktime" and "difftime"),
+*	SVIDulation (an "altzone" variable)
+*	MACHination (the "gtime" function)
+*	corrections to some time zone data (including corrections to the rules
+	for Great Britain and New Zealand)
+*	reference data from the United States Naval Observatory for folks who
+	want to do additional time zones
+*	and the 1989 data for Saudi Arabia.
+
+(Since this code will be treated as "part of the implementation" in some places
+and as "part of the application" in others, there's no good way to name
+functions, such as timegm, that are not part of the proposed ANSI C standard;
+such functions have kept their old, underscore-free names in this update.)
+
+And the "dysize" function has disappeared; it was present to allow compilation
+of the "date" command on old BSD systems, and a version of "date" is now
+provided in the package.  The "date" command is not created when you "make all"
+since it may lack options provided by the version distributed with your
+operating system, or may not interact with the system in the same way the
+native version does.
+
+Since POSIX frowns on correct leap second handling, the default behavior of
+the "zic" command (in the absence of a "-L" option) has been changed to omit
+leap second information from its output files.
+
+Here is a recipe for acquiring, building, installing, and testing the
+tz distribution on a GNU/Linux or similar host.
+
+	mkdir tz
+	cd tz
+	wget 'ftp://elsie.nci.nih.gov/pub/tz*.tar.gz'
+	gzip -dc tzcode*.tar.gz | tar -xf -
+	gzip -dc tzdata*.tar.gz | tar -xf -
+
+Be sure to read the comments in "Makefile" and make any changes needed
+to make things right for your system, especially if you are using some
+platform other than GNU/Linux.  Then run the following commands,
+substituting your desired installation directory for "$HOME/tzdir":
+
+	make TOPDIR=$HOME/tzdir install
+	$HOME/tzdir/etc/zdump -v America/Los_Angeles
+
+To use the new functions, use a "-ltz" option when compiling or linking.
+
+Historical local time information has been included here to:
+
+*	provide a compendium of data about the history of civil time
+	that is useful even if the data are not 100% accurate;
+
+*	give an idea of the variety of local time rules that have
+	existed in the past and thus an idea of the variety that may be
+	expected in the future;
+
+*	provide a test of the generality of the local time rule description
+	system.
+
+The information in the time zone data files is by no means authoritative;
+the files currently do not even attempt to cover all time stamps before
+1970, and there are undoubtedly errors even for time stamps since 1970.
+If you know that the rules are different from those in a file, by all means
+feel free to change file (and please send the changed version to
+tz@elsie.nci.nih.gov for use in the future).  Europeans take note!
+
+Thanks to these Timezone Caballeros who've made major contributions to the
+time conversion package:  Keith Bostic; Bob Devine; Paul Eggert; Robert Elz;
+Guy Harris; Mark Horton; John Mackin; and Bradley White.  Thanks also to
+Michael Bloom, Art Neilson, Stephen Prince, John Sovereign, and Frank Wales
+for testing work, and to Gwillim Law for checking local mean time data.
+None of them are responsible for remaining errors.
+
+Look in the ~ftp/pub directory of elsie.nci.nih.gov
+for updated versions of these files.
+
+Please send comments or information to tz@elsie.nci.nih.gov.

Property changes on: vendor/tzcode/tzcode2009h/zic/README
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+FreeBSD=%H
\ No newline at end of property
Index: vendor/tzcode/tzcode2009h/zic/Theory
===================================================================
--- vendor/tzcode/tzcode2009h/zic/Theory	(nonexistent)
+++ vendor/tzcode/tzcode2009h/zic/Theory	(revision 192888)
@@ -0,0 +1,569 @@
+@(#)Theory	8.3
+This file is in the public domain, so clarified as of
+2009-05-17 by Arthur David Olson.
+
+----- Outline -----
+
+	Time and date functions
+	Names of time zone regions
+	Time zone abbreviations
+	Calendrical issues
+	Time and time zones on Mars
+
+----- Time and date functions -----
+
+These time and date functions are upwards compatible with POSIX,
+an international standard for UNIX-like systems.
+As of this writing, the current edition of POSIX is:
+
+  Standard for Information technology
+  -- Portable Operating System Interface (POSIX (R))
+  -- System Interfaces
+  IEEE Std 1003.1, 2004 Edition
+  
+  
+
+POSIX has the following properties and limitations.
+
+*	In POSIX, time display in a process is controlled by the
+	environment variable TZ.  Unfortunately, the POSIX TZ string takes
+	a form that is hard to describe and is error-prone in practice.
+	Also, POSIX TZ strings can't deal with other (for example, Israeli)
+	daylight saving time rules, or situations where more than two
+	time zone abbreviations are used in an area.
+
+	The POSIX TZ string takes the following form:
+
+		stdoffset[dst[offset],date[/time],date[/time]]
+
+	where:
+
+	std and dst
+		are 3 or more characters specifying the standard
+		and daylight saving time (DST) zone names.
+		Starting with POSIX.1-2001, std and dst may also be
+		in a quoted form like ""; this allows
+		"+" and "-" in the names.
+	offset
+		is of the form `[-]hh:[mm[:ss]]' and specifies the
+		offset west of UTC.  The default DST offset is one hour
+		ahead of standard time.
+	date[/time],date[/time]
+		specifies the beginning and end of DST.  If this is absent,
+		the system supplies its own rules for DST, and these can
+		differ from year to year; typically US DST rules are used.
+	time
+		takes the form `hh:[mm[:ss]]' and defaults to 02:00.
+	date
+		takes one of the following forms:
+		Jn (1<=n<=365)
+			origin-1 day number not counting February 29
+		n (0<=n<=365)
+			origin-0 day number counting February 29 if present
+		Mm.n.d (0[Sunday]<=d<=6[Saturday], 1<=n<=5, 1<=m<=12)
+			for the dth day of week n of month m of the year,
+			where week 1 is the first week in which day d appears,
+			and `5' stands for the last week in which day d appears
+			(which may be either the 4th or 5th week).
+
+	Here is an example POSIX TZ string, for US Pacific time using rules
+	appropriate from 1987 through 2006:
+
+		TZ='PST8PDT,M4.1.0/02:00,M10.5.0/02:00'
+
+	This POSIX TZ string is hard to remember, and mishandles time stamps
+	before 1987 and after 2006.  With this package you can use this
+	instead:
+
+		TZ='America/Los_Angeles'
+
+*	POSIX does not define the exact meaning of TZ values like "EST5EDT".
+	Typically the current US DST rules are used to interpret such values,
+	but this means that the US DST rules are compiled into each program
+	that does time conversion.  This means that when US time conversion
+	rules change (as in the United States in 1987), all programs that
+	do time conversion must be recompiled to ensure proper results.
+
+*	In POSIX, there's no tamper-proof way for a process to learn the
+	system's best idea of local wall clock.  (This is important for
+	applications that an administrator wants used only at certain times--
+	without regard to whether the user has fiddled the "TZ" environment
+	variable.  While an administrator can "do everything in UTC" to get
+	around the problem, doing so is inconvenient and precludes handling
+	daylight saving time shifts--as might be required to limit phone
+	calls to off-peak hours.)
+
+*	POSIX requires that systems ignore leap seconds.
+
+These are the extensions that have been made to the POSIX functions:
+
+*	The "TZ" environment variable is used in generating the name of a file
+	from which time zone information is read (or is interpreted a la
+	POSIX); "TZ" is no longer constrained to be a three-letter time zone
+	name followed by a number of hours and an optional three-letter
+	daylight time zone name.  The daylight saving time rules to be used
+	for a particular time zone are encoded in the time zone file;
+	the format of the file allows U.S., Australian, and other rules to be
+	encoded, and allows for situations where more than two time zone
+	abbreviations are used.
+
+	It was recognized that allowing the "TZ" environment variable to
+	take on values such as "America/New_York" might cause "old" programs
+	(that expect "TZ" to have a certain form) to operate incorrectly;
+	consideration was given to using some other environment variable
+	(for example, "TIMEZONE") to hold the string used to generate the
+	time zone information file name.  In the end, however, it was decided
+	to continue using "TZ":  it is widely used for time zone purposes;
+	separately maintaining both "TZ" and "TIMEZONE" seemed a nuisance;
+	and systems where "new" forms of "TZ" might cause problems can simply
+	use TZ values such as "EST5EDT" which can be used both by
+	"new" programs (a la POSIX) and "old" programs (as zone names and
+	offsets).
+
+*	To handle places where more than two time zone abbreviations are used,
+	the functions "localtime" and "gmtime" set tzname[tmp->tm_isdst]
+	(where "tmp" is the value the function returns) to the time zone
+	abbreviation to be used.  This differs from POSIX, where the elements
+	of tzname are only changed as a result of calls to tzset.
+
+*	Since the "TZ" environment variable can now be used to control time
+	conversion, the "daylight" and "timezone" variables are no longer
+	needed.  (These variables are defined and set by "tzset"; however, their
+	values will not be used by "localtime.")
+
+*	The "localtime" function has been set up to deliver correct results
+	for near-minimum or near-maximum time_t values.  (A comment in the
+	source code tells how to get compatibly wrong results).
+
+*	A function "tzsetwall" has been added to arrange for the system's
+	best approximation to local wall clock time to be delivered by
+	subsequent calls to "localtime."  Source code for portable
+	applications that "must" run on local wall clock time should call
+	"tzsetwall();" if such code is moved to "old" systems that don't
+	provide tzsetwall, you won't be able to generate an executable program.
+	(These time zone functions also arrange for local wall clock time to be
+	used if tzset is called--directly or indirectly--and there's no "TZ"
+	environment variable; portable applications should not, however, rely
+	on this behavior since it's not the way SVR2 systems behave.)
+
+*	These functions can account for leap seconds, thanks to Bradley White.
+
+Points of interest to folks with other systems:
+
+*	This package is already part of many POSIX-compliant hosts,
+	including BSD, HP, Linux, Network Appliance, SCO, SGI, and Sun.
+	On such hosts, the primary use of this package
+	is to update obsolete time zone rule tables.
+	To do this, you may need to compile the time zone compiler
+	`zic' supplied with this package instead of using the system `zic',
+	since the format of zic's input changed slightly in late 1994,
+	and many vendors still do not support the new input format.
+
+*	The UNIX Version 7 "timezone" function is not present in this package;
+	it's impossible to reliably map timezone's arguments (a "minutes west
+	of GMT" value and a "daylight saving time in effect" flag) to a
+	time zone abbreviation, and we refuse to guess.
+	Programs that in the past used the timezone function may now examine
+	tzname[localtime(&clock)->tm_isdst] to learn the correct time
+	zone abbreviation to use.  Alternatively, use
+	localtime(&clock)->tm_zone if this has been enabled.
+
+*	The 4.2BSD gettimeofday function is not used in this package.
+	This formerly let users obtain the current UTC offset and DST flag,
+	but this functionality was removed in later versions of BSD.
+
+*	In SVR2, time conversion fails for near-minimum or near-maximum
+	time_t values when doing conversions for places that don't use UTC.
+	This package takes care to do these conversions correctly.
+
+The functions that are conditionally compiled if STD_INSPIRED is defined
+should, at this point, be looked on primarily as food for thought.  They are
+not in any sense "standard compatible"--some are not, in fact, specified in
+*any* standard.  They do, however, represent responses of various authors to
+standardization proposals.
+
+Other time conversion proposals, in particular the one developed by folks at
+Hewlett Packard, offer a wider selection of functions that provide capabilities
+beyond those provided here.  The absence of such functions from this package
+is not meant to discourage the development, standardization, or use of such
+functions.  Rather, their absence reflects the decision to make this package
+contain valid extensions to POSIX, to ensure its broad acceptability.  If
+more powerful time conversion functions can be standardized, so much the
+better.
+
+
+----- Names of time zone rule files -----
+
+The time zone rule file naming conventions attempt to strike a balance
+among the following goals:
+
+ * Uniquely identify every national region where clocks have all
+   agreed since 1970.  This is essential for the intended use: static
+   clocks keeping local civil time.
+
+ * Indicate to humans as to where that region is.  This simplifes use.
+
+ * Be robust in the presence of political changes.  This reduces the
+   number of updates and backward-compatibility hacks.  For example,
+   names of countries are ordinarily not used, to avoid
+   incompatibilities when countries change their name
+   (e.g. Zaire->Congo) or when locations change countries
+   (e.g. Hong Kong from UK colony to China).
+
+ * Be portable to a wide variety of implementations.
+   This promotes use of the technology.
+
+ * Use a consistent naming convention over the entire world.
+   This simplifies both use and maintenance.
+
+This naming convention is not intended for use by inexperienced users
+to select TZ values by themselves (though they can of course examine
+and reuse existing settings).  Distributors should provide
+documentation and/or a simple selection interface that explains the
+names; see the 'tzselect' program supplied with this distribution for
+one example.
+
+Names normally have the form AREA/LOCATION, where AREA is the name
+of a continent or ocean, and LOCATION is the name of a specific
+location within that region.  North and South America share the same
+area, `America'.  Typical names are `Africa/Cairo', `America/New_York',
+and `Pacific/Honolulu'.
+
+Here are the general rules used for choosing location names,
+in decreasing order of importance:
+
+	Use only valid POSIX file name components (i.e., the parts of
+		names other than `/').  Within a file name component,
+		use only ASCII letters, `.', `-' and `_'.  Do not use
+		digits, as that might create an ambiguity with POSIX
+		TZ strings.  A file name component must not exceed 14
+		characters or start with `-'.  E.g., prefer `Brunei'
+		to `Bandar_Seri_Begawan'.
+	Include at least one location per time zone rule set per country.
+		One such location is enough.  Use ISO 3166 (see the file
+		iso3166.tab) to help decide whether something is a country.
+		However, uninhabited ISO 3166 regions like Bouvet Island
+		do not need locations, since local time is not defined there.
+	If all the clocks in a country's region have agreed since 1970,
+		don't bother to include more than one location
+		even if subregions' clocks disagreed before 1970.
+		Otherwise these tables would become annoyingly large.
+	If a name is ambiguous, use a less ambiguous alternative;
+		e.g. many cities are named San Jose and Georgetown, so
+		prefer `Costa_Rica' to `San_Jose' and `Guyana' to `Georgetown'.
+	Keep locations compact.  Use cities or small islands, not countries
+		or regions, so that any future time zone changes do not split
+		locations into different time zones.  E.g. prefer `Paris'
+		to `France', since France has had multiple time zones.
+	Use mainstream English spelling, e.g. prefer `Rome' to `Roma', and
+		prefer `Athens' to the true name (which uses Greek letters).
+		The POSIX file name restrictions encourage this rule.
+	Use the most populous among locations in a country's time zone,
+		e.g. prefer `Shanghai' to `Beijing'.  Among locations with
+		similar populations, pick the best-known location,
+		e.g. prefer `Rome' to `Milan'.
+	Use the singular form, e.g. prefer `Canary' to `Canaries'.
+	Omit common suffixes like `_Islands' and `_City', unless that
+		would lead to ambiguity.  E.g. prefer `Cayman' to
+		`Cayman_Islands' and `Guatemala' to `Guatemala_City',
+		but prefer `Mexico_City' to `Mexico' because the country
+		of Mexico has several time zones.
+	Use `_' to represent a space.
+	Omit `.' from abbreviations in names, e.g. prefer `St_Helena'
+		to `St._Helena'.
+	Do not change established names if they only marginally
+		violate the above rules.  For example, don't change
+		the existing name `Rome' to `Milan' merely because
+		Milan's population has grown to be somewhat greater
+		than Rome's.
+	If a name is changed, put its old spelling in the `backward' file.
+
+The file `zone.tab' lists the geographical locations used to name
+time zone rule files.  It is intended to be an exhaustive list
+of canonical names for geographic regions.
+
+Older versions of this package used a different naming scheme,
+and these older names are still supported.
+See the file `backward' for most of these older names
+(e.g. `US/Eastern' instead of `America/New_York').
+The other old-fashioned names still supported are
+`WET', `CET', `MET', `EET' (see the file `europe'),
+and `Factory' (see the file `factory').
+
+
+----- Time zone abbreviations -----
+
+When this package is installed, it generates time zone abbreviations
+like `EST' to be compatible with human tradition and POSIX.
+Here are the general rules used for choosing time zone abbreviations,
+in decreasing order of importance:
+
+	Use abbreviations that consist of three or more ASCII letters.
+		Previous editions of this database also used characters like
+		' ' and '?', but these characters have a special meaning to
+		the shell and cause commands like
+			set `date`
+		to have unexpected effects.
+		Previous editions of this rule required upper-case letters,
+		but the Congressman who introduced Chamorro Standard Time
+		preferred "ChST", so the rule has been relaxed.
+
+		This rule guarantees that all abbreviations could have
+		been specified by a POSIX TZ string.  POSIX
+		requires at least three characters for an
+		abbreviation.  POSIX through 2000 says that an abbreviation
+		cannot start with ':', and cannot contain ',', '-',
+		'+', NUL, or a digit.  POSIX from 2001 on changes this
+		rule to say that an abbreviation can contain only '-', '+',
+		and alphanumeric characters from the portable character set
+		in the current locale.  To be portable to both sets of
+		rules, an abbreviation must therefore use only ASCII
+		letters.
+
+	Use abbreviations that are in common use among English-speakers,
+		e.g. `EST' for Eastern Standard Time in North America.
+		We assume that applications translate them to other languages
+		as part of the normal localization process; for example,
+		a French application might translate `EST' to `HNE'.
+
+	For zones whose times are taken from a city's longitude, use the
+		traditional xMT notation, e.g. `PMT' for Paris Mean Time.
+		The only name like this in current use is `GMT'.
+
+	If there is no common English abbreviation, abbreviate the English
+		translation of the usual phrase used by native speakers.
+		If this is not available or is a phrase mentioning the country
+		(e.g. ``Cape Verde Time''), then:
+
+		When a country has a single or principal time zone region,
+			append `T' to the country's ISO	code, e.g. `CVT' for
+			Cape Verde Time.  For summer time append `ST';
+			for double summer time append `DST'; etc.
+		When a country has multiple time zones, take the first three
+			letters of an English place name identifying each zone
+			and then append `T', `ST', etc. as before;
+			e.g. `VLAST' for VLAdivostok Summer Time.
+
+	Use UTC (with time zone abbreviation "zzz") for locations while
+		uninhabited.  The "zzz" mnemonic is that these locations are,
+		in some sense, asleep.
+
+Application writers should note that these abbreviations are ambiguous
+in practice: e.g. `EST' has a different meaning in Australia than
+it does in the United States.  In new applications, it's often better
+to use numeric UTC offsets like `-0500' instead of time zone
+abbreviations like `EST'; this avoids the ambiguity.
+
+
+----- Calendrical issues -----
+
+Calendrical issues are a bit out of scope for a time zone database,
+but they indicate the sort of problems that we would run into if we
+extended the time zone database further into the past.  An excellent
+resource in this area is Edward M. Reingold and Nachum Dershowitz,
+
+Calendrical Calculations: The Millennium Edition
+, Cambridge University Press (2001).  Other information and
+sources are given below.  They sometimes disagree.
+
+
+France
+
+Gregorian calendar adopted 1582-12-20.
+French Revolutionary calendar used 1793-11-24 through 1805-12-31,
+and (in Paris only) 1871-05-06 through 1871-05-23.
+
+
+Russia
+
+From Chris Carrier (1996-12-02):
+On 1929-10-01 the Soviet Union instituted an ``Eternal Calendar''
+with 30-day months plus 5 holidays, with a 5-day week.
+On 1931-12-01 it changed to a 6-day week; in 1934 it reverted to the
+Gregorian calendar while retaining the 6-day week; on 1940-06-27 it
+reverted to the 7-day week.  With the 6-day week the usual days
+off were the 6th, 12th, 18th, 24th and 30th of the month.
+(Source: Evitiar Zerubavel, _The Seven Day Circle_)
+
+
+Mark Brader reported a similar story in "The Book of Calendars", edited
+by Frank Parise (1982, Facts on File, ISBN 0-8719-6467-8), page 377.  But:
+
+From: Petteri Sulonen (via Usenet)
+Date: 14 Jan 1999 00:00:00 GMT
+...
+
+If your source is correct, how come documents between 1929 -- 1940 were
+still dated using the conventional, Gregorian calendar?
+
+I can post a scan of a document dated December 1, 1934, signed by
+Yenukidze, the secretary, on behalf of Kalinin, the President of the
+Executive Committee of the Supreme Soviet, if you like.
+
+
+
+Sweden (and Finland)
+
+From: Mark Brader
+
+Subject: Re: Gregorian reform -- a part of locale?
+
+Date: 1996-07-06
+
+In 1700, Denmark made the transition from Julian to Gregorian.  Sweden
+decided to *start* a transition in 1700 as well, but rather than have one of
+those unsightly calendar gaps :-), they simply decreed that the next leap
+year after 1696 would be in 1744 -- putting the whole country on a calendar
+different from both Julian and Gregorian for a period of 40 years.
+
+However, in 1704 something went wrong and the plan was not carried through;
+they did, after all, have a leap year that year.  And one in 1708.  In 1712
+they gave it up and went back to Julian, putting 30 days in February that
+year!...
+
+Then in 1753, Sweden made the transition to Gregorian in the usual manner,
+getting there only 13 years behind the original schedule.
+
+(A previous posting of this story was challenged, and Swedish readers
+produced the following references to support it: "Tiderakning och historia"
+by Natanael Beckman (1924) and "Tid, en bok om tiderakning och
+kalendervasen" by Lars-Olof Lode'n (no date was given).)
+
+
+Grotefend's data
+
+From: "Michael Palmer" [with one obvious typo fixed]
+Subject: Re: Gregorian Calendar (was Re: Another FHC related question
+Newsgroups: soc.genealogy.german
+Date: Tue, 9 Feb 1999 02:32:48 -800
+...
+
+The following is a(n incomplete) listing, arranged chronologically, of
+European states, with the date they converted from the Julian to the
+Gregorian calendar:
+
+04/15 Oct 1582 - Italy (with exceptions), Spain, Portugal, Poland (Roman
+                 Catholics and Danzig only)
+09/20 Dec 1582 - France, Lorraine
+
+21 Dec 1582/
+   01 Jan 1583 - Holland, Brabant, Flanders, Hennegau
+10/21 Feb 1583 - bishopric of Liege (L"uttich)
+13/24 Feb 1583 - bishopric of Augsburg
+04/15 Oct 1583 - electorate of Trier
+05/16 Oct 1583 - Bavaria, bishoprics of Freising, Eichstedt, Regensburg,
+                 Salzburg, Brixen
+13/24 Oct 1583 - Austrian Oberelsass and Breisgau
+20/31 Oct 1583 - bishopric of Basel
+02/13 Nov 1583 - duchy of J"ulich-Berg
+02/13 Nov 1583 - electorate and city of K"oln
+04/15 Nov 1583 - bishopric of W"urzburg
+11/22 Nov 1583 - electorate of Mainz
+16/27 Nov 1583 - bishopric of Strassburg and the margraviate of Baden
+17/28 Nov 1583 - bishopric of M"unster and duchy of Cleve
+14/25 Dec 1583 - Steiermark
+
+06/17 Jan 1584 - Austria and Bohemia
+11/22 Jan 1584 - Luzern, Uri, Schwyz, Zug, Freiburg, Solothurn
+12/23 Jan 1584 - Silesia and the Lausitz
+22 Jan/
+   02 Feb 1584 - Hungary (legally on 21 Oct 1587)
+      Jun 1584 - Unterwalden
+01/12 Jul 1584 - duchy of Westfalen
+
+16/27 Jun 1585 - bishopric of Paderborn
+
+14/25 Dec 1590 - Transylvania
+
+22 Aug/
+   02 Sep 1612 - duchy of Prussia
+
+13/24 Dec 1614 - Pfalz-Neuburg
+
+          1617 - duchy of Kurland (reverted to the Julian calendar in
+                 1796)
+
+          1624 - bishopric of Osnabr"uck
+
+          1630 - bishopric of Minden
+
+15/26 Mar 1631 - bishopric of Hildesheim
+
+          1655 - Kanton Wallis
+
+05/16 Feb 1682 - city of Strassburg
+
+18 Feb/
+   01 Mar 1700 - Protestant Germany (including Swedish possessions in
+                 Germany), Denmark, Norway
+30 Jun/
+   12 Jul 1700 - Gelderland, Zutphen
+10 Nov/
+   12 Dec 1700 - Utrecht, Overijssel
+
+31 Dec 1700/
+   12 Jan 1701 - Friesland, Groningen, Z"urich, Bern, Basel, Geneva,
+                 Turgau, and Schaffhausen
+
+          1724 - Glarus, Appenzell, and the city of St. Gallen
+
+01 Jan 1750    - Pisa and Florence
+
+02/14 Sep 1752 - Great Britain
+
+17 Feb/
+   01 Mar 1753 - Sweden
+
+1760-1812      - Graub"unden
+
+The Russian empire (including Finland and the Baltic states) did not
+convert to the Gregorian calendar until the Soviet revolution of 1917.
+
+Source:  H. Grotefend, _Taschenbuch der Zeitrechnung des deutschen
+Mittelalters und der Neuzeit_, herausgegeben von Dr. O. Grotefend
+(Hannover:  Hahnsche Buchhandlung, 1941), pp. 26-28.
+
+
+----- Time and time zones on Mars -----
+
+Some people have adjusted their work schedules to fit Mars time.
+Dozens of special Mars watches were built for Jet Propulsion
+Laboratory workers who kept Mars time during the Mars Exploration
+Rovers mission (2004).  These timepieces look like normal Seikos and
+Citizens but use Mars seconds rather than terrestrial seconds.
+
+A Mars solar day is called a "sol" and has a mean period equal to
+about 24 hours 39 minutes 35.244 seconds in terrestrial time.  It is
+divided into a conventional 24-hour clock, so each Mars second equals
+about 1.02749125 terrestrial seconds.
+
+The prime meridian of Mars goes through the center of the crater
+Airy-0, named in honor of the British astronomer who built the
+Greenwich telescope that defines Earth's prime meridian.  Mean solar
+time on the Mars prime meridian is called Mars Coordinated Time (MTC).
+
+Each landed mission on Mars has adopted a different reference for
+solar time keeping, so there is no real standard for Mars time zones.
+For example, the Mars Exploration Rover project (2004) defined two
+time zones "Local Solar Time A" and "Local Solar Time B" for its two
+missions, each zone designed so that its time equals local true solar
+time at approximately the middle of the nominal mission.  Such a "time
+zone" is not particularly suited for any application other than the
+mission itself.
+
+Many calendars have been proposed for Mars, but none have achieved
+wide acceptance.  Astronomers often use Mars Sol Date (MSD) which is a
+sequential count of Mars solar days elapsed since about 1873-12-29
+12:00 GMT.
+
+The tz database does not currently support Mars time, but it is
+documented here in the hopes that support will be added eventually.
+
+Sources:
+
+Michael Allison and Robert Schmunk,
+"Technical Notes on Mars Solar Time as Adopted by the Mars24 Sunclock"
+ (2004-07-30).
+
+Jia-Rui Chong, "Workdays Fit for a Martian", Los Angeles Times
+(2004-01-14), pp A1, A20-A21.

Property changes on: vendor/tzcode/tzcode2009h/zic/Theory
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+FreeBSD=%H
\ No newline at end of property
Index: vendor/tzcode/tzcode2009h/zic/zdump.8
===================================================================
--- vendor/tzcode/tzcode2009h/zic/zdump.8	(nonexistent)
+++ vendor/tzcode/tzcode2009h/zic/zdump.8	(revision 192888)
@@ -0,0 +1,59 @@
+.TH ZDUMP 8
+.SH NAME
+zdump \- time zone dumper
+.SH SYNOPSIS
+.B zdump
+[
+.B \-\-version
+]
+[
+.B \-v
+] [
+.B \-c
+[loyear,]hiyear ] [ zonename ... ]
+.SH DESCRIPTION
+.I Zdump
+prints the current time in each
+.I zonename
+named on the command line.
+.PP
+These options are available:
+.TP
+.BI "\-\-version"
+Output version information and exit.
+.TP
+.B \-v
+For each
+.I zonename
+on the command line,
+print the time at the lowest possible time value,
+the time one day after the lowest possible time value,
+the times both one second before and exactly at
+each detected time discontinuity,
+the time at one day less than the highest possible time value,
+and the time at the highest possible time value,
+Each line ends with
+.B isdst=1
+if the given time is Daylight Saving Time or
+.B isdst=0
+otherwise.
+.TP
+.BI "\-c " [loyear,]hiyear
+Cut off verbose output near the start of the given year(s).
+By default,
+the program cuts off verbose output near the starts of the years -500 and 2500.
+.SH LIMITATIONS
+The
+.B \-v
+option may not be used on systems with floating-point time_t values
+that are neither float nor double.
+.PP
+Time discontinuities are found by sampling the results returned by localtime
+at twelve-hour intervals.
+This works in all real-world cases;
+one can construct artificial time zones for which this fails.
+.SH "SEE ALSO"
+newctime(3), tzfile(5), zic(8)
+.\" @(#)zdump.8	8.2
+.\" This file is in the public domain, so clarified as of
+.\" 2009-05-17 by Arthur David Olson.

Property changes on: vendor/tzcode/tzcode2009h/zic/zdump.8
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+FreeBSD=%H
\ No newline at end of property
Index: vendor/tzcode/tzcode2009h/zic/zdump.c
===================================================================
--- vendor/tzcode/tzcode2009h/zic/zdump.c	(nonexistent)
+++ vendor/tzcode/tzcode2009h/zic/zdump.c	(revision 192888)
@@ -0,0 +1,678 @@
+/*
+** This file is in the public domain, so clarified as of
+** 2009-05-17 by Arthur David Olson.
+*/
+
+static char	elsieid[] = "@(#)zdump.c	8.9";
+
+/*
+** This code has been made independent of the rest of the time
+** conversion package to increase confidence in the verification it provides.
+** You can use this code to help in verifying other implementations.
+*/
+
+#include "stdio.h"	/* for stdout, stderr, perror */
+#include "string.h"	/* for strcpy */
+#include "sys/types.h"	/* for time_t */
+#include "time.h"	/* for struct tm */
+#include "stdlib.h"	/* for exit, malloc, atoi */
+#include "float.h"	/* for FLT_MAX and DBL_MAX */
+#include "ctype.h"	/* for isalpha et al. */
+#ifndef isascii
+#define isascii(x) 1
+#endif /* !defined isascii */
+
+#ifndef ZDUMP_LO_YEAR
+#define ZDUMP_LO_YEAR	(-500)
+#endif /* !defined ZDUMP_LO_YEAR */
+
+#ifndef ZDUMP_HI_YEAR
+#define ZDUMP_HI_YEAR	2500
+#endif /* !defined ZDUMP_HI_YEAR */
+
+#ifndef MAX_STRING_LENGTH
+#define MAX_STRING_LENGTH	1024
+#endif /* !defined MAX_STRING_LENGTH */
+
+#ifndef TRUE
+#define TRUE		1
+#endif /* !defined TRUE */
+
+#ifndef FALSE
+#define FALSE		0
+#endif /* !defined FALSE */
+
+#ifndef EXIT_SUCCESS
+#define EXIT_SUCCESS	0
+#endif /* !defined EXIT_SUCCESS */
+
+#ifndef EXIT_FAILURE
+#define EXIT_FAILURE	1
+#endif /* !defined EXIT_FAILURE */
+
+#ifndef SECSPERMIN
+#define SECSPERMIN	60
+#endif /* !defined SECSPERMIN */
+
+#ifndef MINSPERHOUR
+#define MINSPERHOUR	60
+#endif /* !defined MINSPERHOUR */
+
+#ifndef SECSPERHOUR
+#define SECSPERHOUR	(SECSPERMIN * MINSPERHOUR)
+#endif /* !defined SECSPERHOUR */
+
+#ifndef HOURSPERDAY
+#define HOURSPERDAY	24
+#endif /* !defined HOURSPERDAY */
+
+#ifndef EPOCH_YEAR
+#define EPOCH_YEAR	1970
+#endif /* !defined EPOCH_YEAR */
+
+#ifndef TM_YEAR_BASE
+#define TM_YEAR_BASE	1900
+#endif /* !defined TM_YEAR_BASE */
+
+#ifndef DAYSPERNYEAR
+#define DAYSPERNYEAR	365
+#endif /* !defined DAYSPERNYEAR */
+
+#ifndef isleap
+#define isleap(y) (((y) % 4) == 0 && (((y) % 100) != 0 || ((y) % 400) == 0))
+#endif /* !defined isleap */
+
+#ifndef isleap_sum
+/*
+** See tzfile.h for details on isleap_sum.
+*/
+#define isleap_sum(a, b)	isleap((a) % 400 + (b) % 400)
+#endif /* !defined isleap_sum */
+
+#define SECSPERDAY	((long) SECSPERHOUR * HOURSPERDAY)
+#define SECSPERNYEAR	(SECSPERDAY * DAYSPERNYEAR)
+#define SECSPERLYEAR	(SECSPERNYEAR + SECSPERDAY)
+
+#ifndef HAVE_GETTEXT
+#define HAVE_GETTEXT 0
+#endif
+#if HAVE_GETTEXT
+#include "locale.h"	/* for setlocale */
+#include "libintl.h"
+#endif /* HAVE_GETTEXT */
+
+#ifndef GNUC_or_lint
+#ifdef lint
+#define GNUC_or_lint
+#else /* !defined lint */
+#ifdef __GNUC__
+#define GNUC_or_lint
+#endif /* defined __GNUC__ */
+#endif /* !defined lint */
+#endif /* !defined GNUC_or_lint */
+
+#ifndef INITIALIZE
+#ifdef GNUC_or_lint
+#define INITIALIZE(x)	((x) = 0)
+#else /* !defined GNUC_or_lint */
+#define INITIALIZE(x)
+#endif /* !defined GNUC_or_lint */
+#endif /* !defined INITIALIZE */
+
+/*
+** For the benefit of GNU folk...
+** `_(MSGID)' uses the current locale's message library string for MSGID.
+** The default is to use gettext if available, and use MSGID otherwise.
+*/
+
+#ifndef _
+#if HAVE_GETTEXT
+#define _(msgid) gettext(msgid)
+#else /* !HAVE_GETTEXT */
+#define _(msgid) msgid
+#endif /* !HAVE_GETTEXT */
+#endif /* !defined _ */
+
+#ifndef TZ_DOMAIN
+#define TZ_DOMAIN "tz"
+#endif /* !defined TZ_DOMAIN */
+
+extern char **	environ;
+extern int	getopt(int argc, char * const argv[],
+			const char * options);
+extern char *	optarg;
+extern int	optind;
+extern char *	tzname[2];
+
+static time_t	absolute_min_time;
+static time_t	absolute_max_time;
+static size_t	longest;
+static char *	progname;
+static int	warned;
+
+static char *	abbr(struct tm * tmp);
+static void	abbrok(const char * abbrp, const char * zone);
+static long	delta(struct tm * newp, struct tm * oldp);
+static void	dumptime(const struct tm * tmp);
+static time_t	hunt(char * name, time_t lot, time_t	hit);
+static void	setabsolutes(void);
+static void	show(char * zone, time_t t, int v);
+static const char *	tformat(void);
+static time_t	yeartot(long y);
+
+#ifndef TYPECHECK
+#define my_localtime	localtime
+#else /* !defined TYPECHECK */
+static struct tm *
+my_localtime(tp)
+time_t *	tp;
+{
+	register struct tm *	tmp;
+
+	tmp = localtime(tp);
+	if (tp != NULL && tmp != NULL) {
+		struct tm	tm;
+		register time_t	t;
+
+		tm = *tmp;
+		t = mktime(&tm);
+		if (t - *tp >= 1 || *tp - t >= 1) {
+			(void) fflush(stdout);
+			(void) fprintf(stderr, "\n%s: ", progname);
+			(void) fprintf(stderr, tformat(), *tp);
+			(void) fprintf(stderr, " ->");
+			(void) fprintf(stderr, " year=%d", tmp->tm_year);
+			(void) fprintf(stderr, " mon=%d", tmp->tm_mon);
+			(void) fprintf(stderr, " mday=%d", tmp->tm_mday);
+			(void) fprintf(stderr, " hour=%d", tmp->tm_hour);
+			(void) fprintf(stderr, " min=%d", tmp->tm_min);
+			(void) fprintf(stderr, " sec=%d", tmp->tm_sec);
+			(void) fprintf(stderr, " isdst=%d", tmp->tm_isdst);
+			(void) fprintf(stderr, " -> ");
+			(void) fprintf(stderr, tformat(), t);
+			(void) fprintf(stderr, "\n");
+		}
+	}
+	return tmp;
+}
+#endif /* !defined TYPECHECK */
+
+static void
+abbrok(abbrp, zone)
+const char * const	abbrp;
+const char * const	zone;
+{
+	register const char *	cp;
+	register char *		wp;
+
+	if (warned)
+		return;
+	cp = abbrp;
+	wp = NULL;
+	while (isascii((unsigned char) *cp) && isalpha((unsigned char) *cp))
+		++cp;
+	if (cp - abbrp == 0)
+		wp = _("lacks alphabetic at start");
+	else if (cp - abbrp < 3)
+		wp = _("has fewer than 3 alphabetics");
+	else if (cp - abbrp > 6)
+		wp = _("has more than 6 alphabetics");
+	if (wp == NULL && (*cp == '+' || *cp == '-')) {
+		++cp;
+		if (isascii((unsigned char) *cp) &&
+			isdigit((unsigned char) *cp))
+				if (*cp++ == '1' && *cp >= '0' && *cp <= '4')
+					++cp;
+		if (*cp != '\0')
+			wp = _("differs from POSIX standard");
+	}
+	if (wp == NULL)
+		return;
+	(void) fflush(stdout);
+	(void) fprintf(stderr,
+		_("%s: warning: zone \"%s\" abbreviation \"%s\" %s\n"),
+		progname, zone, abbrp, wp);
+	warned = TRUE;
+}
+
+static void
+usage(const char *progname, FILE *stream, int status)
+{
+	(void) fprintf(stream,
+_("%s: usage is %s [ --version ] [ --help ] [ -v ] [ -c [loyear,]hiyear ] zonename ...\n\
+\n\
+Report bugs to tz@elsie.nci.nih.gov.\n"),
+		       progname, progname);
+	exit(status);
+}
+
+int
+main(argc, argv)
+int	argc;
+char *	argv[];
+{
+	register int		i;
+	register int		c;
+	register int		vflag;
+	register char *		cutarg;
+	register long		cutloyear = ZDUMP_LO_YEAR;
+	register long		cuthiyear = ZDUMP_HI_YEAR;
+	register time_t		cutlotime;
+	register time_t		cuthitime;
+	register char **	fakeenv;
+	time_t			now;
+	time_t			t;
+	time_t			newt;
+	struct tm		tm;
+	struct tm		newtm;
+	register struct tm *	tmp;
+	register struct tm *	newtmp;
+
+	INITIALIZE(cutlotime);
+	INITIALIZE(cuthitime);
+#if HAVE_GETTEXT
+	(void) setlocale(LC_ALL, "");
+#ifdef TZ_DOMAINDIR
+	(void) bindtextdomain(TZ_DOMAIN, TZ_DOMAINDIR);
+#endif /* defined TEXTDOMAINDIR */
+	(void) textdomain(TZ_DOMAIN);
+#endif /* HAVE_GETTEXT */
+	progname = argv[0];
+	for (i = 1; i < argc; ++i)
+		if (strcmp(argv[i], "--version") == 0) {
+			(void) printf("%s\n", elsieid);
+			exit(EXIT_SUCCESS);
+		} else if (strcmp(argv[i], "--help") == 0) {
+			usage(progname, stdout, EXIT_SUCCESS);
+		}
+	vflag = 0;
+	cutarg = NULL;
+	while ((c = getopt(argc, argv, "c:v")) == 'c' || c == 'v')
+		if (c == 'v')
+			vflag = 1;
+		else	cutarg = optarg;
+	if ((c != EOF && c != -1) ||
+		(optind == argc - 1 && strcmp(argv[optind], "=") == 0)) {
+			usage(progname, stderr, EXIT_FAILURE);
+	}
+	if (vflag) {
+		if (cutarg != NULL) {
+			long	lo;
+			long	hi;
+			char	dummy;
+
+			if (sscanf(cutarg, "%ld%c", &hi, &dummy) == 1) {
+				cuthiyear = hi;
+			} else if (sscanf(cutarg, "%ld,%ld%c",
+				&lo, &hi, &dummy) == 2) {
+					cutloyear = lo;
+					cuthiyear = hi;
+			} else {
+(void) fprintf(stderr, _("%s: wild -c argument %s\n"),
+					progname, cutarg);
+				exit(EXIT_FAILURE);
+			}
+		}
+		setabsolutes();
+		cutlotime = yeartot(cutloyear);
+		cuthitime = yeartot(cuthiyear);
+	}
+	(void) time(&now);
+	longest = 0;
+	for (i = optind; i < argc; ++i)
+		if (strlen(argv[i]) > longest)
+			longest = strlen(argv[i]);
+	{
+		register int	from;
+		register int	to;
+
+		for (i = 0; environ[i] != NULL; ++i)
+			continue;
+		fakeenv = (char **) malloc((size_t) ((i + 2) *
+			sizeof *fakeenv));
+		if (fakeenv == NULL ||
+			(fakeenv[0] = (char *) malloc(longest + 4)) == NULL) {
+					(void) perror(progname);
+					exit(EXIT_FAILURE);
+		}
+		to = 0;
+		(void) strcpy(fakeenv[to++], "TZ=");
+		for (from = 0; environ[from] != NULL; ++from)
+			if (strncmp(environ[from], "TZ=", 3) != 0)
+				fakeenv[to++] = environ[from];
+		fakeenv[to] = NULL;
+		environ = fakeenv;
+	}
+	for (i = optind; i < argc; ++i) {
+		static char	buf[MAX_STRING_LENGTH];
+
+		(void) strcpy(&fakeenv[0][3], argv[i]);
+		if (!vflag) {
+			show(argv[i], now, FALSE);
+			continue;
+		}
+		warned = FALSE;
+		t = absolute_min_time;
+		show(argv[i], t, TRUE);
+		t += SECSPERHOUR * HOURSPERDAY;
+		show(argv[i], t, TRUE);
+		if (t < cutlotime)
+			t = cutlotime;
+		tmp = my_localtime(&t);
+		if (tmp != NULL) {
+			tm = *tmp;
+			(void) strncpy(buf, abbr(&tm), (sizeof buf) - 1);
+		}
+		for ( ; ; ) {
+			if (t >= cuthitime || t >= cuthitime - SECSPERHOUR * 12)
+				break;
+			newt = t + SECSPERHOUR * 12;
+			newtmp = localtime(&newt);
+			if (newtmp != NULL)
+				newtm = *newtmp;
+			if ((tmp == NULL || newtmp == NULL) ? (tmp != newtmp) :
+				(delta(&newtm, &tm) != (newt - t) ||
+				newtm.tm_isdst != tm.tm_isdst ||
+				strcmp(abbr(&newtm), buf) != 0)) {
+					newt = hunt(argv[i], t, newt);
+					newtmp = localtime(&newt);
+					if (newtmp != NULL) {
+						newtm = *newtmp;
+						(void) strncpy(buf,
+							abbr(&newtm),
+							(sizeof buf) - 1);
+					}
+			}
+			t = newt;
+			tm = newtm;
+			tmp = newtmp;
+		}
+		t = absolute_max_time;
+		t -= SECSPERHOUR * HOURSPERDAY;
+		show(argv[i], t, TRUE);
+		t += SECSPERHOUR * HOURSPERDAY;
+		show(argv[i], t, TRUE);
+	}
+	if (fflush(stdout) || ferror(stdout)) {
+		(void) fprintf(stderr, "%s: ", progname);
+		(void) perror(_("Error writing to standard output"));
+		exit(EXIT_FAILURE);
+	}
+	exit(EXIT_SUCCESS);
+	/* If exit fails to exit... */
+	return EXIT_FAILURE;
+}
+
+static void
+setabsolutes(void)
+{
+	if (0.5 == (time_t) 0.5) {
+		/*
+		** time_t is floating.
+		*/
+		if (sizeof (time_t) == sizeof (float)) {
+			absolute_min_time = (time_t) -FLT_MAX;
+			absolute_max_time = (time_t) FLT_MAX;
+		} else if (sizeof (time_t) == sizeof (double)) {
+			absolute_min_time = (time_t) -DBL_MAX;
+			absolute_max_time = (time_t) DBL_MAX;
+		} else {
+			(void) fprintf(stderr,
+_("%s: use of -v on system with floating time_t other than float or double\n"),
+				progname);
+			exit(EXIT_FAILURE);
+		}
+	} else if (0 > (time_t) -1) {
+		/*
+		** time_t is signed.  Assume overflow wraps around.
+		*/
+		time_t t = 0;
+		time_t t1 = 1;
+
+		while (t < t1) {
+			t = t1;
+			t1 = 2 * t1 + 1;
+		}
+
+		absolute_max_time = t;
+		t = -t;
+		absolute_min_time = t - 1;
+		if (t < absolute_min_time)
+			absolute_min_time = t;
+	} else {
+		/*
+		** time_t is unsigned.
+		*/
+		absolute_min_time = 0;
+		absolute_max_time = absolute_min_time - 1;
+	}
+}
+
+static time_t
+yeartot(y)
+const long	y;
+{
+	register long	myy;
+	register long	seconds;
+	register time_t	t;
+
+	myy = EPOCH_YEAR;
+	t = 0;
+	while (myy != y) {
+		if (myy < y) {
+			seconds = isleap(myy) ? SECSPERLYEAR : SECSPERNYEAR;
+			++myy;
+			if (t > absolute_max_time - seconds) {
+				t = absolute_max_time;
+				break;
+			}
+			t += seconds;
+		} else {
+			--myy;
+			seconds = isleap(myy) ? SECSPERLYEAR : SECSPERNYEAR;
+			if (t < absolute_min_time + seconds) {
+				t = absolute_min_time;
+				break;
+			}
+			t -= seconds;
+		}
+	}
+	return t;
+}
+
+static time_t
+hunt(char *name, time_t lot, time_t hit)
+{
+	time_t			t;
+	long			diff;
+	struct tm		lotm;
+	register struct tm *	lotmp;
+	struct tm		tm;
+	register struct tm *	tmp;
+	char			loab[MAX_STRING_LENGTH];
+
+	lotmp = my_localtime(&lot);
+	if (lotmp != NULL) {
+		lotm = *lotmp;
+		(void) strncpy(loab, abbr(&lotm), (sizeof loab) - 1);
+	}
+	for ( ; ; ) {
+		diff = (long) (hit - lot);
+		if (diff < 2)
+			break;
+		t = lot;
+		t += diff / 2;
+		if (t <= lot)
+			++t;
+		else if (t >= hit)
+			--t;
+		tmp = my_localtime(&t);
+		if (tmp != NULL)
+			tm = *tmp;
+		if ((lotmp == NULL || tmp == NULL) ? (lotmp == tmp) :
+			(delta(&tm, &lotm) == (t - lot) &&
+			tm.tm_isdst == lotm.tm_isdst &&
+			strcmp(abbr(&tm), loab) == 0)) {
+				lot = t;
+				lotm = tm;
+				lotmp = tmp;
+		} else	hit = t;
+	}
+	show(name, lot, TRUE);
+	show(name, hit, TRUE);
+	return hit;
+}
+
+/*
+** Thanks to Paul Eggert for logic used in delta.
+*/
+
+static long
+delta(newp, oldp)
+struct tm *	newp;
+struct tm *	oldp;
+{
+	register long	result;
+	register int	tmy;
+
+	if (newp->tm_year < oldp->tm_year)
+		return -delta(oldp, newp);
+	result = 0;
+	for (tmy = oldp->tm_year; tmy < newp->tm_year; ++tmy)
+		result += DAYSPERNYEAR + isleap_sum(tmy, TM_YEAR_BASE);
+	result += newp->tm_yday - oldp->tm_yday;
+	result *= HOURSPERDAY;
+	result += newp->tm_hour - oldp->tm_hour;
+	result *= MINSPERHOUR;
+	result += newp->tm_min - oldp->tm_min;
+	result *= SECSPERMIN;
+	result += newp->tm_sec - oldp->tm_sec;
+	return result;
+}
+
+static void
+show(char *zone, time_t t, int v)
+{
+	register struct tm *	tmp;
+
+	(void) printf("%-*s  ", (int) longest, zone);
+	if (v) {
+		tmp = gmtime(&t);
+		if (tmp == NULL) {
+			(void) printf(tformat(), t);
+		} else {
+			dumptime(tmp);
+			(void) printf(" UTC");
+		}
+		(void) printf(" = ");
+	}
+	tmp = my_localtime(&t);
+	dumptime(tmp);
+	if (tmp != NULL) {
+		if (*abbr(tmp) != '\0')
+			(void) printf(" %s", abbr(tmp));
+		if (v) {
+			(void) printf(" isdst=%d", tmp->tm_isdst);
+#ifdef TM_GMTOFF
+			(void) printf(" gmtoff=%ld", tmp->TM_GMTOFF);
+#endif /* defined TM_GMTOFF */
+		}
+	}
+	(void) printf("\n");
+	if (tmp != NULL && *abbr(tmp) != '\0')
+		abbrok(abbr(tmp), zone);
+}
+
+static char *
+abbr(tmp)
+struct tm *	tmp;
+{
+	register char *	result;
+	static char	nada;
+
+	if (tmp->tm_isdst != 0 && tmp->tm_isdst != 1)
+		return &nada;
+	result = tzname[tmp->tm_isdst];
+	return (result == NULL) ? &nada : result;
+}
+
+/*
+** The code below can fail on certain theoretical systems;
+** it works on all known real-world systems as of 2004-12-30.
+*/
+
+static const char *
+tformat(void)
+{
+	if (0.5 == (time_t) 0.5) {	/* floating */
+		if (sizeof (time_t) > sizeof (double))
+			return "%Lg";
+		return "%g";
+	}
+	if (0 > (time_t) -1) {		/* signed */
+		if (sizeof (time_t) > sizeof (long))
+			return "%lld";
+		if (sizeof (time_t) > sizeof (int))
+			return "%ld";
+		return "%d";
+	}
+	if (sizeof (time_t) > sizeof (unsigned long))
+		return "%llu";
+	if (sizeof (time_t) > sizeof (unsigned int))
+		return "%lu";
+	return "%u";
+}
+
+static void
+dumptime(timeptr)
+register const struct tm *	timeptr;
+{
+	static const char	wday_name[][3] = {
+		"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"
+	};
+	static const char	mon_name[][3] = {
+		"Jan", "Feb", "Mar", "Apr", "May", "Jun",
+		"Jul", "Aug", "Sep", "Oct", "Nov", "Dec"
+	};
+	register const char *	wn;
+	register const char *	mn;
+	register int		lead;
+	register int		trail;
+
+	if (timeptr == NULL) {
+		(void) printf("NULL");
+		return;
+	}
+	/*
+	** The packaged versions of localtime and gmtime never put out-of-range
+	** values in tm_wday or tm_mon, but since this code might be compiled
+	** with other (perhaps experimental) versions, paranoia is in order.
+	*/
+	if (timeptr->tm_wday < 0 || timeptr->tm_wday >=
+		(int) (sizeof wday_name / sizeof wday_name[0]))
+			wn = "???";
+	else		wn = wday_name[timeptr->tm_wday];
+	if (timeptr->tm_mon < 0 || timeptr->tm_mon >=
+		(int) (sizeof mon_name / sizeof mon_name[0]))
+			mn = "???";
+	else		mn = mon_name[timeptr->tm_mon];
+	(void) printf("%.3s %.3s%3d %.2d:%.2d:%.2d ",
+		wn, mn,
+		timeptr->tm_mday, timeptr->tm_hour,
+		timeptr->tm_min, timeptr->tm_sec);
+#define DIVISOR	10
+	trail = timeptr->tm_year % DIVISOR + TM_YEAR_BASE % DIVISOR;
+	lead = timeptr->tm_year / DIVISOR + TM_YEAR_BASE / DIVISOR +
+		trail / DIVISOR;
+	trail %= DIVISOR;
+	if (trail < 0 && lead > 0) {
+		trail += DIVISOR;
+		--lead;
+	} else if (lead < 0 && trail > 0) {
+		trail -= DIVISOR;
+		++lead;
+	}
+	if (lead == 0)
+		(void) printf("%d", trail);
+	else	(void) printf("%d%d", lead, ((trail < 0) ? -trail : trail));
+}

Property changes on: vendor/tzcode/tzcode2009h/zic/zdump.c
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+FreeBSD=%H
\ No newline at end of property
Index: vendor/tzcode/tzcode2009h/zic/zic.8
===================================================================
--- vendor/tzcode/tzcode2009h/zic/zic.8	(nonexistent)
+++ vendor/tzcode/tzcode2009h/zic/zic.8	(revision 192888)
@@ -0,0 +1,495 @@
+.TH ZIC 8
+.SH NAME
+zic \- time zone compiler
+.SH SYNOPSIS
+.B zic
+[
+.B \-\-version
+]
+[
+.B \-v
+] [
+.B \-d
+.I directory
+] [
+.B \-l
+.I localtime
+] [
+.B \-p
+.I posixrules
+] [
+.B \-L
+.I leapsecondfilename
+] [
+.B \-s
+] [
+.B \-y
+.I command
+] [
+.I filename
+\&... ]
+.SH DESCRIPTION
+.if t .ds lq ``
+.if t .ds rq ''
+.if n .ds lq \&"\"
+.if n .ds rq \&"\"
+.de q
+\\$3\*(lq\\$1\*(rq\\$2
+..
+.I Zic
+reads text from the file(s) named on the command line
+and creates the time conversion information files specified in this input.
+If a
+.I filename
+is
+.BR \- ,
+the standard input is read.
+.PP
+These options are available:
+.TP
+.BI "\-\-version"
+Output version information and exit.
+.TP
+.BI "\-d " directory
+Create time conversion information files in the named directory rather than
+in the standard directory named below.
+.TP
+.BI "\-l " timezone
+Use the given time zone as local time.
+.I Zic
+will act as if the input contained a link line of the form
+.sp
+.ti +.5i
+Link	\fItimezone\fP		localtime
+.TP
+.BI "\-p " timezone
+Use the given time zone's rules when handling POSIX-format
+time zone environment variables.
+.I Zic
+will act as if the input contained a link line of the form
+.sp
+.ti +.5i
+Link	\fItimezone\fP		posixrules
+.TP
+.BI "\-L " leapsecondfilename
+Read leap second information from the file with the given name.
+If this option is not used,
+no leap second information appears in output files.
+.TP
+.B \-v
+Complain if a year that appears in a data file is outside the range
+of years representable by
+.IR time (2)
+values.
+Also complain if a time of 24:00
+(which cannot be handled by pre-1998 versions of
+.IR zic )
+appears in the input.
+.TP
+.B \-s
+Limit time values stored in output files to values that are the same
+whether they're taken to be signed or unsigned.
+You can use this option to generate SVVS-compatible files.
+.TP
+.BI "\-y " command
+Use the given
+.I command
+rather than
+.B yearistype
+when checking year types (see below).
+.PP
+Input lines are made up of fields.
+Fields are separated from one another by any number of white space characters.
+Leading and trailing white space on input lines is ignored.
+An unquoted sharp character (#) in the input introduces a comment which extends
+to the end of the line the sharp character appears on.
+White space characters and sharp characters may be enclosed in double quotes
+(") if they're to be used as part of a field.
+Any line that is blank (after comment stripping) is ignored.
+Non-blank lines are expected to be of one of three types:
+rule lines, zone lines, and link lines.
+.PP
+A rule line has the form
+.nf
+.ti +.5i
+.ta \w'Rule\0\0'u +\w'NAME\0\0'u +\w'FROM\0\0'u +\w'1973\0\0'u +\w'TYPE\0\0'u +\w'Apr\0\0'u +\w'lastSun\0\0'u +\w'2:00\0\0'u +\w'SAVE\0\0'u
+.sp
+Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
+.sp
+For example:
+.ti +.5i
+.sp
+Rule	US	1967	1973	\-	Apr	lastSun	2:00	1:00	D
+.sp
+.fi
+The fields that make up a rule line are:
+.TP "\w'LETTER/S'u"
+.B NAME
+Gives the (arbitrary) name of the set of rules this rule is part of.
+.TP
+.B FROM
+Gives the first year in which the rule applies.
+Any integer year can be supplied; the Gregorian calendar is assumed.
+The word
+.B minimum
+(or an abbreviation) means the minimum year representable as an integer.
+The word
+.B maximum
+(or an abbreviation) means the maximum year representable as an integer.
+Rules can describe times that are not representable as time values,
+with the unrepresentable times ignored; this allows rules to be portable
+among hosts with differing time value types.
+.TP
+.B TO
+Gives the final year in which the rule applies.
+In addition to
+.B minimum
+and
+.B maximum
+(as above),
+the word
+.B only
+(or an abbreviation)
+may be used to repeat the value of the
+.B FROM
+field.
+.TP
+.B TYPE
+Gives the type of year in which the rule applies.
+If
+.B TYPE
+is
+.B \-
+then the rule applies in all years between
+.B FROM
+and
+.B TO
+inclusive.
+If
+.B TYPE
+is something else, then
+.I zic
+executes the command
+.ti +.5i
+\fByearistype\fP \fIyear\fP \fItype\fP
+.br
+to check the type of a year:
+an exit status of zero is taken to mean that the year is of the given type;
+an exit status of one is taken to mean that the year is not of the given type.
+.TP
+.B IN
+Names the month in which the rule takes effect.
+Month names may be abbreviated.
+.TP
+.B ON
+Gives the day on which the rule takes effect.
+Recognized forms include:
+.nf
+.in +.5i
+.sp
+.ta \w'Sun<=25\0\0'u
+5	the fifth of the month
+lastSun	the last Sunday in the month
+lastMon	the last Monday in the month
+Sun>=8	first Sunday on or after the eighth
+Sun<=25	last Sunday on or before the 25th
+.fi
+.in -.5i
+.sp
+Names of days of the week may be abbreviated or spelled out in full.
+Note that there must be no spaces within the
+.B ON
+field.
+.TP
+.B AT
+Gives the time of day at which the rule takes effect.
+Recognized forms include:
+.nf
+.in +.5i
+.sp
+.ta \w'1:28:13\0\0'u
+2	time in hours
+2:00	time in hours and minutes
+15:00	24-hour format time (for times after noon)
+1:28:14	time in hours, minutes, and seconds
+\-	equivalent to 0
+.fi
+.in -.5i
+.sp
+where hour 0 is midnight at the start of the day,
+and hour 24 is midnight at the end of the day.
+Any of these forms may be followed by the letter
+.B w
+if the given time is local
+.q "wall clock"
+time,
+.B s
+if the given time is local
+.q standard
+time, or
+.B u
+(or
+.B g
+or
+.BR z )
+if the given time is universal time;
+in the absence of an indicator,
+wall clock time is assumed.
+.TP
+.B SAVE
+Gives the amount of time to be added to local standard time when the rule is in
+effect.
+This field has the same format as the
+.B AT
+field
+(although, of course, the
+.B w
+and
+.B s
+suffixes are not used).
+.TP
+.B LETTER/S
+Gives the
+.q "variable part"
+(for example, the
+.q S
+or
+.q D
+in
+.q EST
+or
+.q EDT )
+of time zone abbreviations to be used when this rule is in effect.
+If this field is
+.BR \- ,
+the variable part is null.
+.PP
+A zone line has the form
+.sp
+.nf
+.ti +.5i
+.ta \w'Zone\0\0'u +\w'Australia/Adelaide\0\0'u +\w'GMTOFF\0\0'u +\w'RULES/SAVE\0\0'u +\w'FORMAT\0\0'u
+Zone	NAME	GMTOFF	RULES/SAVE	FORMAT	[UNTILYEAR [MONTH [DAY [TIME]]]]
+.sp
+For example:
+.sp
+.ti +.5i
+Zone	Australia/Adelaide	9:30	Aus	CST	1971 Oct 31 2:00
+.sp
+.fi
+The fields that make up a zone line are:
+.TP "\w'GMTOFF'u"
+.B NAME
+The name of the time zone.
+This is the name used in creating the time conversion information file for the
+zone.
+.TP
+.B GMTOFF
+The amount of time to add to UTC to get standard time in this zone.
+This field has the same format as the
+.B AT
+and
+.B SAVE
+fields of rule lines;
+begin the field with a minus sign if time must be subtracted from UTC.
+.TP
+.B RULES/SAVE
+The name of the rule(s) that apply in the time zone or,
+alternately, an amount of time to add to local standard time.
+If this field is
+.B \-
+then standard time always applies in the time zone.
+.TP
+.B FORMAT
+The format for time zone abbreviations in this time zone.
+The pair of characters
+.B %s
+is used to show where the
+.q "variable part"
+of the time zone abbreviation goes.
+Alternately,
+a slash (/)
+separates standard and daylight abbreviations.
+.TP
+.B UNTILYEAR [MONTH [DAY [TIME]]]
+The time at which the UTC offset or the rule(s) change for a location.
+It is specified as a year, a month, a day, and a time of day.
+If this is specified,
+the time zone information is generated from the given UTC offset
+and rule change until the time specified.
+The month, day, and time of day have the same format as the IN, ON, and AT
+fields of a rule; trailing fields can be omitted, and default to the
+earliest possible value for the missing fields.
+.IP
+The next line must be a
+.q continuation
+line; this has the same form as a zone line except that the
+string
+.q Zone
+and the name are omitted, as the continuation line will
+place information starting at the time specified as the
+.q until
+information in the previous line in the file used by the previous line.
+Continuation lines may contain
+.q until
+information, just as zone lines do, indicating that the next line is a further
+continuation.
+.PP
+A link line has the form
+.sp
+.nf
+.ti +.5i
+.ta \w'Link\0\0'u +\w'Europe/Istanbul\0\0'u
+Link	LINK-FROM	LINK-TO
+.sp
+For example:
+.sp
+.ti +.5i
+Link	Europe/Istanbul	Asia/Istanbul
+.sp
+.fi
+The
+.B LINK-FROM
+field should appear as the
+.B NAME
+field in some zone line;
+the
+.B LINK-TO
+field is used as an alternate name for that zone.
+.PP
+Except for continuation lines,
+lines may appear in any order in the input.
+.PP
+Lines in the file that describes leap seconds have the following form:
+.nf
+.ti +.5i
+.ta \w'Leap\0\0'u +\w'YEAR\0\0'u +\w'MONTH\0\0'u +\w'DAY\0\0'u +\w'HH:MM:SS\0\0'u +\w'CORR\0\0'u
+.sp
+Leap	YEAR	MONTH	DAY	HH:MM:SS	CORR	R/S
+.sp
+For example:
+.ti +.5i
+.sp
+Leap	1974	Dec	31	23:59:60	+	S
+.sp
+.fi
+The
+.BR YEAR ,
+.BR MONTH ,
+.BR DAY ,
+and
+.B HH:MM:SS
+fields tell when the leap second happened.
+The
+.B CORR
+field
+should be
+.q +
+if a second was added
+or
+.q -
+if a second was skipped.
+.\" There's no need to document the following, since it's impossible for more
+.\" than one leap second to be inserted or deleted at a time.
+.\" The C Standard is in error in suggesting the possibility.
+.\" See Terry J Quinn, The BIPM and the accurate measure of time,
+.\" Proc IEEE 79, 7 (July 1991), 894-905.
+.\"	or
+.\"	.q ++
+.\"	if two seconds were added
+.\"	or
+.\"	.q --
+.\"	if two seconds were skipped.
+The
+.B R/S
+field
+should be (an abbreviation of)
+.q Stationary
+if the leap second time given by the other fields should be interpreted as UTC
+or
+(an abbreviation of)
+.q Rolling
+if the leap second time given by the other fields should be interpreted as
+local wall clock time.
+.SH "EXTENDED EXAMPLE"
+Here is an extended example of
+.I zic
+input, intended to illustrate many of its features.
+.br
+.ne 22
+.nf
+.in +2m
+.ta \w'# Rule\0\0'u +\w'NAME\0\0'u +\w'FROM\0\0'u +\w'1973\0\0'u +\w'TYPE\0\0'u +\w'Apr\0\0'u +\w'lastSun\0\0'u +\w'2:00\0\0'u +\w'SAVE\0\0'u
+.sp
+# Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
+Rule	Swiss	1940	only	-	Nov	2	0:00	1:00	S
+Rule	Swiss	1940	only	-	Dec	31	0:00	0	-
+Rule	Swiss	1941	1942	-	May	Sun>=1	2:00	1:00	S
+Rule	Swiss	1941	1942	-	Oct	Sun>=1	0:00	0
+.sp .5
+Rule	EU	1977	1980	-	Apr	Sun>=1	1:00u	1:00	S
+Rule	EU	1977	only	-	Sep	lastSun	1:00u	0	-
+Rule	EU	1978	only	-	Oct	 1	1:00u	0	-
+Rule	EU	1979	1995	-	Sep	lastSun	1:00u	0	-
+Rule	EU	1981	max	-	Mar	lastSun	1:00u	1:00	S
+Rule	EU	1996	max	-	Oct	lastSun	1:00u	0	-
+.sp
+.ta \w'# Zone\0\0'u +\w'Europe/Zurich\0\0'u +\w'0:34:08\0\0'u +\w'RULES/SAVE\0\0'u +\w'FORMAT\0\0'u
+# Zone	NAME	GMTOFF	RULES	FORMAT	UNTIL
+Zone	Europe/Zurich	0:34:08	-	LMT	1848 Sep 12
+		0:29:44	-	BMT	1894 Jun
+		1:00	Swiss	CE%sT	1981
+		1:00	EU	CE%sT
+.sp
+Link	Europe/Zurich	Switzerland
+.sp
+.in
+.fi
+In this example, the zone is named Europe/Zurich but it has an alias
+as Switzerland.  Zurich was 34 minutes and 8 seconds west of GMT until
+1848-09-12 at 00:00, when the offset changed to 29 minutes and 44
+seconds.  After 1894-06-01 at 00:00 Swiss daylight saving rules (defined
+with lines beginning with "Rule Swiss") apply, and the GMT offset
+became one hour.  From 1981 to the present, EU daylight saving rules have
+applied, and the UTC offset has remained at one hour.
+.PP
+In 1940, daylight saving time applied from November 2 at 00:00 to
+December 31 at 00:00.  In 1941 and 1942, daylight saving time applied
+from the first Sunday in May at 02:00 to the first Sunday in October
+at 00:00.
+The pre-1981 EU daylight-saving rules have no effect
+here, but are included for completeness.  Since 1981, daylight
+saving has begun on the last Sunday in March at 01:00 UTC.
+Until 1995 it ended the last Sunday in September at 01:00 UTC,
+but this changed to the last Sunday in October starting in 1996.
+.PP
+For purposes of
+display, "LMT" and "BMT" were initially used, respectively.  Since
+Swiss rules and later EU rules were applied, the display name for the
+timezone has been CET for standard time and CEST for daylight saving
+time.
+.SH NOTES
+For areas with more than two types of local time,
+you may need to use local standard time in the
+.B AT
+field of the earliest transition time's rule to ensure that
+the earliest transition time recorded in the compiled file is correct.
+.PP
+If,
+for a particular zone,
+a clock advance caused by the start of daylight saving
+coincides with and is equal to
+a clock retreat caused by a change in UTC offset,
+.IR zic
+produces a single transition to daylight saving at the new UTC offset
+(without any change in wall clock time).
+To get separate transitions
+use multiple zone continuation lines
+specifying transition instants using universal time.
+.SH FILE
+/usr/local/etc/zoneinfo	standard directory used for created files
+.SH "SEE ALSO"
+newctime(3), tzfile(5), zdump(8)
+.\" @(#)zic.8	8.5
+.\" This file is in the public domain, so clarified as of
+.\" 2009-05-17 by Arthur David Olson.

Property changes on: vendor/tzcode/tzcode2009h/zic/zic.8
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+FreeBSD=%H
\ No newline at end of property
Index: vendor/tzcode/tzcode2009h/zic/ialloc.c
===================================================================
--- vendor/tzcode/tzcode2009h/zic/ialloc.c	(nonexistent)
+++ vendor/tzcode/tzcode2009h/zic/ialloc.c	(revision 192888)
@@ -0,0 +1,86 @@
+/*
+** This file is in the public domain, so clarified as of
+** 2006-07-17 by Arthur David Olson.
+*/
+
+#ifndef lint
+#ifndef NOID
+static char	elsieid[] = "@(#)ialloc.c	8.30";
+#endif /* !defined NOID */
+#endif /* !defined lint */
+
+/*LINTLIBRARY*/
+
+#include "private.h"
+
+#define nonzero(n)	(((n) == 0) ? 1 : (n))
+
+char *
+imalloc(n)
+const int	n;
+{
+	return malloc((size_t) nonzero(n));
+}
+
+char *
+icalloc(nelem, elsize)
+int	nelem;
+int	elsize;
+{
+	if (nelem == 0 || elsize == 0)
+		nelem = elsize = 1;
+	return calloc((size_t) nelem, (size_t) elsize);
+}
+
+void *
+irealloc(pointer, size)
+void * const	pointer;
+const int	size;
+{
+	if (pointer == NULL)
+		return imalloc(size);
+	return realloc((void *) pointer, (size_t) nonzero(size));
+}
+
+char *
+icatalloc(old, new)
+char * const		old;
+const char * const	new;
+{
+	register char *	result;
+	register int	oldsize, newsize;
+
+	newsize = (new == NULL) ? 0 : strlen(new);
+	if (old == NULL)
+		oldsize = 0;
+	else if (newsize == 0)
+		return old;
+	else	oldsize = strlen(old);
+	if ((result = irealloc(old, oldsize + newsize + 1)) != NULL)
+		if (new != NULL)
+			(void) strcpy(result + oldsize, new);
+	return result;
+}
+
+char *
+icpyalloc(string)
+const char * const	string;
+{
+	return icatalloc((char *) NULL, string);
+}
+
+void
+ifree(p)
+char * const	p;
+{
+	if (p != NULL)
+		(void) free(p);
+}
+
+void
+icfree(p)
+char * const	p;
+{
+	if (p != NULL)
+		(void) free(p);
+}

Property changes on: vendor/tzcode/tzcode2009h/zic/ialloc.c
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+FreeBSD=%H
\ No newline at end of property
Index: vendor/tzcode/tzcode2009h/zic/private.h
===================================================================
--- vendor/tzcode/tzcode2009h/zic/private.h	(nonexistent)
+++ vendor/tzcode/tzcode2009h/zic/private.h	(revision 192888)
@@ -0,0 +1,298 @@
+#ifndef PRIVATE_H
+
+#define PRIVATE_H
+
+/*
+** This file is in the public domain, so clarified as of
+** 1996-06-05 by Arthur David Olson.
+*/
+
+/*
+** This header is for use ONLY with the time conversion code.
+** There is no guarantee that it will remain unchanged,
+** or that it will remain at all.
+** Do NOT copy it to any system include directory.
+** Thank you!
+*/
+
+/*
+** ID
+*/
+
+#ifndef lint
+#ifndef NOID
+static char	privatehid[] = "@(#)private.h	8.6";
+#endif /* !defined NOID */
+#endif /* !defined lint */
+
+#define GRANDPARENTED	"Local time zone must be set--see zic manual page"
+
+/*
+** Defaults for preprocessor symbols.
+** You can override these in your C compiler options, e.g. `-DHAVE_ADJTIME=0'.
+*/
+
+#ifndef HAVE_ADJTIME
+#define HAVE_ADJTIME		1
+#endif /* !defined HAVE_ADJTIME */
+
+#ifndef HAVE_GETTEXT
+#define HAVE_GETTEXT		0
+#endif /* !defined HAVE_GETTEXT */
+
+#ifndef HAVE_INCOMPATIBLE_CTIME_R
+#define HAVE_INCOMPATIBLE_CTIME_R	0
+#endif /* !defined INCOMPATIBLE_CTIME_R */
+
+#ifndef HAVE_SETTIMEOFDAY
+#define HAVE_SETTIMEOFDAY	3
+#endif /* !defined HAVE_SETTIMEOFDAY */
+
+#ifndef HAVE_SYMLINK
+#define HAVE_SYMLINK		1
+#endif /* !defined HAVE_SYMLINK */
+
+#ifndef HAVE_SYS_STAT_H
+#define HAVE_SYS_STAT_H		1
+#endif /* !defined HAVE_SYS_STAT_H */
+
+#ifndef HAVE_SYS_WAIT_H
+#define HAVE_SYS_WAIT_H		1
+#endif /* !defined HAVE_SYS_WAIT_H */
+
+#ifndef HAVE_UNISTD_H
+#define HAVE_UNISTD_H		1
+#endif /* !defined HAVE_UNISTD_H */
+
+#ifndef HAVE_UTMPX_H
+#define HAVE_UTMPX_H		0
+#endif /* !defined HAVE_UTMPX_H */
+
+#ifndef LOCALE_HOME
+#define LOCALE_HOME		"/usr/lib/locale"
+#endif /* !defined LOCALE_HOME */
+
+#if HAVE_INCOMPATIBLE_CTIME_R
+#define asctime_r _incompatible_asctime_r
+#define ctime_r _incompatible_ctime_r
+#endif /* HAVE_INCOMPATIBLE_CTIME_R */
+
+/*
+** Nested includes
+*/
+
+#include "sys/types.h"	/* for time_t */
+#include "stdio.h"
+#include "errno.h"
+#include "string.h"
+#include "limits.h"	/* for CHAR_BIT et al. */
+#include "time.h"
+#include "stdlib.h"
+
+#if HAVE_GETTEXT
+#include "libintl.h"
+#endif /* HAVE_GETTEXT */
+
+#if HAVE_SYS_WAIT_H
+#include 	/* for WIFEXITED and WEXITSTATUS */
+#endif /* HAVE_SYS_WAIT_H */
+
+#ifndef WIFEXITED
+#define WIFEXITED(status)	(((status) & 0xff) == 0)
+#endif /* !defined WIFEXITED */
+#ifndef WEXITSTATUS
+#define WEXITSTATUS(status)	(((status) >> 8) & 0xff)
+#endif /* !defined WEXITSTATUS */
+
+#if HAVE_UNISTD_H
+#include "unistd.h"	/* for F_OK, R_OK, and other POSIX goodness */
+#endif /* HAVE_UNISTD_H */
+
+#ifndef F_OK
+#define F_OK	0
+#endif /* !defined F_OK */
+#ifndef R_OK
+#define R_OK	4
+#endif /* !defined R_OK */
+
+/* Unlike 's isdigit, this also works if c < 0 | c > UCHAR_MAX. */
+#define is_digit(c) ((unsigned)(c) - '0' <= 9)
+
+/*
+** Define HAVE_STDINT_H's default value here, rather than at the
+** start, since __GLIBC__'s value depends on previously-included
+** files.
+** (glibc 2.1 and later have stdint.h, even with pre-C99 compilers.)
+*/
+#ifndef HAVE_STDINT_H
+#define HAVE_STDINT_H \
+	(199901 <= __STDC_VERSION__ || \
+	2 < (__GLIBC__ + (0 < __GLIBC_MINOR__)))
+#endif /* !defined HAVE_STDINT_H */
+
+#if HAVE_STDINT_H
+#include "stdint.h"
+#endif /* !HAVE_STDINT_H */
+
+#ifndef INT_FAST64_MAX
+/* Pre-C99 GCC compilers define __LONG_LONG_MAX__ instead of LLONG_MAX.  */
+#if defined LLONG_MAX || defined __LONG_LONG_MAX__
+typedef long long	int_fast64_t;
+#else /* ! (defined LLONG_MAX || defined __LONG_LONG_MAX__) */
+#if (LONG_MAX >> 31) < 0xffffffff
+Please use a compiler that supports a 64-bit integer type (or wider);
+you may need to compile with "-DHAVE_STDINT_H".
+#endif /* (LONG_MAX >> 31) < 0xffffffff */
+typedef long		int_fast64_t;
+#endif /* ! (defined LLONG_MAX || defined __LONG_LONG_MAX__) */
+#endif /* !defined INT_FAST64_MAX */
+
+#ifndef INT32_MAX
+#define INT32_MAX 0x7fffffff
+#endif /* !defined INT32_MAX */
+#ifndef INT32_MIN
+#define INT32_MIN (-1 - INT32_MAX)
+#endif /* !defined INT32_MIN */
+
+/*
+** Workarounds for compilers/systems.
+*/
+
+/*
+** Some time.h implementations don't declare asctime_r.
+** Others might define it as a macro.
+** Fix the former without affecting the latter.
+*/
+
+#ifndef asctime_r
+extern char *	asctime_r(struct tm const *, char *);
+#endif
+
+/*
+** Private function declarations.
+*/
+
+char *		icalloc(int nelem, int elsize);
+char *		icatalloc(char * old, const char * new);
+char *		icpyalloc(const char * string);
+char *		imalloc(int n);
+void *		irealloc(void * pointer, int size);
+void		icfree(char * pointer);
+void		ifree(char * pointer);
+const char *	scheck(const char * string, const char * format);
+
+/*
+** Finally, some convenience items.
+*/
+
+#ifndef TRUE
+#define TRUE	1
+#endif /* !defined TRUE */
+
+#ifndef FALSE
+#define FALSE	0
+#endif /* !defined FALSE */
+
+#ifndef TYPE_BIT
+#define TYPE_BIT(type)	(sizeof (type) * CHAR_BIT)
+#endif /* !defined TYPE_BIT */
+
+#ifndef TYPE_SIGNED
+#define TYPE_SIGNED(type) (((type) -1) < 0)
+#endif /* !defined TYPE_SIGNED */
+
+/*
+** Since the definition of TYPE_INTEGRAL contains floating point numbers,
+** it cannot be used in preprocessor directives.
+*/
+
+#ifndef TYPE_INTEGRAL
+#define TYPE_INTEGRAL(type) (((type) 0.5) != 0.5)
+#endif /* !defined TYPE_INTEGRAL */
+
+#ifndef INT_STRLEN_MAXIMUM
+/*
+** 302 / 1000 is log10(2.0) rounded up.
+** Subtract one for the sign bit if the type is signed;
+** add one for integer division truncation;
+** add one more for a minus sign if the type is signed.
+*/
+#define INT_STRLEN_MAXIMUM(type) \
+	((TYPE_BIT(type) - TYPE_SIGNED(type)) * 302 / 1000 + \
+	1 + TYPE_SIGNED(type))
+#endif /* !defined INT_STRLEN_MAXIMUM */
+
+/*
+** INITIALIZE(x)
+*/
+
+#ifndef GNUC_or_lint
+#ifdef lint
+#define GNUC_or_lint
+#endif /* defined lint */
+#ifndef lint
+#ifdef __GNUC__
+#define GNUC_or_lint
+#endif /* defined __GNUC__ */
+#endif /* !defined lint */
+#endif /* !defined GNUC_or_lint */
+
+#ifndef INITIALIZE
+#ifdef GNUC_or_lint
+#define INITIALIZE(x)	((x) = 0)
+#endif /* defined GNUC_or_lint */
+#ifndef GNUC_or_lint
+#define INITIALIZE(x)
+#endif /* !defined GNUC_or_lint */
+#endif /* !defined INITIALIZE */
+
+/*
+** For the benefit of GNU folk...
+** `_(MSGID)' uses the current locale's message library string for MSGID.
+** The default is to use gettext if available, and use MSGID otherwise.
+*/
+
+#ifndef _
+#if HAVE_GETTEXT
+#define _(msgid) gettext(msgid)
+#else /* !HAVE_GETTEXT */
+#define _(msgid) msgid
+#endif /* !HAVE_GETTEXT */
+#endif /* !defined _ */
+
+#ifndef TZ_DOMAIN
+#define TZ_DOMAIN "tz"
+#endif /* !defined TZ_DOMAIN */
+
+#if HAVE_INCOMPATIBLE_CTIME_R
+#undef asctime_r
+#undef ctime_r
+char *asctime_r(struct tm const *, char *);
+char *ctime_r(time_t const *, char *);
+#endif /* HAVE_INCOMPATIBLE_CTIME_R */
+
+#ifndef YEARSPERREPEAT
+#define YEARSPERREPEAT		400	/* years before a Gregorian repeat */
+#endif /* !defined YEARSPERREPEAT */
+
+/*
+** The Gregorian year averages 365.2425 days, which is 31556952 seconds.
+*/
+
+#ifndef AVGSECSPERYEAR
+#define AVGSECSPERYEAR		31556952L
+#endif /* !defined AVGSECSPERYEAR */
+
+#ifndef SECSPERREPEAT
+#define SECSPERREPEAT		((int_fast64_t) YEARSPERREPEAT * (int_fast64_t) AVGSECSPERYEAR)
+#endif /* !defined SECSPERREPEAT */
+
+#ifndef SECSPERREPEAT_BITS
+#define SECSPERREPEAT_BITS	34	/* ceil(log2(SECSPERREPEAT)) */
+#endif /* !defined SECSPERREPEAT_BITS */
+
+/*
+** UNIX was a registered trademark of The Open Group in 2003.
+*/
+
+#endif /* !defined PRIVATE_H */

Property changes on: vendor/tzcode/tzcode2009h/zic/private.h
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+FreeBSD=%H
\ No newline at end of property
Index: vendor/tzcode/tzcode2009h/zic/scheck.c
===================================================================
--- vendor/tzcode/tzcode2009h/zic/scheck.c	(nonexistent)
+++ vendor/tzcode/tzcode2009h/zic/scheck.c	(revision 192888)
@@ -0,0 +1,63 @@
+/*
+** This file is in the public domain, so clarified as of
+** 2006-07-17 by Arthur David Olson.
+*/
+
+#ifndef lint
+#ifndef NOID
+static char	elsieid[] = "@(#)scheck.c	8.19";
+#endif /* !defined lint */
+#endif /* !defined NOID */
+
+/*LINTLIBRARY*/
+
+#include "private.h"
+
+const char *
+scheck(string, format)
+const char * const	string;
+const char * const	format;
+{
+	register char *		fbuf;
+	register const char *	fp;
+	register char *		tp;
+	register int		c;
+	register const char *	result;
+	char			dummy;
+
+	result = "";
+	if (string == NULL || format == NULL)
+		return result;
+	fbuf = imalloc((int) (2 * strlen(format) + 4));
+	if (fbuf == NULL)
+		return result;
+	fp = format;
+	tp = fbuf;
+	while ((*tp++ = c = *fp++) != '\0') {
+		if (c != '%')
+			continue;
+		if (*fp == '%') {
+			*tp++ = *fp++;
+			continue;
+		}
+		*tp++ = '*';
+		if (*fp == '*')
+			++fp;
+		while (is_digit(*fp))
+			*tp++ = *fp++;
+		if (*fp == 'l' || *fp == 'h')
+			*tp++ = *fp++;
+		else if (*fp == '[')
+			do *tp++ = *fp++;
+				while (*fp != '\0' && *fp != ']');
+		if ((*tp++ = *fp++) == '\0')
+			break;
+	}
+	*(tp - 1) = '%';
+	*tp++ = 'c';
+	*tp = '\0';
+	if (sscanf(string, fbuf, &dummy) != 1)
+		result = (char *) format;
+	ifree(fbuf);
+	return result;
+}

Property changes on: vendor/tzcode/tzcode2009h/zic/scheck.c
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+FreeBSD=%H
\ No newline at end of property
Index: vendor/tzcode/tzcode2009h/zic/zic.c
===================================================================
--- vendor/tzcode/tzcode2009h/zic/zic.c	(nonexistent)
+++ vendor/tzcode/tzcode2009h/zic/zic.c	(revision 192888)
@@ -0,0 +1,2711 @@
+/*
+** This file is in the public domain, so clarified as of
+** 2006-07-17 by Arthur David Olson.
+*/
+
+static char	elsieid[] = "@(#)zic.c	8.19";
+
+#include "private.h"
+#include "locale.h"
+#include "tzfile.h"
+
+#define	ZIC_VERSION	'2'
+
+typedef int_fast64_t	zic_t;
+
+#ifndef ZIC_MAX_ABBR_LEN_WO_WARN
+#define ZIC_MAX_ABBR_LEN_WO_WARN	6
+#endif /* !defined ZIC_MAX_ABBR_LEN_WO_WARN */
+
+#if HAVE_SYS_STAT_H
+#include "sys/stat.h"
+#endif
+#ifdef S_IRUSR
+#define MKDIR_UMASK (S_IRUSR|S_IWUSR|S_IXUSR|S_IRGRP|S_IXGRP|S_IROTH|S_IXOTH)
+#else
+#define MKDIR_UMASK 0755
+#endif
+
+/*
+** On some ancient hosts, predicates like `isspace(C)' are defined
+** only if isascii(C) || C == EOF. Modern hosts obey the C Standard,
+** which says they are defined only if C == ((unsigned char) C) || C == EOF.
+** Neither the C Standard nor Posix require that `isascii' exist.
+** For portability, we check both ancient and modern requirements.
+** If isascii is not defined, the isascii check succeeds trivially.
+*/
+#include "ctype.h"
+#ifndef isascii
+#define isascii(x) 1
+#endif
+
+#define OFFSET_STRLEN_MAXIMUM	(7 + INT_STRLEN_MAXIMUM(long))
+#define RULE_STRLEN_MAXIMUM	8	/* "Mdd.dd.d" */
+
+#define end(cp)	(strchr((cp), '\0'))
+
+struct rule {
+	const char *	r_filename;
+	int		r_linenum;
+	const char *	r_name;
+
+	int		r_loyear;	/* for example, 1986 */
+	int		r_hiyear;	/* for example, 1986 */
+	const char *	r_yrtype;
+	int		r_lowasnum;
+	int		r_hiwasnum;
+
+	int		r_month;	/* 0..11 */
+
+	int		r_dycode;	/* see below */
+	int		r_dayofmonth;
+	int		r_wday;
+
+	long		r_tod;		/* time from midnight */
+	int		r_todisstd;	/* above is standard time if TRUE */
+					/* or wall clock time if FALSE */
+	int		r_todisgmt;	/* above is GMT if TRUE */
+					/* or local time if FALSE */
+	long		r_stdoff;	/* offset from standard time */
+	const char *	r_abbrvar;	/* variable part of abbreviation */
+
+	int		r_todo;		/* a rule to do (used in outzone) */
+	zic_t		r_temp;		/* used in outzone */
+};
+
+/*
+**	r_dycode		r_dayofmonth	r_wday
+*/
+
+#define DC_DOM		0	/* 1..31 */	/* unused */
+#define DC_DOWGEQ	1	/* 1..31 */	/* 0..6 (Sun..Sat) */
+#define DC_DOWLEQ	2	/* 1..31 */	/* 0..6 (Sun..Sat) */
+
+struct zone {
+	const char *	z_filename;
+	int		z_linenum;
+
+	const char *	z_name;
+	long		z_gmtoff;
+	const char *	z_rule;
+	const char *	z_format;
+
+	long		z_stdoff;
+
+	struct rule *	z_rules;
+	int		z_nrules;
+
+	struct rule	z_untilrule;
+	zic_t		z_untiltime;
+};
+
+extern int	getopt(int argc, char * const argv[],
+			const char * options);
+extern int	link(const char * fromname, const char * toname);
+extern char *	optarg;
+extern int	optind;
+
+static void	addtt(zic_t starttime, int type);
+static int	addtype(long gmtoff, const char * abbr, int isdst,
+				int ttisstd, int ttisgmt);
+static void	leapadd(zic_t t, int positive, int rolling, int count);
+static void	adjleap(void);
+static void	associate(void);
+static int	ciequal(const char * ap, const char * bp);
+static void	convert(long val, char * buf);
+static void	convert64(zic_t val, char * buf);
+static void	dolink(const char * fromfield, const char * tofield);
+static void	doabbr(char * abbr, const char * format,
+			const char * letters, int isdst, int doquotes);
+static void	eat(const char * name, int num);
+static void	eats(const char * name, int num,
+			const char * rname, int rnum);
+static long	eitol(int i);
+static void	error(const char * message);
+static char **	getfields(char * buf);
+static long	gethms(const char * string, const char * errstrng,
+			int signable);
+static void	infile(const char * filename);
+static void	inleap(char ** fields, int nfields);
+static void	inlink(char ** fields, int nfields);
+static void	inrule(char ** fields, int nfields);
+static int	inzcont(char ** fields, int nfields);
+static int	inzone(char ** fields, int nfields);
+static int	inzsub(char ** fields, int nfields, int iscont);
+static int	is32(zic_t x);
+static int	itsabbr(const char * abbr, const char * word);
+static int	itsdir(const char * name);
+static int	lowerit(int c);
+static char *	memcheck(char * tocheck);
+static int	mkdirs(char * filename);
+static void	newabbr(const char * abbr);
+static long	oadd(long t1, long t2);
+static void	outzone(const struct zone * zp, int ntzones);
+static void	puttzcode(long code, FILE * fp);
+static void	puttzcode64(zic_t code, FILE * fp);
+static int	rcomp(const void * leftp, const void * rightp);
+static zic_t	rpytime(const struct rule * rp, int wantedy);
+static void	rulesub(struct rule * rp,
+			const char * loyearp, const char * hiyearp,
+			const char * typep, const char * monthp,
+			const char * dayp, const char * timep);
+static int 	stringoffset(char * result, long offset);
+static int	stringrule(char * result, const struct rule * rp,
+			long dstoff, long gmtoff);
+static void 	stringzone(char * result,
+			const struct zone * zp, int ntzones);
+static void	setboundaries(void);
+static zic_t	tadd(zic_t t1, long t2);
+static void	usage(FILE *stream, int status);
+static void	writezone(const char * name, const char * string);
+static int	yearistype(int year, const char * type);
+
+static int		charcnt;
+static int		errors;
+static const char *	filename;
+static int		leapcnt;
+static int		leapseen;
+static int		leapminyear;
+static int		leapmaxyear;
+static int		linenum;
+static int		max_abbrvar_len;
+static int		max_format_len;
+static zic_t		max_time;
+static int		max_year;
+static zic_t		min_time;
+static int		min_year;
+static int		noise;
+static const char *	rfilename;
+static int		rlinenum;
+static const char *	progname;
+static int		timecnt;
+static int		typecnt;
+
+/*
+** Line codes.
+*/
+
+#define LC_RULE		0
+#define LC_ZONE		1
+#define LC_LINK		2
+#define LC_LEAP		3
+
+/*
+** Which fields are which on a Zone line.
+*/
+
+#define ZF_NAME		1
+#define ZF_GMTOFF	2
+#define ZF_RULE		3
+#define ZF_FORMAT	4
+#define ZF_TILYEAR	5
+#define ZF_TILMONTH	6
+#define ZF_TILDAY	7
+#define ZF_TILTIME	8
+#define ZONE_MINFIELDS	5
+#define ZONE_MAXFIELDS	9
+
+/*
+** Which fields are which on a Zone continuation line.
+*/
+
+#define ZFC_GMTOFF	0
+#define ZFC_RULE	1
+#define ZFC_FORMAT	2
+#define ZFC_TILYEAR	3
+#define ZFC_TILMONTH	4
+#define ZFC_TILDAY	5
+#define ZFC_TILTIME	6
+#define ZONEC_MINFIELDS	3
+#define ZONEC_MAXFIELDS	7
+
+/*
+** Which files are which on a Rule line.
+*/
+
+#define RF_NAME		1
+#define RF_LOYEAR	2
+#define RF_HIYEAR	3
+#define RF_COMMAND	4
+#define RF_MONTH	5
+#define RF_DAY		6
+#define RF_TOD		7
+#define RF_STDOFF	8
+#define RF_ABBRVAR	9
+#define RULE_FIELDS	10
+
+/*
+** Which fields are which on a Link line.
+*/
+
+#define LF_FROM		1
+#define LF_TO		2
+#define LINK_FIELDS	3
+
+/*
+** Which fields are which on a Leap line.
+*/
+
+#define LP_YEAR		1
+#define LP_MONTH	2
+#define LP_DAY		3
+#define LP_TIME		4
+#define LP_CORR		5
+#define LP_ROLL		6
+#define LEAP_FIELDS	7
+
+/*
+** Year synonyms.
+*/
+
+#define YR_MINIMUM	0
+#define YR_MAXIMUM	1
+#define YR_ONLY		2
+
+static struct rule *	rules;
+static int		nrules;	/* number of rules */
+
+static struct zone *	zones;
+static int		nzones;	/* number of zones */
+
+struct link {
+	const char *	l_filename;
+	int		l_linenum;
+	const char *	l_from;
+	const char *	l_to;
+};
+
+static struct link *	links;
+static int		nlinks;
+
+struct lookup {
+	const char *	l_word;
+	const int	l_value;
+};
+
+static struct lookup const *	byword(const char * string,
+					const struct lookup * lp);
+
+static struct lookup const	line_codes[] = {
+	{ "Rule",	LC_RULE },
+	{ "Zone",	LC_ZONE },
+	{ "Link",	LC_LINK },
+	{ "Leap",	LC_LEAP },
+	{ NULL,		0}
+};
+
+static struct lookup const	mon_names[] = {
+	{ "January",	TM_JANUARY },
+	{ "February",	TM_FEBRUARY },
+	{ "March",	TM_MARCH },
+	{ "April",	TM_APRIL },
+	{ "May",	TM_MAY },
+	{ "June",	TM_JUNE },
+	{ "July",	TM_JULY },
+	{ "August",	TM_AUGUST },
+	{ "September",	TM_SEPTEMBER },
+	{ "October",	TM_OCTOBER },
+	{ "November",	TM_NOVEMBER },
+	{ "December",	TM_DECEMBER },
+	{ NULL,		0 }
+};
+
+static struct lookup const	wday_names[] = {
+	{ "Sunday",	TM_SUNDAY },
+	{ "Monday",	TM_MONDAY },
+	{ "Tuesday",	TM_TUESDAY },
+	{ "Wednesday",	TM_WEDNESDAY },
+	{ "Thursday",	TM_THURSDAY },
+	{ "Friday",	TM_FRIDAY },
+	{ "Saturday",	TM_SATURDAY },
+	{ NULL,		0 }
+};
+
+static struct lookup const	lasts[] = {
+	{ "last-Sunday",	TM_SUNDAY },
+	{ "last-Monday",	TM_MONDAY },
+	{ "last-Tuesday",	TM_TUESDAY },
+	{ "last-Wednesday",	TM_WEDNESDAY },
+	{ "last-Thursday",	TM_THURSDAY },
+	{ "last-Friday",	TM_FRIDAY },
+	{ "last-Saturday",	TM_SATURDAY },
+	{ NULL,			0 }
+};
+
+static struct lookup const	begin_years[] = {
+	{ "minimum",	YR_MINIMUM },
+	{ "maximum",	YR_MAXIMUM },
+	{ NULL,		0 }
+};
+
+static struct lookup const	end_years[] = {
+	{ "minimum",	YR_MINIMUM },
+	{ "maximum",	YR_MAXIMUM },
+	{ "only",	YR_ONLY },
+	{ NULL,		0 }
+};
+
+static struct lookup const	leap_types[] = {
+	{ "Rolling",	TRUE },
+	{ "Stationary",	FALSE },
+	{ NULL,		0 }
+};
+
+static const int	len_months[2][MONSPERYEAR] = {
+	{ 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 },
+	{ 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }
+};
+
+static const int	len_years[2] = {
+	DAYSPERNYEAR, DAYSPERLYEAR
+};
+
+static struct attype {
+	zic_t		at;
+	unsigned char	type;
+}			attypes[TZ_MAX_TIMES];
+static long		gmtoffs[TZ_MAX_TYPES];
+static char		isdsts[TZ_MAX_TYPES];
+static unsigned char	abbrinds[TZ_MAX_TYPES];
+static char		ttisstds[TZ_MAX_TYPES];
+static char		ttisgmts[TZ_MAX_TYPES];
+static char		chars[TZ_MAX_CHARS];
+static zic_t		trans[TZ_MAX_LEAPS];
+static long		corr[TZ_MAX_LEAPS];
+static char		roll[TZ_MAX_LEAPS];
+
+/*
+** Memory allocation.
+*/
+
+static char *
+memcheck(ptr)
+char * const	ptr;
+{
+	if (ptr == NULL) {
+		const char *e = strerror(errno);
+
+		(void) fprintf(stderr, _("%s: Memory exhausted: %s\n"),
+			progname, e);
+		exit(EXIT_FAILURE);
+	}
+	return ptr;
+}
+
+#define emalloc(size)		memcheck(imalloc(size))
+#define erealloc(ptr, size)	memcheck(irealloc((ptr), (size)))
+#define ecpyalloc(ptr)		memcheck(icpyalloc(ptr))
+#define ecatalloc(oldp, newp)	memcheck(icatalloc((oldp), (newp)))
+
+/*
+** Error handling.
+*/
+
+static void
+eats(name, num, rname, rnum)
+const char * const	name;
+const int		num;
+const char * const	rname;
+const int		rnum;
+{
+	filename = name;
+	linenum = num;
+	rfilename = rname;
+	rlinenum = rnum;
+}
+
+static void
+eat(name, num)
+const char * const	name;
+const int		num;
+{
+	eats(name, num, (char *) NULL, -1);
+}
+
+static void
+error(string)
+const char * const	string;
+{
+	/*
+	** Match the format of "cc" to allow sh users to
+	**	zic ... 2>&1 | error -t "*" -v
+	** on BSD systems.
+	*/
+	(void) fprintf(stderr, _("\"%s\", line %d: %s"),
+		filename, linenum, string);
+	if (rfilename != NULL)
+		(void) fprintf(stderr, _(" (rule from \"%s\", line %d)"),
+			rfilename, rlinenum);
+	(void) fprintf(stderr, "\n");
+	++errors;
+}
+
+static void
+warning(string)
+const char * const	string;
+{
+	char *	cp;
+
+	cp = ecpyalloc(_("warning: "));
+	cp = ecatalloc(cp, string);
+	error(cp);
+	ifree(cp);
+	--errors;
+}
+
+static void
+usage(FILE *stream, int status)
+{
+	(void) fprintf(stream, _("%s: usage is %s \
+[ --version ] [ --help ] [ -v ] [ -l localtime ] [ -p posixrules ] \\\n\
+\t[ -d directory ] [ -L leapseconds ] [ -y yearistype ] [ filename ... ]\n\
+\n\
+Report bugs to tz@elsie.nci.nih.gov.\n"),
+		       progname, progname);
+	exit(status);
+}
+
+static const char *	psxrules;
+static const char *	lcltime;
+static const char *	directory;
+static const char *	leapsec;
+static const char *	yitcommand;
+
+int
+main(argc, argv)
+int	argc;
+char *	argv[];
+{
+	register int	i;
+	register int	j;
+	register int	c;
+
+#ifdef unix
+	(void) umask(umask(S_IWGRP | S_IWOTH) | (S_IWGRP | S_IWOTH));
+#endif /* defined unix */
+#if HAVE_GETTEXT
+	(void) setlocale(LC_ALL, "");
+#ifdef TZ_DOMAINDIR
+	(void) bindtextdomain(TZ_DOMAIN, TZ_DOMAINDIR);
+#endif /* defined TEXTDOMAINDIR */
+	(void) textdomain(TZ_DOMAIN);
+#endif /* HAVE_GETTEXT */
+	progname = argv[0];
+	if (TYPE_BIT(zic_t) < 64) {
+		(void) fprintf(stderr, "%s: %s\n", progname,
+			_("wild compilation-time specification of zic_t"));
+		exit(EXIT_FAILURE);
+	}
+	for (i = 1; i < argc; ++i)
+		if (strcmp(argv[i], "--version") == 0) {
+			(void) printf("%s\n", elsieid);
+			exit(EXIT_SUCCESS);
+		} else if (strcmp(argv[i], "--help") == 0) {
+			usage(stdout, EXIT_SUCCESS);
+		}
+	while ((c = getopt(argc, argv, "d:l:p:L:vsy:")) != EOF && c != -1)
+		switch (c) {
+			default:
+				usage(stderr, EXIT_FAILURE);
+			case 'd':
+				if (directory == NULL)
+					directory = optarg;
+				else {
+					(void) fprintf(stderr,
+_("%s: More than one -d option specified\n"),
+						progname);
+					exit(EXIT_FAILURE);
+				}
+				break;
+			case 'l':
+				if (lcltime == NULL)
+					lcltime = optarg;
+				else {
+					(void) fprintf(stderr,
+_("%s: More than one -l option specified\n"),
+						progname);
+					exit(EXIT_FAILURE);
+				}
+				break;
+			case 'p':
+				if (psxrules == NULL)
+					psxrules = optarg;
+				else {
+					(void) fprintf(stderr,
+_("%s: More than one -p option specified\n"),
+						progname);
+					exit(EXIT_FAILURE);
+				}
+				break;
+			case 'y':
+				if (yitcommand == NULL)
+					yitcommand = optarg;
+				else {
+					(void) fprintf(stderr,
+_("%s: More than one -y option specified\n"),
+						progname);
+					exit(EXIT_FAILURE);
+				}
+				break;
+			case 'L':
+				if (leapsec == NULL)
+					leapsec = optarg;
+				else {
+					(void) fprintf(stderr,
+_("%s: More than one -L option specified\n"),
+						progname);
+					exit(EXIT_FAILURE);
+				}
+				break;
+			case 'v':
+				noise = TRUE;
+				break;
+			case 's':
+				(void) printf("%s: -s ignored\n", progname);
+				break;
+		}
+	if (optind == argc - 1 && strcmp(argv[optind], "=") == 0)
+		usage(stderr, EXIT_FAILURE);	/* usage message by request */
+	if (directory == NULL)
+		directory = TZDIR;
+	if (yitcommand == NULL)
+		yitcommand = "yearistype";
+
+	setboundaries();
+
+	if (optind < argc && leapsec != NULL) {
+		infile(leapsec);
+		adjleap();
+	}
+
+	for (i = optind; i < argc; ++i)
+		infile(argv[i]);
+	if (errors)
+		exit(EXIT_FAILURE);
+	associate();
+	for (i = 0; i < nzones; i = j) {
+		/*
+		** Find the next non-continuation zone entry.
+		*/
+		for (j = i + 1; j < nzones && zones[j].z_name == NULL; ++j)
+			continue;
+		outzone(&zones[i], j - i);
+	}
+	/*
+	** Make links.
+	*/
+	for (i = 0; i < nlinks; ++i) {
+		eat(links[i].l_filename, links[i].l_linenum);
+		dolink(links[i].l_from, links[i].l_to);
+		if (noise)
+			for (j = 0; j < nlinks; ++j)
+				if (strcmp(links[i].l_to,
+					links[j].l_from) == 0)
+						warning(_("link to link"));
+	}
+	if (lcltime != NULL) {
+		eat("command line", 1);
+		dolink(lcltime, TZDEFAULT);
+	}
+	if (psxrules != NULL) {
+		eat("command line", 1);
+		dolink(psxrules, TZDEFRULES);
+	}
+	return (errors == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
+}
+
+static void
+dolink(fromfield, tofield)
+const char * const	fromfield;
+const char * const	tofield;
+{
+	register char *	fromname;
+	register char *	toname;
+
+	if (fromfield[0] == '/')
+		fromname = ecpyalloc(fromfield);
+	else {
+		fromname = ecpyalloc(directory);
+		fromname = ecatalloc(fromname, "/");
+		fromname = ecatalloc(fromname, fromfield);
+	}
+	if (tofield[0] == '/')
+		toname = ecpyalloc(tofield);
+	else {
+		toname = ecpyalloc(directory);
+		toname = ecatalloc(toname, "/");
+		toname = ecatalloc(toname, tofield);
+	}
+	/*
+	** We get to be careful here since
+	** there's a fair chance of root running us.
+	*/
+	if (!itsdir(toname))
+		(void) remove(toname);
+	if (link(fromname, toname) != 0) {
+		int	result;
+
+		if (mkdirs(toname) != 0)
+			exit(EXIT_FAILURE);
+
+		result = link(fromname, toname);
+#if HAVE_SYMLINK
+		if (result != 0 &&
+			access(fromname, F_OK) == 0 &&
+			!itsdir(fromname)) {
+				const char *s = tofield;
+				register char * symlinkcontents = NULL;
+
+				while ((s = strchr(s+1, '/')) != NULL)
+					symlinkcontents =
+						ecatalloc(symlinkcontents,
+						"../");
+				symlinkcontents =
+					ecatalloc(symlinkcontents,
+					fromname);
+				result = symlink(symlinkcontents,
+					toname);
+				if (result == 0)
+warning(_("hard link failed, symbolic link used"));
+				ifree(symlinkcontents);
+		}
+#endif /* HAVE_SYMLINK */
+		if (result != 0) {
+			const char *e = strerror(errno);
+
+			(void) fprintf(stderr,
+				_("%s: Can't link from %s to %s: %s\n"),
+				progname, fromname, toname, e);
+			exit(EXIT_FAILURE);
+		}
+	}
+	ifree(fromname);
+	ifree(toname);
+}
+
+#define TIME_T_BITS_IN_FILE	64
+
+static void
+setboundaries(void)
+{
+	register int	i;
+
+	min_time = -1;
+	for (i = 0; i < TIME_T_BITS_IN_FILE - 1; ++i)
+		min_time *= 2;
+	max_time = -(min_time + 1);
+}
+
+static int
+itsdir(name)
+const char * const	name;
+{
+	register char *	myname;
+	register int	accres;
+
+	myname = ecpyalloc(name);
+	myname = ecatalloc(myname, "/.");
+	accres = access(myname, F_OK);
+	ifree(myname);
+	return accres == 0;
+}
+
+/*
+** Associate sets of rules with zones.
+*/
+
+/*
+** Sort by rule name.
+*/
+
+static int
+rcomp(cp1, cp2)
+const void *	cp1;
+const void *	cp2;
+{
+	return strcmp(((const struct rule *) cp1)->r_name,
+		((const struct rule *) cp2)->r_name);
+}
+
+static void
+associate(void)
+{
+	register struct zone *	zp;
+	register struct rule *	rp;
+	register int		base, out;
+	register int		i, j;
+
+	if (nrules != 0) {
+		(void) qsort((void *) rules, (size_t) nrules,
+			(size_t) sizeof *rules, rcomp);
+		for (i = 0; i < nrules - 1; ++i) {
+			if (strcmp(rules[i].r_name,
+				rules[i + 1].r_name) != 0)
+					continue;
+			if (strcmp(rules[i].r_filename,
+				rules[i + 1].r_filename) == 0)
+					continue;
+			eat(rules[i].r_filename, rules[i].r_linenum);
+			warning(_("same rule name in multiple files"));
+			eat(rules[i + 1].r_filename, rules[i + 1].r_linenum);
+			warning(_("same rule name in multiple files"));
+			for (j = i + 2; j < nrules; ++j) {
+				if (strcmp(rules[i].r_name,
+					rules[j].r_name) != 0)
+						break;
+				if (strcmp(rules[i].r_filename,
+					rules[j].r_filename) == 0)
+						continue;
+				if (strcmp(rules[i + 1].r_filename,
+					rules[j].r_filename) == 0)
+						continue;
+				break;
+			}
+			i = j - 1;
+		}
+	}
+	for (i = 0; i < nzones; ++i) {
+		zp = &zones[i];
+		zp->z_rules = NULL;
+		zp->z_nrules = 0;
+	}
+	for (base = 0; base < nrules; base = out) {
+		rp = &rules[base];
+		for (out = base + 1; out < nrules; ++out)
+			if (strcmp(rp->r_name, rules[out].r_name) != 0)
+				break;
+		for (i = 0; i < nzones; ++i) {
+			zp = &zones[i];
+			if (strcmp(zp->z_rule, rp->r_name) != 0)
+				continue;
+			zp->z_rules = rp;
+			zp->z_nrules = out - base;
+		}
+	}
+	for (i = 0; i < nzones; ++i) {
+		zp = &zones[i];
+		if (zp->z_nrules == 0) {
+			/*
+			** Maybe we have a local standard time offset.
+			*/
+			eat(zp->z_filename, zp->z_linenum);
+			zp->z_stdoff = gethms(zp->z_rule, _("unruly zone"),
+				TRUE);
+			/*
+			** Note, though, that if there's no rule,
+			** a '%s' in the format is a bad thing.
+			*/
+			if (strchr(zp->z_format, '%') != 0)
+				error(_("%s in ruleless zone"));
+		}
+	}
+	if (errors)
+		exit(EXIT_FAILURE);
+}
+
+static void
+infile(name)
+const char *	name;
+{
+	register FILE *			fp;
+	register char **		fields;
+	register char *			cp;
+	register const struct lookup *	lp;
+	register int			nfields;
+	register int			wantcont;
+	register int			num;
+	char				buf[BUFSIZ];
+
+	if (strcmp(name, "-") == 0) {
+		name = _("standard input");
+		fp = stdin;
+	} else if ((fp = fopen(name, "r")) == NULL) {
+		const char *e = strerror(errno);
+
+		(void) fprintf(stderr, _("%s: Can't open %s: %s\n"),
+			progname, name, e);
+		exit(EXIT_FAILURE);
+	}
+	wantcont = FALSE;
+	for (num = 1; ; ++num) {
+		eat(name, num);
+		if (fgets(buf, (int) sizeof buf, fp) != buf)
+			break;
+		cp = strchr(buf, '\n');
+		if (cp == NULL) {
+			error(_("line too long"));
+			exit(EXIT_FAILURE);
+		}
+		*cp = '\0';
+		fields = getfields(buf);
+		nfields = 0;
+		while (fields[nfields] != NULL) {
+			static char	nada;
+
+			if (strcmp(fields[nfields], "-") == 0)
+				fields[nfields] = &nada;
+			++nfields;
+		}
+		if (nfields == 0) {
+			/* nothing to do */
+		} else if (wantcont) {
+			wantcont = inzcont(fields, nfields);
+		} else {
+			lp = byword(fields[0], line_codes);
+			if (lp == NULL)
+				error(_("input line of unknown type"));
+			else switch ((int) (lp->l_value)) {
+				case LC_RULE:
+					inrule(fields, nfields);
+					wantcont = FALSE;
+					break;
+				case LC_ZONE:
+					wantcont = inzone(fields, nfields);
+					break;
+				case LC_LINK:
+					inlink(fields, nfields);
+					wantcont = FALSE;
+					break;
+				case LC_LEAP:
+					if (name != leapsec)
+						(void) fprintf(stderr,
+_("%s: Leap line in non leap seconds file %s\n"),
+							progname, name);
+					else	inleap(fields, nfields);
+					wantcont = FALSE;
+					break;
+				default:	/* "cannot happen" */
+					(void) fprintf(stderr,
+_("%s: panic: Invalid l_value %d\n"),
+						progname, lp->l_value);
+					exit(EXIT_FAILURE);
+			}
+		}
+		ifree((char *) fields);
+	}
+	if (ferror(fp)) {
+		(void) fprintf(stderr, _("%s: Error reading %s\n"),
+			progname, filename);
+		exit(EXIT_FAILURE);
+	}
+	if (fp != stdin && fclose(fp)) {
+		const char *e = strerror(errno);
+
+		(void) fprintf(stderr, _("%s: Error closing %s: %s\n"),
+			progname, filename, e);
+		exit(EXIT_FAILURE);
+	}
+	if (wantcont)
+		error(_("expected continuation line not found"));
+}
+
+/*
+** Convert a string of one of the forms
+**	h	-h	hh:mm	-hh:mm	hh:mm:ss	-hh:mm:ss
+** into a number of seconds.
+** A null string maps to zero.
+** Call error with errstring and return zero on errors.
+*/
+
+static long
+gethms(string, errstring, signable)
+const char *		string;
+const char * const	errstring;
+const int		signable;
+{
+	long	hh;
+	int	mm, ss, sign;
+
+	if (string == NULL || *string == '\0')
+		return 0;
+	if (!signable)
+		sign = 1;
+	else if (*string == '-') {
+		sign = -1;
+		++string;
+	} else	sign = 1;
+	if (sscanf(string, scheck(string, "%ld"), &hh) == 1)
+		mm = ss = 0;
+	else if (sscanf(string, scheck(string, "%ld:%d"), &hh, &mm) == 2)
+		ss = 0;
+	else if (sscanf(string, scheck(string, "%ld:%d:%d"),
+		&hh, &mm, &ss) != 3) {
+			error(errstring);
+			return 0;
+	}
+	if (hh < 0 ||
+		mm < 0 || mm >= MINSPERHOUR ||
+		ss < 0 || ss > SECSPERMIN) {
+			error(errstring);
+			return 0;
+	}
+	if (LONG_MAX / SECSPERHOUR < hh) {
+		error(_("time overflow"));
+		return 0;
+	}
+	if (noise && hh == HOURSPERDAY && mm == 0 && ss == 0)
+		warning(_("24:00 not handled by pre-1998 versions of zic"));
+	if (noise && (hh > HOURSPERDAY ||
+		(hh == HOURSPERDAY && (mm != 0 || ss != 0))))
+warning(_("values over 24 hours not handled by pre-2007 versions of zic"));
+	return oadd(eitol(sign) * hh * eitol(SECSPERHOUR),
+		    eitol(sign) * (eitol(mm) * eitol(SECSPERMIN) + eitol(ss)));
+}
+
+static void
+inrule(fields, nfields)
+register char ** const	fields;
+const int		nfields;
+{
+	static struct rule	r;
+
+	if (nfields != RULE_FIELDS) {
+		error(_("wrong number of fields on Rule line"));
+		return;
+	}
+	if (*fields[RF_NAME] == '\0') {
+		error(_("nameless rule"));
+		return;
+	}
+	r.r_filename = filename;
+	r.r_linenum = linenum;
+	r.r_stdoff = gethms(fields[RF_STDOFF], _("invalid saved time"), TRUE);
+	rulesub(&r, fields[RF_LOYEAR], fields[RF_HIYEAR], fields[RF_COMMAND],
+		fields[RF_MONTH], fields[RF_DAY], fields[RF_TOD]);
+	r.r_name = ecpyalloc(fields[RF_NAME]);
+	r.r_abbrvar = ecpyalloc(fields[RF_ABBRVAR]);
+	if (max_abbrvar_len < strlen(r.r_abbrvar))
+		max_abbrvar_len = strlen(r.r_abbrvar);
+	rules = (struct rule *) (void *) erealloc((char *) rules,
+		(int) ((nrules + 1) * sizeof *rules));
+	rules[nrules++] = r;
+}
+
+static int
+inzone(fields, nfields)
+register char ** const	fields;
+const int		nfields;
+{
+	register int	i;
+	static char *	buf;
+
+	if (nfields < ZONE_MINFIELDS || nfields > ZONE_MAXFIELDS) {
+		error(_("wrong number of fields on Zone line"));
+		return FALSE;
+	}
+	if (strcmp(fields[ZF_NAME], TZDEFAULT) == 0 && lcltime != NULL) {
+		buf = erealloc(buf, (int) (132 + strlen(TZDEFAULT)));
+		(void) sprintf(buf,
+_("\"Zone %s\" line and -l option are mutually exclusive"),
+			TZDEFAULT);
+		error(buf);
+		return FALSE;
+	}
+	if (strcmp(fields[ZF_NAME], TZDEFRULES) == 0 && psxrules != NULL) {
+		buf = erealloc(buf, (int) (132 + strlen(TZDEFRULES)));
+		(void) sprintf(buf,
+_("\"Zone %s\" line and -p option are mutually exclusive"),
+			TZDEFRULES);
+		error(buf);
+		return FALSE;
+	}
+	for (i = 0; i < nzones; ++i)
+		if (zones[i].z_name != NULL &&
+			strcmp(zones[i].z_name, fields[ZF_NAME]) == 0) {
+				buf = erealloc(buf, (int) (132 +
+					strlen(fields[ZF_NAME]) +
+					strlen(zones[i].z_filename)));
+				(void) sprintf(buf,
+_("duplicate zone name %s (file \"%s\", line %d)"),
+					fields[ZF_NAME],
+					zones[i].z_filename,
+					zones[i].z_linenum);
+				error(buf);
+				return FALSE;
+		}
+	return inzsub(fields, nfields, FALSE);
+}
+
+static int
+inzcont(fields, nfields)
+register char ** const	fields;
+const int		nfields;
+{
+	if (nfields < ZONEC_MINFIELDS || nfields > ZONEC_MAXFIELDS) {
+		error(_("wrong number of fields on Zone continuation line"));
+		return FALSE;
+	}
+	return inzsub(fields, nfields, TRUE);
+}
+
+static int
+inzsub(fields, nfields, iscont)
+register char ** const	fields;
+const int		nfields;
+const int		iscont;
+{
+	register char *		cp;
+	static struct zone	z;
+	register int		i_gmtoff, i_rule, i_format;
+	register int		i_untilyear, i_untilmonth;
+	register int		i_untilday, i_untiltime;
+	register int		hasuntil;
+
+	if (iscont) {
+		i_gmtoff = ZFC_GMTOFF;
+		i_rule = ZFC_RULE;
+		i_format = ZFC_FORMAT;
+		i_untilyear = ZFC_TILYEAR;
+		i_untilmonth = ZFC_TILMONTH;
+		i_untilday = ZFC_TILDAY;
+		i_untiltime = ZFC_TILTIME;
+		z.z_name = NULL;
+	} else {
+		i_gmtoff = ZF_GMTOFF;
+		i_rule = ZF_RULE;
+		i_format = ZF_FORMAT;
+		i_untilyear = ZF_TILYEAR;
+		i_untilmonth = ZF_TILMONTH;
+		i_untilday = ZF_TILDAY;
+		i_untiltime = ZF_TILTIME;
+		z.z_name = ecpyalloc(fields[ZF_NAME]);
+	}
+	z.z_filename = filename;
+	z.z_linenum = linenum;
+	z.z_gmtoff = gethms(fields[i_gmtoff], _("invalid UTC offset"), TRUE);
+	if ((cp = strchr(fields[i_format], '%')) != 0) {
+		if (*++cp != 's' || strchr(cp, '%') != 0) {
+			error(_("invalid abbreviation format"));
+			return FALSE;
+		}
+	}
+	z.z_rule = ecpyalloc(fields[i_rule]);
+	z.z_format = ecpyalloc(fields[i_format]);
+	if (max_format_len < strlen(z.z_format))
+		max_format_len = strlen(z.z_format);
+	hasuntil = nfields > i_untilyear;
+	if (hasuntil) {
+		z.z_untilrule.r_filename = filename;
+		z.z_untilrule.r_linenum = linenum;
+		rulesub(&z.z_untilrule,
+			fields[i_untilyear],
+			"only",
+			"",
+			(nfields > i_untilmonth) ?
+			fields[i_untilmonth] : "Jan",
+			(nfields > i_untilday) ? fields[i_untilday] : "1",
+			(nfields > i_untiltime) ? fields[i_untiltime] : "0");
+		z.z_untiltime = rpytime(&z.z_untilrule,
+			z.z_untilrule.r_loyear);
+		if (iscont && nzones > 0 &&
+			z.z_untiltime > min_time &&
+			z.z_untiltime < max_time &&
+			zones[nzones - 1].z_untiltime > min_time &&
+			zones[nzones - 1].z_untiltime < max_time &&
+			zones[nzones - 1].z_untiltime >= z.z_untiltime) {
+				error(_(
+"Zone continuation line end time is not after end time of previous line"
+					));
+				return FALSE;
+		}
+	}
+	zones = (struct zone *) (void *) erealloc((char *) zones,
+		(int) ((nzones + 1) * sizeof *zones));
+	zones[nzones++] = z;
+	/*
+	** If there was an UNTIL field on this line,
+	** there's more information about the zone on the next line.
+	*/
+	return hasuntil;
+}
+
+static void
+inleap(fields, nfields)
+register char ** const	fields;
+const int		nfields;
+{
+	register const char *		cp;
+	register const struct lookup *	lp;
+	register int			i, j;
+	int				year, month, day;
+	long				dayoff, tod;
+	zic_t				t;
+
+	if (nfields != LEAP_FIELDS) {
+		error(_("wrong number of fields on Leap line"));
+		return;
+	}
+	dayoff = 0;
+	cp = fields[LP_YEAR];
+	if (sscanf(cp, scheck(cp, "%d"), &year) != 1) {
+		/*
+		** Leapin' Lizards!
+		*/
+		error(_("invalid leaping year"));
+		return;
+	}
+	if (!leapseen || leapmaxyear < year)
+		leapmaxyear = year;
+	if (!leapseen || leapminyear > year)
+		leapminyear = year;
+	leapseen = TRUE;
+	j = EPOCH_YEAR;
+	while (j != year) {
+		if (year > j) {
+			i = len_years[isleap(j)];
+			++j;
+		} else {
+			--j;
+			i = -len_years[isleap(j)];
+		}
+		dayoff = oadd(dayoff, eitol(i));
+	}
+	if ((lp = byword(fields[LP_MONTH], mon_names)) == NULL) {
+		error(_("invalid month name"));
+		return;
+	}
+	month = lp->l_value;
+	j = TM_JANUARY;
+	while (j != month) {
+		i = len_months[isleap(year)][j];
+		dayoff = oadd(dayoff, eitol(i));
+		++j;
+	}
+	cp = fields[LP_DAY];
+	if (sscanf(cp, scheck(cp, "%d"), &day) != 1 ||
+		day <= 0 || day > len_months[isleap(year)][month]) {
+			error(_("invalid day of month"));
+			return;
+	}
+	dayoff = oadd(dayoff, eitol(day - 1));
+	if (dayoff < 0 && !TYPE_SIGNED(zic_t)) {
+		error(_("time before zero"));
+		return;
+	}
+	if (dayoff < min_time / SECSPERDAY) {
+		error(_("time too small"));
+		return;
+	}
+	if (dayoff > max_time / SECSPERDAY) {
+		error(_("time too large"));
+		return;
+	}
+	t = (zic_t) dayoff * SECSPERDAY;
+	tod = gethms(fields[LP_TIME], _("invalid time of day"), FALSE);
+	cp = fields[LP_CORR];
+	{
+		register int	positive;
+		int		count;
+
+		if (strcmp(cp, "") == 0) { /* infile() turns "-" into "" */
+			positive = FALSE;
+			count = 1;
+		} else if (strcmp(cp, "--") == 0) {
+			positive = FALSE;
+			count = 2;
+		} else if (strcmp(cp, "+") == 0) {
+			positive = TRUE;
+			count = 1;
+		} else if (strcmp(cp, "++") == 0) {
+			positive = TRUE;
+			count = 2;
+		} else {
+			error(_("illegal CORRECTION field on Leap line"));
+			return;
+		}
+		if ((lp = byword(fields[LP_ROLL], leap_types)) == NULL) {
+			error(_(
+				"illegal Rolling/Stationary field on Leap line"
+				));
+			return;
+		}
+		leapadd(tadd(t, tod), positive, lp->l_value, count);
+	}
+}
+
+static void
+inlink(fields, nfields)
+register char ** const	fields;
+const int		nfields;
+{
+	struct link	l;
+
+	if (nfields != LINK_FIELDS) {
+		error(_("wrong number of fields on Link line"));
+		return;
+	}
+	if (*fields[LF_FROM] == '\0') {
+		error(_("blank FROM field on Link line"));
+		return;
+	}
+	if (*fields[LF_TO] == '\0') {
+		error(_("blank TO field on Link line"));
+		return;
+	}
+	l.l_filename = filename;
+	l.l_linenum = linenum;
+	l.l_from = ecpyalloc(fields[LF_FROM]);
+	l.l_to = ecpyalloc(fields[LF_TO]);
+	links = (struct link *) (void *) erealloc((char *) links,
+		(int) ((nlinks + 1) * sizeof *links));
+	links[nlinks++] = l;
+}
+
+static void
+rulesub(rp, loyearp, hiyearp, typep, monthp, dayp, timep)
+register struct rule * const	rp;
+const char * const		loyearp;
+const char * const		hiyearp;
+const char * const		typep;
+const char * const		monthp;
+const char * const		dayp;
+const char * const		timep;
+{
+	register const struct lookup *	lp;
+	register const char *		cp;
+	register char *			dp;
+	register char *			ep;
+
+	if ((lp = byword(monthp, mon_names)) == NULL) {
+		error(_("invalid month name"));
+		return;
+	}
+	rp->r_month = lp->l_value;
+	rp->r_todisstd = FALSE;
+	rp->r_todisgmt = FALSE;
+	dp = ecpyalloc(timep);
+	if (*dp != '\0') {
+		ep = dp + strlen(dp) - 1;
+		switch (lowerit(*ep)) {
+			case 's':	/* Standard */
+				rp->r_todisstd = TRUE;
+				rp->r_todisgmt = FALSE;
+				*ep = '\0';
+				break;
+			case 'w':	/* Wall */
+				rp->r_todisstd = FALSE;
+				rp->r_todisgmt = FALSE;
+				*ep = '\0';
+				break;
+			case 'g':	/* Greenwich */
+			case 'u':	/* Universal */
+			case 'z':	/* Zulu */
+				rp->r_todisstd = TRUE;
+				rp->r_todisgmt = TRUE;
+				*ep = '\0';
+				break;
+		}
+	}
+	rp->r_tod = gethms(dp, _("invalid time of day"), FALSE);
+	ifree(dp);
+	/*
+	** Year work.
+	*/
+	cp = loyearp;
+	lp = byword(cp, begin_years);
+	rp->r_lowasnum = lp == NULL;
+	if (!rp->r_lowasnum) switch ((int) lp->l_value) {
+		case YR_MINIMUM:
+			rp->r_loyear = INT_MIN;
+			break;
+		case YR_MAXIMUM:
+			rp->r_loyear = INT_MAX;
+			break;
+		default:	/* "cannot happen" */
+			(void) fprintf(stderr,
+				_("%s: panic: Invalid l_value %d\n"),
+				progname, lp->l_value);
+			exit(EXIT_FAILURE);
+	} else if (sscanf(cp, scheck(cp, "%d"), &rp->r_loyear) != 1) {
+		error(_("invalid starting year"));
+		return;
+	}
+	cp = hiyearp;
+	lp = byword(cp, end_years);
+	rp->r_hiwasnum = lp == NULL;
+	if (!rp->r_hiwasnum) switch ((int) lp->l_value) {
+		case YR_MINIMUM:
+			rp->r_hiyear = INT_MIN;
+			break;
+		case YR_MAXIMUM:
+			rp->r_hiyear = INT_MAX;
+			break;
+		case YR_ONLY:
+			rp->r_hiyear = rp->r_loyear;
+			break;
+		default:	/* "cannot happen" */
+			(void) fprintf(stderr,
+				_("%s: panic: Invalid l_value %d\n"),
+				progname, lp->l_value);
+			exit(EXIT_FAILURE);
+	} else if (sscanf(cp, scheck(cp, "%d"), &rp->r_hiyear) != 1) {
+		error(_("invalid ending year"));
+		return;
+	}
+	if (rp->r_loyear > rp->r_hiyear) {
+		error(_("starting year greater than ending year"));
+		return;
+	}
+	if (*typep == '\0')
+		rp->r_yrtype = NULL;
+	else {
+		if (rp->r_loyear == rp->r_hiyear) {
+			error(_("typed single year"));
+			return;
+		}
+		rp->r_yrtype = ecpyalloc(typep);
+	}
+	/*
+	** Day work.
+	** Accept things such as:
+	**	1
+	**	last-Sunday
+	**	Sun<=20
+	**	Sun>=7
+	*/
+	dp = ecpyalloc(dayp);
+	if ((lp = byword(dp, lasts)) != NULL) {
+		rp->r_dycode = DC_DOWLEQ;
+		rp->r_wday = lp->l_value;
+		rp->r_dayofmonth = len_months[1][rp->r_month];
+	} else {
+		if ((ep = strchr(dp, '<')) != 0)
+			rp->r_dycode = DC_DOWLEQ;
+		else if ((ep = strchr(dp, '>')) != 0)
+			rp->r_dycode = DC_DOWGEQ;
+		else {
+			ep = dp;
+			rp->r_dycode = DC_DOM;
+		}
+		if (rp->r_dycode != DC_DOM) {
+			*ep++ = 0;
+			if (*ep++ != '=') {
+				error(_("invalid day of month"));
+				ifree(dp);
+				return;
+			}
+			if ((lp = byword(dp, wday_names)) == NULL) {
+				error(_("invalid weekday name"));
+				ifree(dp);
+				return;
+			}
+			rp->r_wday = lp->l_value;
+		}
+		if (sscanf(ep, scheck(ep, "%d"), &rp->r_dayofmonth) != 1 ||
+			rp->r_dayofmonth <= 0 ||
+			(rp->r_dayofmonth > len_months[1][rp->r_month])) {
+				error(_("invalid day of month"));
+				ifree(dp);
+				return;
+		}
+	}
+	ifree(dp);
+}
+
+static void
+convert(val, buf)
+const long	val;
+char * const	buf;
+{
+	register int	i;
+	register int	shift;
+
+	for (i = 0, shift = 24; i < 4; ++i, shift -= 8)
+		buf[i] = val >> shift;
+}
+
+static void
+convert64(val, buf)
+const zic_t	val;
+char * const	buf;
+{
+	register int	i;
+	register int	shift;
+
+	for (i = 0, shift = 56; i < 8; ++i, shift -= 8)
+		buf[i] = val >> shift;
+}
+
+static void
+puttzcode(val, fp)
+const long	val;
+FILE * const	fp;
+{
+	char	buf[4];
+
+	convert(val, buf);
+	(void) fwrite((void *) buf, (size_t) sizeof buf, (size_t) 1, fp);
+}
+
+static void
+puttzcode64(val, fp)
+const zic_t	val;
+FILE * const	fp;
+{
+	char	buf[8];
+
+	convert64(val, buf);
+	(void) fwrite((void *) buf, (size_t) sizeof buf, (size_t) 1, fp);
+}
+
+static int
+atcomp(avp, bvp)
+const void *	avp;
+const void *	bvp;
+{
+	const zic_t	a = ((const struct attype *) avp)->at;
+	const zic_t	b = ((const struct attype *) bvp)->at;
+
+	return (a < b) ? -1 : (a > b);
+}
+
+static int
+is32(x)
+const zic_t	x;
+{
+	return INT32_MIN <= x && x <= INT32_MAX;
+}
+
+static void
+writezone(name, string)
+const char * const	name;
+const char * const	string;
+{
+	register FILE *			fp;
+	register int			i, j;
+	register int			leapcnt32, leapi32;
+	register int			timecnt32, timei32;
+	register int			pass;
+	static char *			fullname;
+	static const struct tzhead	tzh0;
+	static struct tzhead		tzh;
+	zic_t				ats[TZ_MAX_TIMES];
+	unsigned char			types[TZ_MAX_TIMES];
+
+	/*
+	** Sort.
+	*/
+	if (timecnt > 1)
+		(void) qsort((void *) attypes, (size_t) timecnt,
+			(size_t) sizeof *attypes, atcomp);
+	/*
+	** Optimize.
+	*/
+	{
+		int	fromi;
+		int	toi;
+
+		toi = 0;
+		fromi = 0;
+		while (fromi < timecnt && attypes[fromi].at < min_time)
+			++fromi;
+		if (isdsts[0] == 0)
+			while (fromi < timecnt && attypes[fromi].type == 0)
+				++fromi;	/* handled by default rule */
+		for ( ; fromi < timecnt; ++fromi) {
+			if (toi != 0 && ((attypes[fromi].at +
+				gmtoffs[attypes[toi - 1].type]) <=
+				(attypes[toi - 1].at + gmtoffs[toi == 1 ? 0
+				: attypes[toi - 2].type]))) {
+					attypes[toi - 1].type =
+						attypes[fromi].type;
+					continue;
+			}
+			if (toi == 0 ||
+				attypes[toi - 1].type != attypes[fromi].type)
+					attypes[toi++] = attypes[fromi];
+		}
+		timecnt = toi;
+	}
+	/*
+	** Transfer.
+	*/
+	for (i = 0; i < timecnt; ++i) {
+		ats[i] = attypes[i].at;
+		types[i] = attypes[i].type;
+	}
+	/*
+	** Correct for leap seconds.
+	*/
+	for (i = 0; i < timecnt; ++i) {
+		j = leapcnt;
+		while (--j >= 0)
+			if (ats[i] > trans[j] - corr[j]) {
+				ats[i] = tadd(ats[i], corr[j]);
+				break;
+			}
+	}
+	/*
+	** Figure out 32-bit-limited starts and counts.
+	*/
+	timecnt32 = timecnt;
+	timei32 = 0;
+	leapcnt32 = leapcnt;
+	leapi32 = 0;
+	while (timecnt32 > 0 && !is32(ats[timecnt32 - 1]))
+		--timecnt32;
+	while (timecnt32 > 0 && !is32(ats[timei32])) {
+		--timecnt32;
+		++timei32;
+	}
+	while (leapcnt32 > 0 && !is32(trans[leapcnt32 - 1]))
+		--leapcnt32;
+	while (leapcnt32 > 0 && !is32(trans[leapi32])) {
+		--leapcnt32;
+		++leapi32;
+	}
+	fullname = erealloc(fullname,
+		(int) (strlen(directory) + 1 + strlen(name) + 1));
+	(void) sprintf(fullname, "%s/%s", directory, name);
+	/*
+	** Remove old file, if any, to snap links.
+	*/
+	if (!itsdir(fullname) && remove(fullname) != 0 && errno != ENOENT) {
+		const char *e = strerror(errno);
+
+		(void) fprintf(stderr, _("%s: Can't remove %s: %s\n"),
+			progname, fullname, e);
+		exit(EXIT_FAILURE);
+	}
+	if ((fp = fopen(fullname, "wb")) == NULL) {
+		if (mkdirs(fullname) != 0)
+			exit(EXIT_FAILURE);
+		if ((fp = fopen(fullname, "wb")) == NULL) {
+			const char *e = strerror(errno);
+
+			(void) fprintf(stderr, _("%s: Can't create %s: %s\n"),
+				progname, fullname, e);
+			exit(EXIT_FAILURE);
+		}
+	}
+	for (pass = 1; pass <= 2; ++pass) {
+		register int	thistimei, thistimecnt;
+		register int	thisleapi, thisleapcnt;
+		register int	thistimelim, thisleaplim;
+		int		writetype[TZ_MAX_TIMES];
+		int		typemap[TZ_MAX_TYPES];
+		register int	thistypecnt;
+		char		thischars[TZ_MAX_CHARS];
+		char		thischarcnt;
+		int 		indmap[TZ_MAX_CHARS];
+
+		if (pass == 1) {
+			thistimei = timei32;
+			thistimecnt = timecnt32;
+			thisleapi = leapi32;
+			thisleapcnt = leapcnt32;
+		} else {
+			thistimei = 0;
+			thistimecnt = timecnt;
+			thisleapi = 0;
+			thisleapcnt = leapcnt;
+		}
+		thistimelim = thistimei + thistimecnt;
+		thisleaplim = thisleapi + thisleapcnt;
+		for (i = 0; i < typecnt; ++i)
+			writetype[i] = thistimecnt == timecnt;
+		if (thistimecnt == 0) {
+			/*
+			** No transition times fall in the current
+			** (32- or 64-bit) window.
+			*/
+			if (typecnt != 0)
+				writetype[typecnt - 1] = TRUE;
+		} else {
+			for (i = thistimei - 1; i < thistimelim; ++i)
+				if (i >= 0)
+					writetype[types[i]] = TRUE;
+			/*
+			** For America/Godthab and Antarctica/Palmer
+			*/
+			if (thistimei == 0)
+				writetype[0] = TRUE;
+		}
+		thistypecnt = 0;
+		for (i = 0; i < typecnt; ++i)
+			typemap[i] = writetype[i] ?  thistypecnt++ : -1;
+		for (i = 0; i < sizeof indmap / sizeof indmap[0]; ++i)
+			indmap[i] = -1;
+		thischarcnt = 0;
+		for (i = 0; i < typecnt; ++i) {
+			register char *	thisabbr;
+
+			if (!writetype[i])
+				continue;
+			if (indmap[abbrinds[i]] >= 0)
+				continue;
+			thisabbr = &chars[abbrinds[i]];
+			for (j = 0; j < thischarcnt; ++j)
+				if (strcmp(&thischars[j], thisabbr) == 0)
+					break;
+			if (j == thischarcnt) {
+				(void) strcpy(&thischars[(int) thischarcnt],
+					thisabbr);
+				thischarcnt += strlen(thisabbr) + 1;
+			}
+			indmap[abbrinds[i]] = j;
+		}
+#define DO(field)	(void) fwrite((void *) tzh.field, \
+				(size_t) sizeof tzh.field, (size_t) 1, fp)
+		tzh = tzh0;
+		(void) strncpy(tzh.tzh_magic, TZ_MAGIC, sizeof tzh.tzh_magic);
+		tzh.tzh_version[0] = ZIC_VERSION;
+		convert(eitol(thistypecnt), tzh.tzh_ttisgmtcnt);
+		convert(eitol(thistypecnt), tzh.tzh_ttisstdcnt);
+		convert(eitol(thisleapcnt), tzh.tzh_leapcnt);
+		convert(eitol(thistimecnt), tzh.tzh_timecnt);
+		convert(eitol(thistypecnt), tzh.tzh_typecnt);
+		convert(eitol(thischarcnt), tzh.tzh_charcnt);
+		DO(tzh_magic);
+		DO(tzh_version);
+		DO(tzh_reserved);
+		DO(tzh_ttisgmtcnt);
+		DO(tzh_ttisstdcnt);
+		DO(tzh_leapcnt);
+		DO(tzh_timecnt);
+		DO(tzh_typecnt);
+		DO(tzh_charcnt);
+#undef DO
+		for (i = thistimei; i < thistimelim; ++i)
+			if (pass == 1)
+				puttzcode((long) ats[i], fp);
+			else	puttzcode64(ats[i], fp);
+		for (i = thistimei; i < thistimelim; ++i) {
+			unsigned char	uc;
+
+			uc = typemap[types[i]];
+			(void) fwrite((void *) &uc,
+				(size_t) sizeof uc,
+				(size_t) 1,
+				fp);
+		}
+		for (i = 0; i < typecnt; ++i)
+			if (writetype[i]) {
+				puttzcode(gmtoffs[i], fp);
+				(void) putc(isdsts[i], fp);
+				(void) putc((unsigned char) indmap[abbrinds[i]], fp);
+			}
+		if (thischarcnt != 0)
+			(void) fwrite((void *) thischars,
+				(size_t) sizeof thischars[0],
+				(size_t) thischarcnt, fp);
+		for (i = thisleapi; i < thisleaplim; ++i) {
+			register zic_t	todo;
+
+			if (roll[i]) {
+				if (timecnt == 0 || trans[i] < ats[0]) {
+					j = 0;
+					while (isdsts[j])
+						if (++j >= typecnt) {
+							j = 0;
+							break;
+						}
+				} else {
+					j = 1;
+					while (j < timecnt &&
+						trans[i] >= ats[j])
+							++j;
+					j = types[j - 1];
+				}
+				todo = tadd(trans[i], -gmtoffs[j]);
+			} else	todo = trans[i];
+			if (pass == 1)
+				puttzcode((long) todo, fp);
+			else	puttzcode64(todo, fp);
+			puttzcode(corr[i], fp);
+		}
+		for (i = 0; i < typecnt; ++i)
+			if (writetype[i])
+				(void) putc(ttisstds[i], fp);
+		for (i = 0; i < typecnt; ++i)
+			if (writetype[i])
+				(void) putc(ttisgmts[i], fp);
+	}
+	(void) fprintf(fp, "\n%s\n", string);
+	if (ferror(fp) || fclose(fp)) {
+		(void) fprintf(stderr, _("%s: Error writing %s\n"),
+			progname, fullname);
+		exit(EXIT_FAILURE);
+	}
+}
+
+static void
+doabbr(abbr, format, letters, isdst, doquotes)
+char * const		abbr;
+const char * const	format;
+const char * const	letters;
+const int		isdst;
+const int		doquotes;
+{
+	register char *	cp;
+	register char *	slashp;
+	register int	len;
+
+	slashp = strchr(format, '/');
+	if (slashp == NULL) {
+		if (letters == NULL)
+			(void) strcpy(abbr, format);
+		else	(void) sprintf(abbr, format, letters);
+	} else if (isdst) {
+		(void) strcpy(abbr, slashp + 1);
+	} else {
+		if (slashp > format)
+			(void) strncpy(abbr, format,
+				(unsigned) (slashp - format));
+		abbr[slashp - format] = '\0';
+	}
+	if (!doquotes)
+		return;
+	for (cp = abbr; *cp != '\0'; ++cp)
+		if (strchr("ABCDEFGHIJKLMNOPQRSTUVWXYZ", *cp) == NULL &&
+			strchr("abcdefghijklmnopqrstuvwxyz", *cp) == NULL)
+				break;
+	len = strlen(abbr);
+	if (len > 0 && *cp == '\0')
+		return;
+	abbr[len + 2] = '\0';
+	abbr[len + 1] = '>';
+	for ( ; len > 0; --len)
+		abbr[len] = abbr[len - 1];
+	abbr[0] = '<';
+}
+
+static void
+updateminmax(x)
+const int	x;
+{
+	if (min_year > x)
+		min_year = x;
+	if (max_year < x)
+		max_year = x;
+}
+
+static int
+stringoffset(result, offset)
+char *	result;
+long	offset;
+{
+	register int	hours;
+	register int	minutes;
+	register int	seconds;
+
+	result[0] = '\0';
+	if (offset < 0) {
+		(void) strcpy(result, "-");
+		offset = -offset;
+	}
+	seconds = offset % SECSPERMIN;
+	offset /= SECSPERMIN;
+	minutes = offset % MINSPERHOUR;
+	offset /= MINSPERHOUR;
+	hours = offset;
+	if (hours >= HOURSPERDAY) {
+		result[0] = '\0';
+		return -1;
+	}
+	(void) sprintf(end(result), "%d", hours);
+	if (minutes != 0 || seconds != 0) {
+		(void) sprintf(end(result), ":%02d", minutes);
+		if (seconds != 0)
+			(void) sprintf(end(result), ":%02d", seconds);
+	}
+	return 0;
+}
+
+static int
+stringrule(result, rp, dstoff, gmtoff)
+char *				result;
+const struct rule * const	rp;
+const long			dstoff;
+const long			gmtoff;
+{
+	register long	tod;
+
+	result = end(result);
+	if (rp->r_dycode == DC_DOM) {
+		register int	month, total;
+
+		if (rp->r_dayofmonth == 29 && rp->r_month == TM_FEBRUARY)
+			return -1;
+		total = 0;
+		for (month = 0; month < rp->r_month; ++month)
+			total += len_months[0][month];
+		(void) sprintf(result, "J%d", total + rp->r_dayofmonth);
+	} else {
+		register int	week;
+
+		if (rp->r_dycode == DC_DOWGEQ) {
+			week = 1 + rp->r_dayofmonth / DAYSPERWEEK;
+			if ((week - 1) * DAYSPERWEEK + 1 != rp->r_dayofmonth)
+				return -1;
+		} else if (rp->r_dycode == DC_DOWLEQ) {
+			if (rp->r_dayofmonth == len_months[1][rp->r_month])
+				week = 5;
+			else {
+				week = 1 + rp->r_dayofmonth / DAYSPERWEEK;
+				if (week * DAYSPERWEEK - 1 != rp->r_dayofmonth)
+					return -1;
+			}
+		} else	return -1;	/* "cannot happen" */
+		(void) sprintf(result, "M%d.%d.%d",
+			rp->r_month + 1, week, rp->r_wday);
+	}
+	tod = rp->r_tod;
+	if (rp->r_todisgmt)
+		tod += gmtoff;
+	if (rp->r_todisstd && rp->r_stdoff == 0)
+		tod += dstoff;
+	if (tod < 0) {
+		result[0] = '\0';
+		return -1;
+	}
+	if (tod != 2 * SECSPERMIN * MINSPERHOUR) {
+		(void) strcat(result, "/");
+		if (stringoffset(end(result), tod) != 0)
+			return -1;
+	}
+	return 0;
+}
+
+static void
+stringzone(result, zpfirst, zonecount)
+char *				result;
+const struct zone * const	zpfirst;
+const int			zonecount;
+{
+	register const struct zone *	zp;
+	register struct rule *		rp;
+	register struct rule *		stdrp;
+	register struct rule *		dstrp;
+	register int			i;
+	register const char *		abbrvar;
+
+	result[0] = '\0';
+	zp = zpfirst + zonecount - 1;
+	stdrp = dstrp = NULL;
+	for (i = 0; i < zp->z_nrules; ++i) {
+		rp = &zp->z_rules[i];
+		if (rp->r_hiwasnum || rp->r_hiyear != INT_MAX)
+			continue;
+		if (rp->r_yrtype != NULL)
+			continue;
+		if (rp->r_stdoff == 0) {
+			if (stdrp == NULL)
+				stdrp = rp;
+			else	return;
+		} else {
+			if (dstrp == NULL)
+				dstrp = rp;
+			else	return;
+		}
+	}
+	if (stdrp == NULL && dstrp == NULL) {
+		/*
+		** There are no rules running through "max".
+		** Let's find the latest rule.
+		*/
+		for (i = 0; i < zp->z_nrules; ++i) {
+			rp = &zp->z_rules[i];
+			if (stdrp == NULL || rp->r_hiyear > stdrp->r_hiyear ||
+				(rp->r_hiyear == stdrp->r_hiyear &&
+				rp->r_month > stdrp->r_month))
+					stdrp = rp;
+		}
+		if (stdrp != NULL && stdrp->r_stdoff != 0)
+			return;	/* We end up in DST (a POSIX no-no). */
+		/*
+		** Horrid special case: if year is 2037,
+		** presume this is a zone handled on a year-by-year basis;
+		** do not try to apply a rule to the zone.
+		*/
+		if (stdrp != NULL && stdrp->r_hiyear == 2037)
+			return;
+	}
+	if (stdrp == NULL && zp->z_nrules != 0)
+		return;
+	abbrvar = (stdrp == NULL) ? "" : stdrp->r_abbrvar;
+	doabbr(result, zp->z_format, abbrvar, FALSE, TRUE);
+	if (stringoffset(end(result), -zp->z_gmtoff) != 0) {
+		result[0] = '\0';
+		return;
+	}
+	if (dstrp == NULL)
+		return;
+	doabbr(end(result), zp->z_format, dstrp->r_abbrvar, TRUE, TRUE);
+	if (dstrp->r_stdoff != SECSPERMIN * MINSPERHOUR)
+		if (stringoffset(end(result),
+			-(zp->z_gmtoff + dstrp->r_stdoff)) != 0) {
+				result[0] = '\0';
+				return;
+		}
+	(void) strcat(result, ",");
+	if (stringrule(result, dstrp, dstrp->r_stdoff, zp->z_gmtoff) != 0) {
+		result[0] = '\0';
+		return;
+	}
+	(void) strcat(result, ",");
+	if (stringrule(result, stdrp, dstrp->r_stdoff, zp->z_gmtoff) != 0) {
+		result[0] = '\0';
+		return;
+	}
+}
+
+static void
+outzone(zpfirst, zonecount)
+const struct zone * const	zpfirst;
+const int			zonecount;
+{
+	register const struct zone *	zp;
+	register struct rule *		rp;
+	register int			i, j;
+	register int			usestart, useuntil;
+	register zic_t			starttime, untiltime;
+	register long			gmtoff;
+	register long			stdoff;
+	register int			year;
+	register long			startoff;
+	register int			startttisstd;
+	register int			startttisgmt;
+	register int			type;
+	register char *			startbuf;
+	register char *			ab;
+	register char *			envvar;
+	register int			max_abbr_len;
+	register int			max_envvar_len;
+
+	max_abbr_len = 2 + max_format_len + max_abbrvar_len;
+	max_envvar_len = 2 * max_abbr_len + 5 * 9;
+	startbuf = emalloc(max_abbr_len + 1);
+	ab = emalloc(max_abbr_len + 1);
+	envvar = emalloc(max_envvar_len + 1);
+	INITIALIZE(untiltime);
+	INITIALIZE(starttime);
+	/*
+	** Now. . .finally. . .generate some useful data!
+	*/
+	timecnt = 0;
+	typecnt = 0;
+	charcnt = 0;
+	/*
+	** Thanks to Earl Chew
+	** for noting the need to unconditionally initialize startttisstd.
+	*/
+	startttisstd = FALSE;
+	startttisgmt = FALSE;
+	min_year = max_year = EPOCH_YEAR;
+	if (leapseen) {
+		updateminmax(leapminyear);
+		updateminmax(leapmaxyear + (leapmaxyear < INT_MAX));
+	}
+	for (i = 0; i < zonecount; ++i) {
+		zp = &zpfirst[i];
+		if (i < zonecount - 1)
+			updateminmax(zp->z_untilrule.r_loyear);
+		for (j = 0; j < zp->z_nrules; ++j) {
+			rp = &zp->z_rules[j];
+			if (rp->r_lowasnum)
+				updateminmax(rp->r_loyear);
+			if (rp->r_hiwasnum)
+				updateminmax(rp->r_hiyear);
+		}
+	}
+	/*
+	** Generate lots of data if a rule can't cover all future times.
+	*/
+	stringzone(envvar, zpfirst, zonecount);
+	if (noise && envvar[0] == '\0') {
+		register char *	wp;
+
+wp = ecpyalloc(_("no POSIX environment variable for zone"));
+		wp = ecatalloc(wp, " ");
+		wp = ecatalloc(wp, zpfirst->z_name);
+		warning(wp);
+		ifree(wp);
+	}
+	if (envvar[0] == '\0') {
+		if (min_year >= INT_MIN + YEARSPERREPEAT)
+			min_year -= YEARSPERREPEAT;
+		else	min_year = INT_MIN;
+		if (max_year <= INT_MAX - YEARSPERREPEAT)
+			max_year += YEARSPERREPEAT;
+		else	max_year = INT_MAX;
+	}
+	/*
+	** For the benefit of older systems,
+	** generate data from 1900 through 2037.
+	*/
+	if (min_year > 1900)
+		min_year = 1900;
+	if (max_year < 2037)
+		max_year = 2037;
+	for (i = 0; i < zonecount; ++i) {
+		/*
+		** A guess that may well be corrected later.
+		*/
+		stdoff = 0;
+		zp = &zpfirst[i];
+		usestart = i > 0 && (zp - 1)->z_untiltime > min_time;
+		useuntil = i < (zonecount - 1);
+		if (useuntil && zp->z_untiltime <= min_time)
+			continue;
+		gmtoff = zp->z_gmtoff;
+		eat(zp->z_filename, zp->z_linenum);
+		*startbuf = '\0';
+		startoff = zp->z_gmtoff;
+		if (zp->z_nrules == 0) {
+			stdoff = zp->z_stdoff;
+			doabbr(startbuf, zp->z_format,
+				(char *) NULL, stdoff != 0, FALSE);
+			type = addtype(oadd(zp->z_gmtoff, stdoff),
+				startbuf, stdoff != 0, startttisstd,
+				startttisgmt);
+			if (usestart) {
+				addtt(starttime, type);
+				usestart = FALSE;
+			} else if (stdoff != 0)
+				addtt(min_time, type);
+		} else for (year = min_year; year <= max_year; ++year) {
+			if (useuntil && year > zp->z_untilrule.r_hiyear)
+				break;
+			/*
+			** Mark which rules to do in the current year.
+			** For those to do, calculate rpytime(rp, year);
+			*/
+			for (j = 0; j < zp->z_nrules; ++j) {
+				rp = &zp->z_rules[j];
+				eats(zp->z_filename, zp->z_linenum,
+					rp->r_filename, rp->r_linenum);
+				rp->r_todo = year >= rp->r_loyear &&
+						year <= rp->r_hiyear &&
+						yearistype(year, rp->r_yrtype);
+				if (rp->r_todo)
+					rp->r_temp = rpytime(rp, year);
+			}
+			for ( ; ; ) {
+				register int	k;
+				register zic_t	jtime, ktime;
+				register long	offset;
+
+				INITIALIZE(ktime);
+				if (useuntil) {
+					/*
+					** Turn untiltime into UTC
+					** assuming the current gmtoff and
+					** stdoff values.
+					*/
+					untiltime = zp->z_untiltime;
+					if (!zp->z_untilrule.r_todisgmt)
+						untiltime = tadd(untiltime,
+							-gmtoff);
+					if (!zp->z_untilrule.r_todisstd)
+						untiltime = tadd(untiltime,
+							-stdoff);
+				}
+				/*
+				** Find the rule (of those to do, if any)
+				** that takes effect earliest in the year.
+				*/
+				k = -1;
+				for (j = 0; j < zp->z_nrules; ++j) {
+					rp = &zp->z_rules[j];
+					if (!rp->r_todo)
+						continue;
+					eats(zp->z_filename, zp->z_linenum,
+						rp->r_filename, rp->r_linenum);
+					offset = rp->r_todisgmt ? 0 : gmtoff;
+					if (!rp->r_todisstd)
+						offset = oadd(offset, stdoff);
+					jtime = rp->r_temp;
+					if (jtime == min_time ||
+						jtime == max_time)
+							continue;
+					jtime = tadd(jtime, -offset);
+					if (k < 0 || jtime < ktime) {
+						k = j;
+						ktime = jtime;
+					}
+				}
+				if (k < 0)
+					break;	/* go on to next year */
+				rp = &zp->z_rules[k];
+				rp->r_todo = FALSE;
+				if (useuntil && ktime >= untiltime)
+					break;
+				stdoff = rp->r_stdoff;
+				if (usestart && ktime == starttime)
+					usestart = FALSE;
+				if (usestart) {
+					if (ktime < starttime) {
+						startoff = oadd(zp->z_gmtoff,
+							stdoff);
+						doabbr(startbuf, zp->z_format,
+							rp->r_abbrvar,
+							rp->r_stdoff != 0,
+							FALSE);
+						continue;
+					}
+					if (*startbuf == '\0' &&
+						startoff == oadd(zp->z_gmtoff,
+						stdoff)) {
+							doabbr(startbuf,
+								zp->z_format,
+								rp->r_abbrvar,
+								rp->r_stdoff !=
+								0,
+								FALSE);
+					}
+				}
+				eats(zp->z_filename, zp->z_linenum,
+					rp->r_filename, rp->r_linenum);
+				doabbr(ab, zp->z_format, rp->r_abbrvar,
+					rp->r_stdoff != 0, FALSE);
+				offset = oadd(zp->z_gmtoff, rp->r_stdoff);
+				type = addtype(offset, ab, rp->r_stdoff != 0,
+					rp->r_todisstd, rp->r_todisgmt);
+				addtt(ktime, type);
+			}
+		}
+		if (usestart) {
+			if (*startbuf == '\0' &&
+				zp->z_format != NULL &&
+				strchr(zp->z_format, '%') == NULL &&
+				strchr(zp->z_format, '/') == NULL)
+					(void) strcpy(startbuf, zp->z_format);
+			eat(zp->z_filename, zp->z_linenum);
+			if (*startbuf == '\0')
+error(_("can't determine time zone abbreviation to use just after until time"));
+			else	addtt(starttime,
+					addtype(startoff, startbuf,
+						startoff != zp->z_gmtoff,
+						startttisstd,
+						startttisgmt));
+		}
+		/*
+		** Now we may get to set starttime for the next zone line.
+		*/
+		if (useuntil) {
+			startttisstd = zp->z_untilrule.r_todisstd;
+			startttisgmt = zp->z_untilrule.r_todisgmt;
+			starttime = zp->z_untiltime;
+			if (!startttisstd)
+				starttime = tadd(starttime, -stdoff);
+			if (!startttisgmt)
+				starttime = tadd(starttime, -gmtoff);
+		}
+	}
+	writezone(zpfirst->z_name, envvar);
+	ifree(startbuf);
+	ifree(ab);
+	ifree(envvar);
+}
+
+static void
+addtt(starttime, type)
+const zic_t	starttime;
+int		type;
+{
+	if (starttime <= min_time ||
+		(timecnt == 1 && attypes[0].at < min_time)) {
+		gmtoffs[0] = gmtoffs[type];
+		isdsts[0] = isdsts[type];
+		ttisstds[0] = ttisstds[type];
+		ttisgmts[0] = ttisgmts[type];
+		if (abbrinds[type] != 0)
+			(void) strcpy(chars, &chars[abbrinds[type]]);
+		abbrinds[0] = 0;
+		charcnt = strlen(chars) + 1;
+		typecnt = 1;
+		timecnt = 0;
+		type = 0;
+	}
+	if (timecnt >= TZ_MAX_TIMES) {
+		error(_("too many transitions?!"));
+		exit(EXIT_FAILURE);
+	}
+	attypes[timecnt].at = starttime;
+	attypes[timecnt].type = type;
+	++timecnt;
+}
+
+static int
+addtype(gmtoff, abbr, isdst, ttisstd, ttisgmt)
+const long		gmtoff;
+const char * const	abbr;
+const int		isdst;
+const int		ttisstd;
+const int		ttisgmt;
+{
+	register int	i, j;
+
+	if (isdst != TRUE && isdst != FALSE) {
+		error(_("internal error - addtype called with bad isdst"));
+		exit(EXIT_FAILURE);
+	}
+	if (ttisstd != TRUE && ttisstd != FALSE) {
+		error(_("internal error - addtype called with bad ttisstd"));
+		exit(EXIT_FAILURE);
+	}
+	if (ttisgmt != TRUE && ttisgmt != FALSE) {
+		error(_("internal error - addtype called with bad ttisgmt"));
+		exit(EXIT_FAILURE);
+	}
+	/*
+	** See if there's already an entry for this zone type.
+	** If so, just return its index.
+	*/
+	for (i = 0; i < typecnt; ++i) {
+		if (gmtoff == gmtoffs[i] && isdst == isdsts[i] &&
+			strcmp(abbr, &chars[abbrinds[i]]) == 0 &&
+			ttisstd == ttisstds[i] &&
+			ttisgmt == ttisgmts[i])
+				return i;
+	}
+	/*
+	** There isn't one; add a new one, unless there are already too
+	** many.
+	*/
+	if (typecnt >= TZ_MAX_TYPES) {
+		error(_("too many local time types"));
+		exit(EXIT_FAILURE);
+	}
+	if (! (-1L - 2147483647L <= gmtoff && gmtoff <= 2147483647L)) {
+		error(_("UTC offset out of range"));
+		exit(EXIT_FAILURE);
+	}
+	gmtoffs[i] = gmtoff;
+	isdsts[i] = isdst;
+	ttisstds[i] = ttisstd;
+	ttisgmts[i] = ttisgmt;
+
+	for (j = 0; j < charcnt; ++j)
+		if (strcmp(&chars[j], abbr) == 0)
+			break;
+	if (j == charcnt)
+		newabbr(abbr);
+	abbrinds[i] = j;
+	++typecnt;
+	return i;
+}
+
+static void
+leapadd(t, positive, rolling, count)
+const zic_t	t;
+const int	positive;
+const int	rolling;
+int		count;
+{
+	register int	i, j;
+
+	if (leapcnt + (positive ? count : 1) > TZ_MAX_LEAPS) {
+		error(_("too many leap seconds"));
+		exit(EXIT_FAILURE);
+	}
+	for (i = 0; i < leapcnt; ++i)
+		if (t <= trans[i]) {
+			if (t == trans[i]) {
+				error(_("repeated leap second moment"));
+				exit(EXIT_FAILURE);
+			}
+			break;
+		}
+	do {
+		for (j = leapcnt; j > i; --j) {
+			trans[j] = trans[j - 1];
+			corr[j] = corr[j - 1];
+			roll[j] = roll[j - 1];
+		}
+		trans[i] = t;
+		corr[i] = positive ? 1L : eitol(-count);
+		roll[i] = rolling;
+		++leapcnt;
+	} while (positive && --count != 0);
+}
+
+static void
+adjleap(void)
+{
+	register int	i;
+	register long	last = 0;
+
+	/*
+	** propagate leap seconds forward
+	*/
+	for (i = 0; i < leapcnt; ++i) {
+		trans[i] = tadd(trans[i], last);
+		last = corr[i] += last;
+	}
+}
+
+static int
+yearistype(year, type)
+const int		year;
+const char * const	type;
+{
+	static char *	buf;
+	int		result;
+
+	if (type == NULL || *type == '\0')
+		return TRUE;
+	buf = erealloc(buf, (int) (132 + strlen(yitcommand) + strlen(type)));
+	(void) sprintf(buf, "%s %d %s", yitcommand, year, type);
+	result = system(buf);
+	if (WIFEXITED(result)) switch (WEXITSTATUS(result)) {
+		case 0:
+			return TRUE;
+		case 1:
+			return FALSE;
+	}
+	error(_("Wild result from command execution"));
+	(void) fprintf(stderr, _("%s: command was '%s', result was %d\n"),
+		progname, buf, result);
+	for ( ; ; )
+		exit(EXIT_FAILURE);
+}
+
+static int
+lowerit(a)
+int	a;
+{
+	a = (unsigned char) a;
+	return (isascii(a) && isupper(a)) ? tolower(a) : a;
+}
+
+static int
+ciequal(ap, bp)		/* case-insensitive equality */
+register const char *	ap;
+register const char *	bp;
+{
+	while (lowerit(*ap) == lowerit(*bp++))
+		if (*ap++ == '\0')
+			return TRUE;
+	return FALSE;
+}
+
+static int
+itsabbr(abbr, word)
+register const char *	abbr;
+register const char *	word;
+{
+	if (lowerit(*abbr) != lowerit(*word))
+		return FALSE;
+	++word;
+	while (*++abbr != '\0')
+		do {
+			if (*word == '\0')
+				return FALSE;
+		} while (lowerit(*word++) != lowerit(*abbr));
+	return TRUE;
+}
+
+static const struct lookup *
+byword(word, table)
+register const char * const		word;
+register const struct lookup * const	table;
+{
+	register const struct lookup *	foundlp;
+	register const struct lookup *	lp;
+
+	if (word == NULL || table == NULL)
+		return NULL;
+	/*
+	** Look for exact match.
+	*/
+	for (lp = table; lp->l_word != NULL; ++lp)
+		if (ciequal(word, lp->l_word))
+			return lp;
+	/*
+	** Look for inexact match.
+	*/
+	foundlp = NULL;
+	for (lp = table; lp->l_word != NULL; ++lp)
+		if (itsabbr(word, lp->l_word)) {
+			if (foundlp == NULL)
+				foundlp = lp;
+			else	return NULL;	/* multiple inexact matches */
+		}
+	return foundlp;
+}
+
+static char **
+getfields(cp)
+register char *	cp;
+{
+	register char *		dp;
+	register char **	array;
+	register int		nsubs;
+
+	if (cp == NULL)
+		return NULL;
+	array = (char **) (void *)
+		emalloc((int) ((strlen(cp) + 1) * sizeof *array));
+	nsubs = 0;
+	for ( ; ; ) {
+		while (isascii((unsigned char) *cp) &&
+			isspace((unsigned char) *cp))
+				++cp;
+		if (*cp == '\0' || *cp == '#')
+			break;
+		array[nsubs++] = dp = cp;
+		do {
+			if ((*dp = *cp++) != '"')
+				++dp;
+			else while ((*dp = *cp++) != '"')
+				if (*dp != '\0')
+					++dp;
+				else {
+					error(_(
+						"Odd number of quotation marks"
+						));
+					exit(1);
+				}
+		} while (*cp != '\0' && *cp != '#' &&
+			(!isascii(*cp) || !isspace((unsigned char) *cp)));
+		if (isascii(*cp) && isspace((unsigned char) *cp))
+			++cp;
+		*dp = '\0';
+	}
+	array[nsubs] = NULL;
+	return array;
+}
+
+static long
+oadd(t1, t2)
+const long	t1;
+const long	t2;
+{
+	register long	t;
+
+	t = t1 + t2;
+	if ((t2 > 0 && t <= t1) || (t2 < 0 && t >= t1)) {
+		error(_("time overflow"));
+		exit(EXIT_FAILURE);
+	}
+	return t;
+}
+
+static zic_t
+tadd(t1, t2)
+const zic_t	t1;
+const long	t2;
+{
+	register zic_t	t;
+
+	if (t1 == max_time && t2 > 0)
+		return max_time;
+	if (t1 == min_time && t2 < 0)
+		return min_time;
+	t = t1 + t2;
+	if ((t2 > 0 && t <= t1) || (t2 < 0 && t >= t1)) {
+		error(_("time overflow"));
+		exit(EXIT_FAILURE);
+	}
+	return t;
+}
+
+/*
+** Given a rule, and a year, compute the date - in seconds since January 1,
+** 1970, 00:00 LOCAL time - in that year that the rule refers to.
+*/
+
+static zic_t
+rpytime(rp, wantedy)
+register const struct rule * const	rp;
+register const int			wantedy;
+{
+	register int	y, m, i;
+	register long	dayoff;			/* with a nod to Margaret O. */
+	register zic_t	t;
+
+	if (wantedy == INT_MIN)
+		return min_time;
+	if (wantedy == INT_MAX)
+		return max_time;
+	dayoff = 0;
+	m = TM_JANUARY;
+	y = EPOCH_YEAR;
+	while (wantedy != y) {
+		if (wantedy > y) {
+			i = len_years[isleap(y)];
+			++y;
+		} else {
+			--y;
+			i = -len_years[isleap(y)];
+		}
+		dayoff = oadd(dayoff, eitol(i));
+	}
+	while (m != rp->r_month) {
+		i = len_months[isleap(y)][m];
+		dayoff = oadd(dayoff, eitol(i));
+		++m;
+	}
+	i = rp->r_dayofmonth;
+	if (m == TM_FEBRUARY && i == 29 && !isleap(y)) {
+		if (rp->r_dycode == DC_DOWLEQ)
+			--i;
+		else {
+			error(_("use of 2/29 in non leap-year"));
+			exit(EXIT_FAILURE);
+		}
+	}
+	--i;
+	dayoff = oadd(dayoff, eitol(i));
+	if (rp->r_dycode == DC_DOWGEQ || rp->r_dycode == DC_DOWLEQ) {
+		register long	wday;
+
+#define LDAYSPERWEEK	((long) DAYSPERWEEK)
+		wday = eitol(EPOCH_WDAY);
+		/*
+		** Don't trust mod of negative numbers.
+		*/
+		if (dayoff >= 0)
+			wday = (wday + dayoff) % LDAYSPERWEEK;
+		else {
+			wday -= ((-dayoff) % LDAYSPERWEEK);
+			if (wday < 0)
+				wday += LDAYSPERWEEK;
+		}
+		while (wday != eitol(rp->r_wday))
+			if (rp->r_dycode == DC_DOWGEQ) {
+				dayoff = oadd(dayoff, (long) 1);
+				if (++wday >= LDAYSPERWEEK)
+					wday = 0;
+				++i;
+			} else {
+				dayoff = oadd(dayoff, (long) -1);
+				if (--wday < 0)
+					wday = LDAYSPERWEEK - 1;
+				--i;
+			}
+		if (i < 0 || i >= len_months[isleap(y)][m]) {
+			if (noise)
+				warning(_("rule goes past start/end of month--\
+will not work with pre-2004 versions of zic"));
+		}
+	}
+	if (dayoff < min_time / SECSPERDAY)
+		return min_time;
+	if (dayoff > max_time / SECSPERDAY)
+		return max_time;
+	t = (zic_t) dayoff * SECSPERDAY;
+	return tadd(t, rp->r_tod);
+}
+
+static void
+newabbr(string)
+const char * const	string;
+{
+	register int	i;
+
+	if (strcmp(string, GRANDPARENTED) != 0) {
+		register const char *	cp;
+		register char *		wp;
+
+		/*
+		** Want one to ZIC_MAX_ABBR_LEN_WO_WARN alphabetics
+		** optionally followed by a + or - and a number from 1 to 14.
+		*/
+		cp = string;
+		wp = NULL;
+		while (isascii((unsigned char) *cp) &&
+			isalpha((unsigned char) *cp))
+				++cp;
+		if (cp - string == 0)
+wp = _("time zone abbreviation lacks alphabetic at start");
+		if (noise && cp - string > 3)
+wp = _("time zone abbreviation has more than 3 alphabetics");
+		if (cp - string > ZIC_MAX_ABBR_LEN_WO_WARN)
+wp = _("time zone abbreviation has too many alphabetics");
+		if (wp == NULL && (*cp == '+' || *cp == '-')) {
+			++cp;
+			if (isascii((unsigned char) *cp) &&
+				isdigit((unsigned char) *cp))
+					if (*cp++ == '1' &&
+						*cp >= '0' && *cp <= '4')
+							++cp;
+		}
+		if (*cp != '\0')
+wp = _("time zone abbreviation differs from POSIX standard");
+		if (wp != NULL) {
+			wp = ecpyalloc(wp);
+			wp = ecatalloc(wp, " (");
+			wp = ecatalloc(wp, string);
+			wp = ecatalloc(wp, ")");
+			warning(wp);
+			ifree(wp);
+		}
+	}
+	i = strlen(string) + 1;
+	if (charcnt + i > TZ_MAX_CHARS) {
+		error(_("too many, or too long, time zone abbreviations"));
+		exit(EXIT_FAILURE);
+	}
+	(void) strcpy(&chars[charcnt], string);
+	charcnt += eitol(i);
+}
+
+static int
+mkdirs(argname)
+char *		argname;
+{
+	register char *	name;
+	register char *	cp;
+
+	if (argname == NULL || *argname == '\0')
+		return 0;
+	cp = name = ecpyalloc(argname);
+	while ((cp = strchr(cp + 1, '/')) != 0) {
+		*cp = '\0';
+#ifndef unix
+		/*
+		** DOS drive specifier?
+		*/
+		if (isalpha((unsigned char) name[0]) &&
+			name[1] == ':' && name[2] == '\0') {
+				*cp = '/';
+				continue;
+		}
+#endif /* !defined unix */
+		if (!itsdir(name)) {
+			/*
+			** It doesn't seem to exist, so we try to create it.
+			** Creation may fail because of the directory being
+			** created by some other multiprocessor, so we get
+			** to do extra checking.
+			*/
+			if (mkdir(name, MKDIR_UMASK) != 0) {
+				const char *e = strerror(errno);
+
+				if (errno != EEXIST || !itsdir(name)) {
+					(void) fprintf(stderr,
+_("%s: Can't create directory %s: %s\n"),
+						progname, name, e);
+					ifree(name);
+					return -1;
+				}
+			}
+		}
+		*cp = '/';
+	}
+	ifree(name);
+	return 0;
+}
+
+static long
+eitol(i)
+const int	i;
+{
+	long	l;
+
+	l = i;
+	if ((i < 0 && l >= 0) || (i == 0 && l != 0) || (i > 0 && l <= 0)) {
+		(void) fprintf(stderr,
+			_("%s: %d did not sign extend correctly\n"),
+			progname, i);
+		exit(EXIT_FAILURE);
+	}
+	return l;
+}
+
+/*
+** UNIX was a registered trademark of The Open Group in 2003.
+*/

Property changes on: vendor/tzcode/tzcode2009h/zic/zic.c
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+FreeBSD=%H
\ No newline at end of property