Index: vendor/tzcode/dist/libc/stdtime/time2posix.3 =================================================================== --- vendor/tzcode/dist/libc/stdtime/time2posix.3 (revision 192886) +++ vendor/tzcode/dist/libc/stdtime/time2posix.3 (revision 192887) @@ -1,121 +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.1 +.\" @(#)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/dist/unused/Makefile =================================================================== --- vendor/tzcode/dist/unused/Makefile (revision 192886) +++ vendor/tzcode/dist/unused/Makefile (revision 192887) @@ -1,418 +1,421 @@ -# @(#)Makefile 8.7 +#
+# @(#)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/dist/unused/date.1
===================================================================
--- vendor/tzcode/dist/unused/date.1	(revision 192886)
+++ vendor/tzcode/dist/unused/date.1	(revision 192887)
@@ -1,175 +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.1
+.\" @(#)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/dist/unused/newctime.3
===================================================================
--- vendor/tzcode/dist/unused/newctime.3	(revision 192886)
+++ vendor/tzcode/dist/unused/newctime.3	(revision 192887)
@@ -1,239 +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.2
+.\" @(#)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/dist/unused/newstrftime.3
===================================================================
--- vendor/tzcode/dist/unused/newstrftime.3	(revision 192886)
+++ vendor/tzcode/dist/unused/newstrftime.3	(revision 192887)
@@ -1,230 +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.1
+.\" @(#)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/dist/unused/newtzset.3
===================================================================
--- vendor/tzcode/dist/unused/newtzset.3	(revision 192886)
+++ vendor/tzcode/dist/unused/newtzset.3	(revision 192887)
@@ -1,237 +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.1
+.\" @(#)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/dist/unused/tz-art.htm
===================================================================
--- vendor/tzcode/dist/unused/tz-art.htm	(revision 192886)
+++ vendor/tzcode/dist/unused/tz-art.htm	(revision 192887)
@@ -1,402 +1,406 @@
 
 
 
 
 Time and the Arts
 
 
 

Time and the Arts

-@(#)tz-art.htm 8.11 +@(#)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)
Index: vendor/tzcode/dist/unused/tz-link.htm =================================================================== --- vendor/tzcode/dist/unused/tz-link.htm (revision 192886) +++ vendor/tzcode/dist/unused/tz-link.htm (revision 192887) @@ -1,648 +1,652 @@ Sources for Time Zone and Daylight Saving Time Data

Sources for Time Zone and Daylight Saving Time Data

-@(#)tz-link.htm 8.18 +@(#)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

Index: vendor/tzcode/dist/unused/tzselect.8 =================================================================== --- vendor/tzcode/dist/unused/tzselect.8 (revision 192886) +++ vendor/tzcode/dist/unused/tzselect.8 (revision 192887) @@ -1,41 +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.1 +.\" @(#)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/dist/unused/workman.sh =================================================================== --- vendor/tzcode/dist/unused/workman.sh (revision 192886) +++ vendor/tzcode/dist/unused/workman.sh (revision 192887) @@ -1,29 +1,32 @@ #! /bin/sh -# @(#)workman.sh 8.1 +#
+# @(#)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/dist/zic/README
===================================================================
--- vendor/tzcode/dist/zic/README	(revision 192886)
+++ vendor/tzcode/dist/zic/README	(revision 192887)
@@ -1,84 +1,86 @@
-@(#)README	8.2
+@(#)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.
Index: vendor/tzcode/dist/zic/Theory
===================================================================
--- vendor/tzcode/dist/zic/Theory	(revision 192886)
+++ vendor/tzcode/dist/zic/Theory	(revision 192887)
@@ -1,569 +1,569 @@
-@(#)Theory	8.2
+@(#)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.
Index: vendor/tzcode/dist/zic/zdump.8
===================================================================
--- vendor/tzcode/dist/zic/zdump.8	(revision 192886)
+++ vendor/tzcode/dist/zic/zdump.8	(revision 192887)
@@ -1,57 +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.1
+.\" @(#)zdump.8	8.2
+.\" This file is in the public domain, so clarified as of
+.\" 2009-05-17 by Arthur David Olson.
Index: vendor/tzcode/dist/zic/zdump.c
===================================================================
--- vendor/tzcode/dist/zic/zdump.c	(revision 192886)
+++ vendor/tzcode/dist/zic/zdump.c	(revision 192887)
@@ -1,673 +1,678 @@
-static char	elsieid[] = "@(#)zdump.c	8.8";
+/*
+** 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));
 }
Index: vendor/tzcode/dist/zic/zic.8
===================================================================
--- vendor/tzcode/dist/zic/zic.8	(revision 192886)
+++ vendor/tzcode/dist/zic/zic.8	(revision 192887)
@@ -1,493 +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.4
+.\" @(#)zic.8	8.5
+.\" This file is in the public domain, so clarified as of
+.\" 2009-05-17 by Arthur David Olson.