1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-11 09:50:12 +00:00

MFV r308265: Update tzdata to 2016i.

Sponsored by:	The FreeBSD Foundation
This commit is contained in:
Glen Barber 2016-11-03 23:34:11 +00:00
commit ba2b2efdfa
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=308270
18 changed files with 6711 additions and 74 deletions

View File

@ -0,0 +1,73 @@
Contributing to the tz code and data
The time zone database is by no means authoritative: governments
change timekeeping rules erratically and sometimes with little
warning, the data entries do not cover all of civil time before
1970, and undoubtedly errors remain in the code and data. Feel
free to fill gaps or fix mistakes, and please email improvements
to tz@iana.org for use in the future.
To email small changes, please run a POSIX shell command like
'diff -u old/europe new/europe >myfix.patch', and attach
myfix.patch to the email.
For more-elaborate changes, please read the Theory file and browse
the mailing list archives <http://mm.icann.org/pipermail/tz/> for
examples of patches that tend to work well. Ideally, additions to
data should contain commentary citing reliable sources as
justification.
Please submit changes against either the latest release in
<ftp://ftp.iana.org/tz/> or the master branch of the experimental
Git repository. If you use Git the following workflow may be helpful:
* Copy the experimental repository.
git clone https://github.com/eggert/tz.git
cd tz
* Get current with the master branch.
git checkout master
git pull
* Switch to a new branch for the changes. Choose a different
branch name for each change set.
git checkout -b mybranch
* Edit source files. Include commentary that justifies the
changes by citing reliable sources.
* Debug the changes, e.g.:
make check
make install
./zdump -v America/Los_Angeles
* For each separable change, commit it in the new branch, e.g.:
git add northamerica
git commit
See recent 'git log' output for the commit-message style.
* Create patch files 0001-*, 0002-*, ...
git format-patch master
* After reviewing the patch files, send the patches to tz@iana.org
for others to review.
git send-email master
* Start anew by getting current with the master branch again
(the second step above).
Please do not create issues or pull requests on GitHub, as the
proper procedure for proposing and distributing patches is via
email as illustrated above.
-----
This file is in the public domain.

4
contrib/tzdata/LICENSE Normal file
View File

@ -0,0 +1,4 @@
With a few exceptions, all files in the tz code and data (including
this one) are in the public domain. The exceptions are date.c,
newstrftime.3, and strftime.c, which contain material derived from BSD
and which use the BSD 3-clause license.

793
contrib/tzdata/Makefile Normal file
View File

@ -0,0 +1,793 @@
# This file is in the public domain, so clarified as of
# 2009-05-17 by Arthur David Olson.
# Package name for the code distribution.
PACKAGE= tzcode
# Version number for the distribution, overridden in the 'tarballs' rule below.
VERSION= unknown
# Email address for bug reports.
BUGEMAIL= tz@iana.org
# 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= GMT
# 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 UT 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_BASENAME= zoneinfo
TZDIR= $(TOPDIR)/etc/$(TZDIR_BASENAME)
# Types to try, as an alternative to time_t. int64_t should be first.
TIME_T_ALTERNATIVES= int64_t int32_t uint32_t uint64_t
# 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
# 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 "posix_only" or "posix_right".
REDO= posix_right
# If you want out-of-scope and often-wrong data from the file 'backzone', use
# PACKRATDATA= backzone
# To omit this data, use
# PACKRATDATA=
PACKRATDATA=
# Since "." may not be in PATH...
YEARISTYPE= ./yearistype
# Non-default libraries needed to link.
LDLIBS=
# Add the following to the end of the "CFLAGS=" line as needed.
# -DBIG_BANG=-9999999LL if the Big Bang occurred at time -9999999 (see zic.c)
# -DHAVE_DECL_ASCTIME_R=0 if <time.h> does not declare asctime_r
# -DHAVE_DIRECT_H if mkdir needs <direct.h> (MS-Windows)
# -DHAVE_DOS_FILE_NAMES if file names have drive specifiers etc. (MS-DOS)
# -DHAVE_GETTEXT=1 if 'gettext' works (e.g., GNU/Linux, FreeBSD, Solaris)
# -DHAVE_INCOMPATIBLE_CTIME_R=1 if your system's time.h declares
# ctime_r and asctime_r incompatibly with the POSIX standard
# (Solaris when _POSIX_PTHREAD_SEMANTICS is not defined).
# -DHAVE_INTTYPES_H=1 if you have a pre-C99 compiler with "inttypes.h"
# -DHAVE_LINK=0 if your system lacks a link function
# -DHAVE_LOCALTIME_R=0 if your system lacks a localtime_r function
# -DHAVE_LOCALTIME_RZ=0 if you do not want zdump to use localtime_rz
# This defaults to 1 if a working localtime_rz seems to be available.
# localtime_rz can make zdump significantly faster, but is nonstandard.
# -DHAVE_POSIX_DECLS=0 if your system's include files do not declare
# functions like 'link' or variables like 'tzname' required by POSIX
# -DHAVE_STDINT_H=1 if you have a pre-C99 compiler with "stdint.h"
# -DHAVE_STRFTIME_L=1 if <time.h> declares locale_t and strftime_l
# This defaults to 0 if _POSIX_VERSION < 200809, 1 otherwise.
# -DHAVE_STRDUP=0 if your system lacks the strdup function
# -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"
# -DHAVE_TZSET=0 if your system lacks a tzset function
# -DHAVE_UNISTD_H=0 if your compiler lacks a "unistd.h" (Microsoft C++ 7?)
# -DEPOCH_LOCAL=1 if the 'time' function returns local time not UT
# -DEPOCH_OFFSET=N if the 'time' function returns a value N greater
# than what POSIX specifies, assuming local time is UT.
# For example, N is 252460800 on AmigaOS.
# -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
# -Dssize_t=long on ancient hosts that lack ssize_t
# -DTHREAD_SAFE=1 to make localtime.c thread-safe, as POSIX requires;
# not needed by the main-program tz code, which is single-threaded.
# Append other compiler flags as needed, e.g., -pthread on GNU/Linux.
# -Dtime_tz=\"T\" to use T as the time_t type, rather than the system time_t
# -DTZ_DOMAIN=\"foo\" to use "foo" for gettext domain name; default is "tz"
# -DTZ_DOMAINDIR=\"/path\" to use "/path" for gettext directory;
# the default is system-supplied, typically "/usr/lib/locale"
# -DTZDEFRULESTRING=\",date/time,date/time\" to default to the specified
# DST transitions if the time zone files cannot be accessed
# -DUNINIT_TRAP=1 if reading uninitialized storage can cause problems
# other than simply getting garbage data
# -DUSE_LTZ=0 to build zdump with the system time zone library
# Also set TZDOBJS=zdump.o and CHECK_TIME_T_ALTERNATIVES= below.
# -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) if you are using recent GCC and want lots of checking
GCC_DEBUG_FLAGS = -Dlint -g3 -O3 -fno-common -fstrict-aliasing \
-Wall -Wextra \
-Wbad-function-cast -Wcast-align -Wdate-time \
-Wdeclaration-after-statement \
-Wdouble-promotion \
-Wformat=2 -Winit-self -Wjump-misses-init \
-Wlogical-op -Wmissing-prototypes -Wnested-externs \
-Wold-style-definition -Woverlength-strings -Wpointer-arith \
-Wshadow -Wstrict-prototypes -Wsuggest-attribute=const \
-Wsuggest-attribute=format -Wsuggest-attribute=noreturn \
-Wsuggest-attribute=pure -Wtrampolines \
-Wunused -Wwrite-strings \
-Wno-address -Wno-format-nonliteral -Wno-sign-compare \
-Wno-type-limits -Wno-unused-parameter
#
# 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
# to the end of the "CFLAGS=" line. If not defined, the code attempts to
# guess TM_GMTOFF from other macros; define NO_TM_GMTOFF to suppress this.
# Similarly, if your system has a "zone abbreviation" field, define
# -DTM_ZONE=tm_zone
# and define NO_TM_ZONE to suppress any guessing. These two fields are not
# required by POSIX, but are widely available on GNU/Linux and BSD systems.
#
# 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 UT (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 don't want functions that were inspired by NetBSD, add
# -DNETBSD_INSPIRED=0
# to the end of the "CFLAGS=" line. Otherwise, the functions
# "localtime_rz", "mktime_z", "tzalloc", and "tzfree" are added to the
# time library, and if STD_INSPIRED is also defined the functions
# "posix2time_z" and "time2posix_z" are added as well.
# The functions ending in "_z" (or "_rz") are like their unsuffixed
# (or suffixed-by-"_r") counterparts, except with an extra first
# argument of opaque type timezone_t that specifies the time zone.
# "tzalloc" allocates a timezone_t value, and "tzfree" frees it.
#
# 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.
#
# 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=
# Linker flags. Default to $(LFLAGS) for backwards compatibility
# to release 2012h and earlier.
LDFLAGS= $(LFLAGS)
# For leap seconds, this Makefile uses LEAPSECONDS='-L leapseconds' in
# submake command lines. The default is no leap seconds.
LEAPSECONDS=
# The zic command and its arguments.
zic= ./zic
ZIC= $(zic) $(ZFLAGS)
ZFLAGS=
# How to use zic to install tz binary files.
ZIC_INSTALL= $(ZIC) -y $(YEARISTYPE) -d $(DESTDIR)$(TZDIR) $(LEAPSECONDS)
# The name of a Posix-compliant 'awk' on your system.
AWK= awk
# The full path name of a Posix-compliant shell, preferably one that supports
# the Korn shell's 'select' statement as an extension.
# These days, Bash is the most popular.
# It should be OK to set this to /bin/sh, on platforms where /bin/sh
# lacks 'select' or doesn't completely conform to Posix, but /bin/bash
# is typically nicer if it works.
KSHELL= /bin/bash
# The path where SGML DTDs are kept and the catalog file(s) to use when
# validating. The default should work on both Debian and Red Hat.
SGML_TOPDIR= /usr
SGML_DTDDIR= $(SGML_TOPDIR)/share/xml/w3c-sgml-lib/schema/dtd
SGML_SEARCH_PATH= $(SGML_DTDDIR)/REC-html401-19991224
SGML_CATALOG_FILES= \
$(SGML_TOPDIR)/share/doc/w3-recs/html/www.w3.org/TR/1999/REC-html401-19991224/HTML4.cat:$(SGML_TOPDIR)/share/sgml/html/4.01/HTML4.cat
# The name, arguments and environment of a program to validate your web pages.
# See <http://openjade.sourceforge.net/doc/> for a validator, and
# <https://validator.w3.org/source/> 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
# This expensive test requires USE_LTZ.
# To suppress it, define this macro to be empty.
CHECK_TIME_T_ALTERNATIVES = check_time_t_alternatives
# SAFE_CHAR is a regular expression that matches a safe character.
# Some parts of this distribution are limited to safe characters;
# others can use any UTF-8 character.
# For now, the safe characters are a safe subset of ASCII.
# The caller must set the shell variable 'sharp' to the character '#',
# since Makefile macros cannot contain '#'.
# TAB_CHAR is a single tab character, in single quotes.
TAB_CHAR= ' '
SAFE_CHARSET1= $(TAB_CHAR)' !\"'$$sharp'$$%&'\''()*+,./0123456789:;<=>?@'
SAFE_CHARSET2= 'ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\^_`'
SAFE_CHARSET3= 'abcdefghijklmnopqrstuvwxyz{|}~'
SAFE_CHARSET= $(SAFE_CHARSET1)$(SAFE_CHARSET2)$(SAFE_CHARSET3)
SAFE_CHAR= '[]'$(SAFE_CHARSET)'-]'
# OK_CHAR matches any character allowed in the distributed files.
# This is the same as SAFE_CHAR, except that multibyte letters are
# also allowed so that commentary can contain people's names and quote
# non-English sources. For non-letters the sources are limited to
# ASCII renderings for the convenience of maintainers whose text editors
# mishandle UTF-8 by default (e.g., XEmacs 21.4.22).
OK_CHAR= '[][:alpha:]'$(SAFE_CHARSET)'-]'
# SAFE_LINE matches a line of safe characters.
# SAFE_SHARP_LINE is similar, except any OK character can follow '#';
# this is so that comments can contain non-ASCII characters.
# OK_LINE matches a line of OK characters.
SAFE_LINE= '^'$(SAFE_CHAR)'*$$'
SAFE_SHARP_LINE='^'$(SAFE_CHAR)'*('$$sharp$(OK_CHAR)'*)?$$'
OK_LINE= '^'$(OK_CHAR)'*$$'
# Flags to give 'tar' when making a distribution.
# Try to use flags appropriate for GNU tar.
GNUTARFLAGS= --numeric-owner --owner=0 --group=0 --mode=go+u,go-w --sort=name
TARFLAGS= `if tar $(GNUTARFLAGS) --version >/dev/null 2>&1; \
then echo $(GNUTARFLAGS); \
else :; \
fi`
# Flags to give 'gzip' when making a distribution.
GZIPFLAGS= -9n
###############################################################################
#MAKE= make
cc= cc
CC= $(cc) -DTZDIR=\"$(TZDIR)\"
AR= ar
# ':' on typical hosts; 'ranlib' on the ancient hosts that still need ranlib.
RANLIB= :
TZCOBJS= zic.o
TZDOBJS= zdump.o localtime.o asctime.o
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
NEWUCBSRCS= date.c strftime.c
SOURCES= $(HEADERS) $(LIBSRCS) $(NONLIBSRCS) $(NEWUCBSRCS) \
tzselect.ksh workman.sh
MANS= newctime.3 newstrftime.3 newtzset.3 time2posix.3 \
tzfile.5 tzselect.8 zic.8 zdump.8
MANTXTS= newctime.3.txt newstrftime.3.txt newtzset.3.txt \
time2posix.3.txt \
tzfile.5.txt tzselect.8.txt zic.8.txt zdump.8.txt \
date.1.txt
COMMON= CONTRIBUTING LICENSE Makefile NEWS README Theory version
WEB_PAGES= tz-art.htm tz-how-to.html tz-link.htm
DOCS= $(MANS) date.1 $(MANTXTS) $(WEB_PAGES)
PRIMARY_YDATA= africa antarctica asia australasia \
europe northamerica southamerica
YDATA= $(PRIMARY_YDATA) pacificnew etcetera backward
NDATA= systemv factory
TDATA= $(YDATA) $(NDATA)
ZONETABLES= zone1970.tab zone.tab
TABDATA= iso3166.tab leapseconds $(ZONETABLES)
LEAP_DEPS= leapseconds.awk leap-seconds.list
DATA= $(YDATA) $(NDATA) backzone $(TABDATA) \
leap-seconds.list yearistype.sh
AWK_SCRIPTS= checklinks.awk checktab.awk leapseconds.awk
MISC= $(AWK_SCRIPTS) zoneinfo2tdf.pl
TZS_YEAR= 2050
TZS= to$(TZS_YEAR).tzs
TZS_NEW= to$(TZS_YEAR)new.tzs
TZS_DEPS= $(PRIMARY_YDATA) asctime.c localtime.c \
private.h tzfile.h zdump.c zic.c
ENCHILADA= $(COMMON) $(DOCS) $(SOURCES) $(DATA) $(MISC) $(TZS)
# Consult these files when deciding whether to rebuild the 'version' file.
# This list is not the same as the output of 'git ls-files', since
# .gitignore is not distributed.
VERSION_DEPS= \
CONTRIBUTING LICENSE Makefile NEWS README Theory \
africa antarctica asctime.c asia australasia \
backward backzone \
checklinks.awk checktab.awk \
date.1 date.c difftime.c \
etcetera europe factory iso3166.tab \
leap-seconds.list leapseconds.awk localtime.c \
newctime.3 newstrftime.3 newtzset.3 northamerica \
pacificnew private.h \
southamerica strftime.c systemv \
time2posix.3 tz-art.htm tz-how-to.html tz-link.htm \
tzfile.5 tzfile.h tzselect.8 tzselect.ksh \
workman.sh yearistype.sh \
zdump.8 zdump.c zic.8 zic.c \
zone.tab zone1970.tab zoneinfo2tdf.pl
# 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 yearistype zic zdump libtz.a $(TABDATA)
ALL: all date $(ENCHILADA)
install: all $(DATA) $(REDO) $(MANS)
mkdir -p $(DESTDIR)$(ETCDIR) $(DESTDIR)$(TZDIR) \
$(DESTDIR)$(LIBDIR) \
$(DESTDIR)$(MANDIR)/man3 $(DESTDIR)$(MANDIR)/man5 \
$(DESTDIR)$(MANDIR)/man8
$(ZIC_INSTALL) -l $(LOCALTIME) -p $(POSIXRULES)
cp -f iso3166.tab $(ZONETABLES) $(DESTDIR)$(TZDIR)/.
cp tzselect zic zdump $(DESTDIR)$(ETCDIR)/.
cp libtz.a $(DESTDIR)$(LIBDIR)/.
$(RANLIB) $(DESTDIR)$(LIBDIR)/libtz.a
cp -f newctime.3 newtzset.3 $(DESTDIR)$(MANDIR)/man3/.
cp -f tzfile.5 $(DESTDIR)$(MANDIR)/man5/.
cp -f tzselect.8 zdump.8 zic.8 $(DESTDIR)$(MANDIR)/man8/.
INSTALL: ALL install date.1
mkdir -p $(DESTDIR)$(BINDIR) $(DESTDIR)$(MANDIR)/man1
cp date $(DESTDIR)$(BINDIR)/.
cp -f date.1 $(DESTDIR)$(MANDIR)/man1/.
version: $(VERSION_DEPS)
{ (type git) >/dev/null 2>&1 && \
V=`git describe --match '[0-9][0-9][0-9][0-9][a-z]*' \
--abbrev=7 --dirty` || \
V=$(VERSION); } && \
printf '%s\n' "$$V" >$@.out
mv $@.out $@
version.h: version
VERSION=`cat version` && printf '%s\n' \
'static char const PKGVERSION[]="($(PACKAGE)) ";' \
"static char const TZVERSION[]=\"$$VERSION\";" \
'static char const REPORT_BUGS_TO[]="$(BUGEMAIL)";' \
>$@.out
mv $@.out $@
zdump: $(TZDOBJS)
$(CC) -o $@ $(CFLAGS) $(LDFLAGS) $(TZDOBJS) $(LDLIBS)
zic: $(TZCOBJS)
$(CC) -o $@ $(CFLAGS) $(LDFLAGS) $(TZCOBJS) $(LDLIBS)
yearistype: yearistype.sh
cp yearistype.sh yearistype
chmod +x yearistype
leapseconds: $(LEAP_DEPS)
$(AWK) -f leapseconds.awk leap-seconds.list >$@.out
mv $@.out $@
# Arguments to pass to submakes of install_data.
# They can be overridden by later submake arguments.
INSTALLARGS = \
DESTDIR=$(DESTDIR) \
LEAPSECONDS='$(LEAPSECONDS)' \
PACKRATDATA='$(PACKRATDATA)' \
TZDIR=$(TZDIR) \
YEARISTYPE=$(YEARISTYPE) \
ZIC='$(ZIC)'
# 'make install_data' installs one set of tz binary files.
# It can be tailored by setting LEAPSECONDS, PACKRATDATA, etc.
install_data: zic leapseconds yearistype $(PACKRATDATA) $(TDATA)
$(ZIC_INSTALL) $(TDATA)
$(AWK) '/^Rule/' $(TDATA) | $(ZIC_INSTALL) - $(PACKRATDATA)
posix_only:
$(MAKE) $(INSTALLARGS) LEAPSECONDS= install_data
right_only:
$(MAKE) $(INSTALLARGS) LEAPSECONDS='-L leapseconds' \
install_data
# 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.
right_posix: right_only
rm -fr $(DESTDIR)$(TZDIR)-leaps
ln -s $(TZDIR_BASENAME) $(DESTDIR)$(TZDIR)-leaps || \
$(MAKE) $(INSTALLARGS) TZDIR=$(TZDIR)-leaps right_only
$(MAKE) $(INSTALLARGS) TZDIR=$(TZDIR)-posix posix_only
posix_right: posix_only
rm -fr $(DESTDIR)$(TZDIR)-posix
ln -s $(TZDIR_BASENAME) $(DESTDIR)$(TZDIR)-posix || \
$(MAKE) $(INSTALLARGS) TZDIR=$(TZDIR)-posix posix_only
$(MAKE) $(INSTALLARGS) TZDIR=$(TZDIR)-leaps right_only
# This obsolescent rule is present for backwards compatibility with
# tz releases 2014g through 2015g. It should go away eventually.
posix_packrat:
$(MAKE) $(INSTALLARGS) PACKRATDATA=backzone posix_only
zones: $(REDO)
$(TZS_NEW): $(TDATA) zdump zic
mkdir -p tzs.dir
$(zic) -d tzs.dir $(TDATA)
$(AWK) '/^Link/{print $$1 "\t" $$2 "\t" $$3}' \
$(TDATA) | LC_ALL=C sort >$@.out
wd=`pwd` && \
zones=`$(AWK) -v wd="$$wd" \
'/^Zone/{print wd "/tzs.dir/" $$2}' $(TDATA) \
| LC_ALL=C sort` && \
./zdump -i -c $(TZS_YEAR) $$zones >>$@.out
sed 's,^TZ=".*tzs\.dir/,TZ=",' $@.out >$@.sed.out
rm -fr tzs.dir $@.out
mv $@.sed.out $@
# If $(TZS) does not already exist (e.g., old-format tarballs), create it.
# If it exists but 'make check_tzs' fails, a maintainer should inspect the
# failed output and fix the inconsistency, perhaps by running 'make force_tzs'.
$(TZS):
$(MAKE) force_tzs
force_tzs: $(TZS_NEW)
cp $(TZS_NEW) $(TZS)
libtz.a: $(LIBOBJS)
$(AR) ru $@ $(LIBOBJS)
$(RANLIB) $@
date: $(DATEOBJS)
$(CC) -o $@ $(CFLAGS) $(LDFLAGS) $(DATEOBJS) $(LDLIBS)
tzselect: tzselect.ksh version
VERSION=`cat version` && sed \
-e 's|#!/bin/bash|#!$(KSHELL)|g' \
-e 's|AWK=[^}]*|AWK=$(AWK)|g' \
-e 's|\(PKGVERSION\)=.*|\1='\''($(PACKAGE)) '\''|' \
-e 's|\(REPORT_BUGS_TO\)=.*|\1=$(BUGEMAIL)|' \
-e 's|TZDIR=[^}]*|TZDIR=$(TZDIR)|' \
-e 's|\(TZVERSION\)=.*|\1='"$$VERSION"'|' \
<$@.ksh >$@.out
chmod +x $@.out
mv $@.out $@
check: check_character_set check_white_space check_links check_sorted \
check_tables check_tzs check_web
check_character_set: $(ENCHILADA)
LC_ALL=en_US.utf8 && export LC_ALL && \
sharp='#' && \
! grep -Env $(SAFE_LINE) $(MANS) date.1 $(MANTXTS) \
$(MISC) $(SOURCES) $(WEB_PAGES) \
CONTRIBUTING LICENSE Makefile README version && \
! grep -Env $(SAFE_SHARP_LINE) $(TDATA) backzone \
leapseconds yearistype.sh zone.tab && \
! grep -Env $(OK_LINE) $(ENCHILADA)
check_white_space: $(ENCHILADA)
patfmt=' \t|[\f\r\v]' && pat=`printf "$$patfmt\\n"` && \
! grep -En "$$pat" $(ENCHILADA)
! grep -n '[[:space:]]$$' $(ENCHILADA)
CHECK_CC_LIST = { n = split($$1,a,/,/); for (i=2; i<=n; i++) print a[1], a[i]; }
check_sorted: backward backzone iso3166.tab zone.tab zone1970.tab
$(AWK) '/^Link/ {print $$3}' backward | LC_ALL=C sort -cu
$(AWK) '/^Zone/ {print $$2}' backzone | LC_ALL=C sort -cu
$(AWK) '/^[^#]/ {print $$1}' iso3166.tab | LC_ALL=C sort -cu
$(AWK) '/^[^#]/ {print $$1}' zone.tab | LC_ALL=C sort -c
$(AWK) '/^[^#]/ {print substr($$0, 1, 2)}' zone1970.tab | \
LC_ALL=C sort -c
$(AWK) '/^[^#]/ $(CHECK_CC_LIST)' zone1970.tab | \
LC_ALL=C sort -cu
check_links: checklinks.awk $(TDATA)
$(AWK) -f checklinks.awk $(TDATA)
check_tables: checktab.awk $(PRIMARY_YDATA) $(ZONETABLES)
for tab in $(ZONETABLES); do \
$(AWK) -f checktab.awk -v zone_table=$$tab $(PRIMARY_YDATA) \
|| exit; \
done
check_tzs: $(TZS) $(TZS_NEW)
diff -u $(TZS) $(TZS_NEW)
check_web: $(WEB_PAGES)
$(VALIDATE_ENV) $(VALIDATE) $(VALIDATE_FLAGS) $(WEB_PAGES)
clean_misc:
rm -f core *.o *.out \
date tzselect version.h zdump zic yearistype libtz.a
clean: clean_misc
rm -fr *.dir tzdb-*/ $(TZS_NEW)
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 leapseconds version $(MANTXTS) $(TZS) *.asc *.tar.*
names:
@echo $(ENCHILADA)
public: check check_public $(CHECK_TIME_T_ALTERNATIVES) \
tarballs signatures
date.1.txt: date.1
newctime.3.txt: newctime.3
newstrftime.3.txt: newstrftime.3
newtzset.3.txt: newtzset.3
time2posix.3.txt: time2posix.3
tzfile.5.txt: tzfile.5
tzselect.8.txt: tzselect.8
zdump.8.txt: zdump.8
zic.8.txt: zic.8
$(MANTXTS): workman.sh
LC_ALL=C sh workman.sh `expr $@ : '\(.*\)\.txt$$'` >$@.out
mv $@.out $@
# Set the time stamps to those of the git repository, if available,
# and if the files have not changed since then.
# This uses GNU 'touch' syntax 'touch -d@N FILE',
# where N is the number of seconds since 1970.
# If git or GNU 'touch' is absent, don't bother to sync with git timestamps.
# Also, set the timestamp of each prebuilt file like 'leapseconds'
# to be the maximum of the files it depends on.
set-timestamps.out: $(ENCHILADA)
rm -f $@
if (type git) >/dev/null 2>&1 && \
files=`git ls-files $(ENCHILADA)` && \
touch -md @1 test.out; then \
rm -f test.out && \
for file in $$files; do \
if git diff --quiet $$file; then \
time=`git log -1 --format='tformat:%ct' $$file` && \
touch -cmd @$$time $$file; \
else \
echo >&2 "$$file: warning: does not match repository"; \
fi || exit; \
done; \
fi
touch -cmr `ls -t $(LEAP_DEPS) | sed 1q` leapseconds
for file in `ls $(MANTXTS) | sed 's/\.txt$$//'`; do \
touch -cmr `ls -t $$file workman.sh | sed 1q` $$file.txt || \
exit; \
done
touch -cmr `ls -t $(TZS_DEPS) | sed 1q` $(TZS)
touch -cmr `ls -t $(VERSION_DEPS) | sed 1q` version
touch $@
# 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.
check_public:
$(MAKE) maintainer-clean
$(MAKE) "CFLAGS=$(GCC_DEBUG_FLAGS)" ALL
mkdir -p public.dir
for i in $(TDATA) ; do \
$(zic) -v -d public.dir $$i 2>&1 || exit; \
done
$(zic) -v -d public.dir $(TDATA)
rm -fr public.dir
# Check that the code works under various alternative
# implementations of time_t.
check_time_t_alternatives:
if diff -q Makefile Makefile 2>/dev/null; then \
quiet_option='-q'; \
else \
quiet_option=''; \
fi && \
wd=`pwd` && \
zones=`$(AWK) '/^[^#]/ { print $$3 }' <zone1970.tab` && \
for type in $(TIME_T_ALTERNATIVES); do \
mkdir -p time_t.dir/$$type && \
$(MAKE) clean_misc && \
$(MAKE) TOPDIR="$$wd/time_t.dir/$$type" \
CFLAGS='$(CFLAGS) -Dtime_tz='"'$$type'" \
REDO='$(REDO)' \
install && \
diff $$quiet_option -r \
time_t.dir/int64_t/etc/zoneinfo \
time_t.dir/$$type/etc/zoneinfo && \
case $$type in \
int32_t) range=-2147483648,2147483647;; \
uint32_t) range=0,4294967296;; \
int64_t) continue;; \
*u*) range=0,10000000000;; \
*) range=-10000000000,10000000000;; \
esac && \
echo checking $$type zones ... && \
time_t.dir/int64_t/etc/zdump -V -t $$range $$zones \
>time_t.dir/int64_t.out && \
time_t.dir/$$type/etc/zdump -V -t $$range $$zones \
>time_t.dir/$$type.out && \
diff -u time_t.dir/int64_t.out time_t.dir/$$type.out \
|| exit; \
done
rm -fr time_t.dir
tarballs traditional_tarballs signatures traditional_signatures: version
VERSION=`cat version` && \
$(MAKE) VERSION="$$VERSION" $@_version
tarballs_version: traditional_tarballs_version tzdb-$(VERSION).tar.lz
traditional_tarballs_version: \
tzcode$(VERSION).tar.gz tzdata$(VERSION).tar.gz
signatures_version: traditional_signatures_version tzdb-$(VERSION).tar.lz.asc
traditional_signatures_version: \
tzcode$(VERSION).tar.gz.asc tzdata$(VERSION).tar.gz.asc \
tzcode$(VERSION).tar.gz: set-timestamps.out
LC_ALL=C && export LC_ALL && \
tar $(TARFLAGS) -cf - \
$(COMMON) $(DOCS) $(SOURCES) | \
gzip $(GZIPFLAGS) >$@.out
mv $@.out $@
tzdata$(VERSION).tar.gz: set-timestamps.out
LC_ALL=C && export LC_ALL && \
tar $(TARFLAGS) -cf - $(COMMON) $(DATA) $(MISC) | \
gzip $(GZIPFLAGS) >$@.out
mv $@.out $@
tzdb-$(VERSION).tar.lz: set-timestamps.out
rm -fr tzdb-$(VERSION)
mkdir tzdb-$(VERSION)
ln $(ENCHILADA) tzdb-$(VERSION)
touch -cmr `ls -t tzdb-$(VERSION)/* | sed 1q` tzdb-$(VERSION)
LC_ALL=C && export LC_ALL && \
tar $(TARFLAGS) -cf - tzdb-$(VERSION) | lzip -9 >$@.out
mv $@.out $@
tzcode$(VERSION).tar.gz.asc: tzcode$(VERSION).tar.gz
gpg --armor --detach-sign $?
tzdata$(VERSION).tar.gz.asc: tzdata$(VERSION).tar.gz
gpg --armor --detach-sign $?
tzdb-$(VERSION).tar.lz.asc: tzdb-$(VERSION).tar.lz
gpg --armor --detach-sign $?
typecheck:
$(MAKE) clean
for i in "long long" unsigned; \
do \
$(MAKE) CFLAGS="-DTYPECHECK -D__time_t_defined -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
localtime.o: private.h tzfile.h
strftime.o: private.h tzfile.h
zdump.o: version.h
zic.o: private.h tzfile.h version.h
.KEEP_STATE:
.PHONY: ALL INSTALL all
.PHONY: check check_character_set check_links
.PHONY: check_public check_sorted check_tables
.PHONY: check_time_t_alternatives check_tzs check_web check_white_space
.PHONY: clean clean_misc force_tzs
.PHONY: install install_data maintainer-clean names
.PHONY: posix_only posix_packrat posix_right
.PHONY: public right_only right_posix signatures signatures_version
.PHONY: tarballs tarballs_version typecheck
.PHONY: zonenames zones

3782
contrib/tzdata/NEWS Normal file

File diff suppressed because it is too large Load Diff

71
contrib/tzdata/README Normal file
View File

@ -0,0 +1,71 @@
README for the tz distribution
"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 Time Zone Database (often called tz or zoneinfo) 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.
Here is a recipe for acquiring, building, installing, and testing the
tz distribution on a GNU/Linux or similar host.
To acquire the distribution, run the following shell commands:
mkdir tz
cd tz
wget --retr-symlinks 'ftp://ftp.iana.org/tz/tz*-latest.tar.gz'
gzip -dc tzcode-latest.tar.gz | tar -xf -
gzip -dc tzdata-latest.tar.gz | tar -xf -
Alternatively, the following shell commands acquire the same
distribution, with extra data useful for regression testing:
wget --retr-symlinks 'ftp://ftp.iana.org/tz/tzdb-latest.tar.lz'
lzip -dc tzdb-latest.tar.lz | 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
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 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;
fixes and enhancements are welcome. Please see the file CONTRIBUTING
for details.
Thanks to these Time Zone 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.
Thanks in particular to Arthur David Olson, the project's founder and first
maintainer, to whom the time zone community owes the greatest debt of all.
None of them are responsible for remaining errors.
Look in <ftp://ftp.iana.org/tz/releases/> for updated versions of these files.
Please send comments or information to tz@iana.org.
-----
This file is in the public domain, so clarified as of 2009-05-17 by
Arthur David Olson. The other files in this distribution are either
public domain or BSD licensed; see the file LICENSE for details.

840
contrib/tzdata/Theory Normal file
View File

@ -0,0 +1,840 @@
Theory and pragmatics of the tz code and data
----- Outline -----
Scope of the tz database
Names of time zone rules
Time zone abbreviations
Accuracy of the tz database
Time and date functions
Calendrical issues
Time and time zones on Mars
----- Scope of the tz database -----
The tz database attempts to record the history and predicted future of
all computer-based clocks that track civil time. To represent this
data, the world is partitioned into regions whose clocks all agree
about time stamps that occur after the somewhat-arbitrary cutoff point
of the POSIX Epoch (1970-01-01 00:00:00 UTC). For each such region,
the database records all known clock transitions, and labels the region
with a notable location. Although 1970 is a somewhat-arbitrary
cutoff, there are significant challenges to moving the cutoff earlier
even by a decade or two, due to the wide variety of local practices
before computer timekeeping became prevalent.
Clock transitions before 1970 are recorded for each such location,
because most systems support time stamps before 1970 and could
misbehave if data entries were omitted for pre-1970 transitions.
However, the database is not designed for and does not suffice for
applications requiring accurate handling of all past times everywhere,
as it would take far too much effort and guesswork to record all
details of pre-1970 civil timekeeping.
As described below, reference source code for using the tz database is
also available. The tz code is upwards compatible with POSIX, an
international standard for UNIX-like systems. As of this writing, the
current edition of POSIX is:
The Open Group Base Specifications Issue 7
IEEE Std 1003.1, 2013 Edition
<http://pubs.opengroup.org/onlinepubs/9699919799/>
----- Names of time zone rules -----
Each of the database's time zone rules has a unique name.
Inexperienced users are not expected to select these names unaided.
Distributors should provide documentation and/or a simple selection
interface that explains the names; for one example, see the 'tzselect'
program in the tz code. The Unicode Common Locale Data Repository
<http://cldr.unicode.org/> contains data that may be useful for other
selection interfaces.
The time zone rule naming conventions attempt to strike a balance
among the following goals:
* Uniquely identify every region where clocks have agreed since 1970.
This is essential for the intended use: static clocks keeping local
civil time.
* Indicate to experts where that region is.
* Be robust in the presence of political changes. 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.
* Use a consistent naming conventions over the entire world.
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 '/'). Do not use the file name
components '.' and '..'. 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'. Exceptions: see the discussion
of legacy names below.
A name must not be empty, or contain '//', or start or end with '/'.
Do not use names that differ only in case. Although the reference
implementation is case-sensitive, some other implementations
are not, and they would mishandle names differing only in case.
If one name A is an initial prefix of another name AB (ignoring case),
then B must not start with '/', as a regular file cannot have
the same name as a directory in POSIX. For example,
'America/New_York' precludes 'America/New_York/Bronx'.
Uninhabited regions like the North Pole and Bouvet Island
do not need locations, since local time is not defined there.
There should typically be at least one name for each ISO 3166-1
officially assigned two-letter code for an inhabited country
or territory.
If all the clocks in a 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 José 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 Greek 'Αθήνα' or the Romanized 'Athína'.
The POSIX file name restrictions encourage this rule.
Use the most populous among locations in a 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.
This means old spellings will continue to work.
The file 'zone1970.tab' lists geographical locations used to name time
zone rules. It is intended to be an exhaustive list of names for
geographic regions as described above; this is a subset of the names
in the data. Although a 'zone1970.tab' location's longitude
corresponds to its LMT offset with one hour for every 15 degrees east
longitude, this relationship is not exact.
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', and 'EET' (see the file 'europe').
Older versions of this package defined legacy names that are
incompatible with the first rule of location names, but which are
still supported. These legacy names are mostly defined in the file
'etcetera'. Also, the file 'backward' defines the legacy names
'GMT0', 'GMT-0', 'GMT+0' and 'Canada/East-Saskatchewan', and the file
'northamerica' defines the legacy names 'EST5EDT', 'CST6CDT',
'MST7MDT', and 'PST8PDT'.
Excluding 'backward' should not affect the other data. If
'backward' is excluded, excluding 'etcetera' should not affect the
remaining data.
----- 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 three or more characters that are ASCII alphanumerics or '+' or '-'.
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 lower-case letters are now allowed.
Also, POSIX from 2001 on relaxed the rule to allow '-', '+',
and alphanumeric characters from the portable character set
in the current locale. In practice ASCII alphanumerics and
'+' and '-' are safe in all locales.
In other words, in the C locale the POSIX extended regular
expression [-+[:alnum:]]{3,} should match the abbreviation.
This guarantees that all abbreviations could have been
specified by a POSIX TZ string.
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'.
Use 'LMT' for local mean time of locations before the introduction
of standard time; see "Scope of the tz database".
If there is no common English abbreviation, use numeric offsets like
-05 and +0830 that are generated by zic's %z notation.
[The remaining guidelines predate the introduction of %z.
They are problematic as they mean tz data entries invent
notation rather than record it. These guidelines are now
deprecated and the plan is to gradually move to %z for
inhabited locations and to "-00" for uninhabited locations.]
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 is identified with a single or principal zone,
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.
Otherwise, take the first three letters of an English place
name identifying each zone and append 'T', 'ST', etc.
as before; e.g. 'VLAST' for VLAdivostok Summer Time.
Use UT (with time zone abbreviation '-00') for locations while
uninhabited. The leading '-' is a flag that the time
zone is in some sense undefined; this notation is
derived from Internet RFC 3339.
Application writers should note that these abbreviations are ambiguous
in practice: e.g. 'CST' has a different meaning in China than
it does in the United States. In new applications, it's often better
to use numeric UT offsets like '-0600' instead of time zone
abbreviations like 'CST'; this avoids the ambiguity.
----- Accuracy of the tz database -----
The tz database is not authoritative, and it surely has errors.
Corrections are welcome and encouraged; see the file CONTRIBUTING.
Users requiring authoritative data should consult national standards
bodies and the references cited in the database's comments.
Errors in the tz database arise from many sources:
* The tz database predicts future time stamps, and current predictions
will be incorrect after future governments change the rules.
For example, if today someone schedules a meeting for 13:00 next
October 1, Casablanca time, and tomorrow Morocco changes its
daylight saving rules, software can mess up after the rule change
if it blithely relies on conversions made before the change.
* The pre-1970 entries in this database cover only a tiny sliver of how
clocks actually behaved; the vast majority of the necessary
information was lost or never recorded. Thousands more zones would
be needed if the tz database's scope were extended to cover even
just the known or guessed history of standard time; for example,
the current single entry for France would need to split into dozens
of entries, perhaps hundreds. And in most of the world even this
approach would be misleading due to widespread disagreement or
indifference about what times should be observed. In her 2015 book
"The Global Transformation of Time, 1870-1950", Vanessa Ogle writes
"Outside of Europe and North America there was no system of time
zones at all, often not even a stable landscape of mean times,
prior to the middle decades of the twentieth century". See:
Timothy Shenk, Booked: A Global History of Time. Dissent 2015-12-17
https://www.dissentmagazine.org/blog/booked-a-global-history-of-time-vanessa-ogle
* Most of the pre-1970 data entries come from unreliable sources, often
astrology books that lack citations and whose compilers evidently
invented entries when the true facts were unknown, without
reporting which entries were known and which were invented.
These books often contradict each other or give implausible entries,
and on the rare occasions when they are checked they are
typically found to be incorrect.
* For the UK the tz database relies on years of first-class work done by
Joseph Myers and others; see <http://www.polyomino.org.uk/british-time/>.
Other countries are not done nearly as well.
* Sometimes, different people in the same city would maintain clocks
that differed significantly. Railway time was used by railroad
companies (which did not always agree with each other),
church-clock time was used for birth certificates, etc.
Often this was merely common practice, but sometimes it was set by law.
For example, from 1891 to 1911 the UT offset in France was legally
0:09:21 outside train stations and 0:04:21 inside.
* Although a named location in the tz database stands for the
containing region, its pre-1970 data entries are often accurate for
only a small subset of that region. For example, Europe/London
stands for the United Kingdom, but its pre-1847 times are valid
only for locations that have London's exact meridian, and its 1847
transition to GMT is known to be valid only for the L&NW and the
Caledonian railways.
* The tz database does not record the earliest time for which a zone's
data entries are thereafter valid for every location in the region.
For example, Europe/London is valid for all locations in its
region after GMT was made the standard time, but the date of
standardization (1880-08-02) is not in the tz database, other than
in commentary. For many zones the earliest time of validity is
unknown.
* The tz database does not record a region's boundaries, and in many
cases the boundaries are not known. For example, the zone
America/Kentucky/Louisville represents a region around the city of
Louisville, the boundaries of which are unclear.
* Changes that are modeled as instantaneous transitions in the tz
database were often spread out over hours, days, or even decades.
* Even if the time is specified by law, locations sometimes
deliberately flout the law.
* Early timekeeping practices, even assuming perfect clocks, were
often not specified to the accuracy that the tz database requires.
* Sometimes historical timekeeping was specified more precisely
than what the tz database can handle. For example, from 1909 to
1937 Netherlands clocks were legally UT +00:19:32.13, but the tz
database cannot represent the fractional second.
* Even when all the timestamp transitions recorded by the tz database
are correct, the tz rules that generate them may not faithfully
reflect the historical rules. For example, from 1922 until World
War II the UK moved clocks forward the day following the third
Saturday in April unless that was Easter, in which case it moved
clocks forward the previous Sunday. Because the tz database has no
way to specify Easter, these exceptional years are entered as
separate tz Rule lines, even though the legal rules did not change.
* The tz database models pre-standard time using the proleptic Gregorian
calendar and local mean time (LMT), but many people used other
calendars and other timescales. For example, the Roman Empire used
the Julian calendar, and had 12 varying-length daytime hours with a
non-hour-based system at night.
* Early clocks were less reliable, and data entries do not represent
this unreliability.
* As for leap seconds, civil time was not based on atomic time before
1972, and we don't know the history of earth's rotation accurately
enough to map SI seconds to historical solar time to more than
about one-hour accuracy. See: Morrison LV, Stephenson FR.
Historical values of the Earth's clock error Delta T and the
calculation of eclipses. J Hist Astron. 2004;35:327-36
<http://adsabs.harvard.edu/full/2004JHA....35..327M>;
Historical values of the Earth's clock error. J Hist Astron. 2005;36:339
<http://adsabs.harvard.edu/full/2005JHA....36..339M>.
* The relationship between POSIX time (that is, UTC but ignoring leap
seconds) and UTC is not agreed upon after 1972. Although the POSIX
clock officially stops during an inserted leap second, at least one
proposed standard has it jumping back a second instead; and in
practice POSIX clocks more typically either progress glacially during
a leap second, or are slightly slowed while near a leap second.
* The tz database does not represent how uncertain its information is.
Ideally it would contain information about when data entries are
incomplete or dicey. Partial temporal knowledge is a field of
active research, though, and it's not clear how to apply it here.
In short, many, perhaps most, of the tz database's pre-1970 and future
time stamps are either wrong or misleading. Any attempt to pass the
tz database off as the definition of time should be unacceptable to
anybody who cares about the facts. In particular, the tz database's
LMT offsets should not be considered meaningful, and should not prompt
creation of zones merely because two locations differ in LMT or
transitioned to standard time at different dates.
----- Time and date functions -----
The tz code contains time and date functions that are upwards
compatible with those of POSIX.
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 "<UTC+10>"; this allows
"+" and "-" in the names.
offset
is of the form '[+-]hh:[mm[:ss]]' and specifies the
offset west of UT. 'hh' may be a single digit; 0<=hh<=24.
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.
This is the same format as the offset, except that a
leading '+' or '-' is not allowed.
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).
Typically, this is the only useful form;
the n and Jn forms are rarely used.
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.
* The TZ environment variable is process-global, which makes it hard
to write efficient, thread-safe applications that need access
to multiple time zones.
* 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 provides no convenient and efficient way to determine the UT
offset and time zone abbreviation of arbitrary time stamps,
particularly for time zone settings that do not fit into the
POSIX model.
* POSIX requires that systems ignore leap seconds.
* The tz code attempts to support all the time_t implementations
allowed by POSIX. The time_t type represents a nonnegative count of
seconds since 1970-01-01 00:00:00 UTC, ignoring leap seconds.
In practice, time_t is usually a signed 64- or 32-bit integer; 32-bit
signed time_t values stop working after 2038-01-19 03:14:07 UTC, so
new implementations these days typically use a signed 64-bit integer.
Unsigned 32-bit integers are used on one or two platforms,
and 36-bit and 40-bit integers are also used occasionally.
Although earlier POSIX versions allowed time_t to be a
floating-point type, this was not supported by any practical
systems, and POSIX.1-2013 and the tz code both require time_t
to be an integer type.
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).
* The code supports platforms with a UT offset member in struct tm,
e.g., tm_gmtoff.
* The code supports platforms with a time zone abbreviation member in
struct tm, e.g., tm_zone.
* 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.")
* Functions tzalloc, tzfree, localtime_rz, and mktime_z for
more-efficient thread-safe applications that need to use
multiple time zones. The tzalloc and tzfree functions
allocate and free objects of type timezone_t, and localtime_rz
and mktime_z are like localtime_r and mktime with an extra
timezone_t argument. The functions were inspired by NetBSD.
* 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.)
* Negative time_t values are supported, on systems where time_t is signed.
* These functions can account for leap seconds, thanks to Bradley White.
Points of interest to folks with other systems:
* Code compatible with this package is already part of many platforms,
including GNU/Linux, Android, the BSDs, Chromium OS, Cygwin, AIX, iOS,
BlackBery 10, macOS, Microsoft Windows, OpenVMS, and Solaris.
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 is occasionally extended,
and a platform may still be shipping an older zic.
* 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 UT.
This package takes care to do these conversions correctly.
A comment in the source code tells how to get compatibly wrong
results.
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.
----- Interface stability -----
The tz code and data supply the following interfaces:
* A set of zone names as per "Names of time zone rules" above.
* Library functions described in "Time and date functions" above.
* The programs tzselect, zdump, and zic, documented in their man pages.
* The format of zic input files, documented in the zic man page.
* The format of zic output files, documented in the tzfile man page.
* The format of zone table files, documented in zone1970.tab.
* The format of the country code file, documented in iso3166.tab.
When these interfaces are changed, an effort is made to preserve
backward compatibility. For example, tz data files typically do not
rely on recently-added zic features, so that users can run older zic
versions to process newer data files.
Interfaces not listed above are less stable. For example, users
should not rely on particular UT offsets or abbreviations for time
stamps, as data entries are often based on guesswork and these guesses
may be corrected or improved.
----- 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 Nachum Dershowitz and Edward M. Reingold,
Calendrical Calculations: Third Edition, Cambridge University Press (2008)
<http://emr.cs.iit.edu/home/reingold/calendar-book/third-edition/>.
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 and 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?
<news:1996Jul6.012937.29190@sq.com>
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: "Tideräkning och historia"
by Natanael Beckman (1924) and "Tid, en bok om tideräkning och
kalenderväsen" by Lars-Olof Lodén (1968).
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üttich)
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 Oberelsaß and Breisgau
20/31 Oct 1583 - bishopric of Basel
02/13 Nov 1583 - duchy of Jülich-Berg
02/13 Nov 1583 - electorate and city of Köln
04/15 Nov 1583 - bishopric of Würzburg
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ünster and duchy of Cleve
14/25 Dec 1583 - Steiermark
06/17 Jan 1584 - Austria and Bohemia
11/22 Jan 1584 - Lucerne, 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ück
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ürich, 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ünden
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's work schedules use Mars time. Jet Propulsion Laboratory
(JPL) coordinators have kept Mars time on and off at least since 1997
for the Mars Pathfinder mission. Some of their family members have
also adapted to Mars time. Dozens of special Mars watches were built
for JPL 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"
<http://www.giss.nasa.gov/tools/mars24/help/notes.html> (2012-08-08).
Jia-Rui Chong, "Workdays Fit for a Martian", Los Angeles Times
<http://articles.latimes.com/2004/jan/14/science/sci-marstime14>
(2004-01-14), pp A1, A20-A21.
Tom Chmielewski, "Jet Lag Is Worse on Mars", The Atlantic (2015-02-26)
<http://www.theatlantic.com/technology/archive/2015/02/jet-lag-is-worse-on-mars/386033/>
-----
This file is in the public domain, so clarified as of 2009-05-17 by
Arthur David Olson.
-----
Local Variables:
coding: utf-8
End:

View File

@ -64,13 +64,18 @@
# Background:
# http://www.timeanddate.com/news/time/antartica-time-changes-2010.html
# From Steffen Thorsen (2016-10-28):
# Australian Antarctica Division informed us that Casey changed time
# zone to UTC+11 in "the morning of 22nd October 2016".
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone Antarctica/Casey 0 - -00 1969
8:00 - +08 2009 Oct 18 2:00
11:00 - +11 2010 Mar 5 2:00
8:00 - +08 2011 Oct 28 2:00
11:00 - +11 2012 Feb 21 17:00u
8:00 - +08
8:00 - +08 2016 Oct 22
11:00 - +11
Zone Antarctica/Davis 0 - -00 1957 Jan 13
7:00 - +07 1964 Nov
0 - -00 1969 Feb

View File

@ -771,9 +771,19 @@ Zone Asia/Macau 7:34:20 - LMT 1912 Jan 1
###############################################################################
# Cyprus
#
# Milne says the Eastern Telegraph Company used 2:14:00. Stick with LMT.
# IATA SSIM (1998-09) has Cyprus using EU rules for the first time.
# From Paul Eggert (2016-09-09):
# Yesterday's Cyprus Mail reports that Northern Cyprus followed Turkey's
# lead and switched from +02/+03 to +03 year-round.
# http://cyprus-mail.com/2016/09/08/two-time-zones-cyprus-turkey-will-not-turn-clocks-back-next-month/
#
# From Even Scharning (2016-10-31):
# Looks like the time zone split in Cyprus went through last night.
# http://cyprus-mail.com/2016/10/30/cyprus-new-division-two-time-zones-now-reality/
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
Rule Cyprus 1975 only - Apr 13 0:00 1:00 S
Rule Cyprus 1975 only - Oct 12 0:00 0 -
@ -788,7 +798,10 @@ Rule Cyprus 1981 1998 - Mar lastSun 0:00 1:00 S
Zone Asia/Nicosia 2:13:28 - LMT 1921 Nov 14
2:00 Cyprus EE%sT 1998 Sep
2:00 EUAsia EE%sT
# IATA SSIM (1998-09) has Cyprus using EU rules for the first time.
Zone Asia/Famagusta 2:15:48 - LMT 1921 Nov 14
2:00 Cyprus EE%sT 1998 Sep
2:00 EUAsia EE%sT 2016 Sep 8
3:00 - +03
# Classically, Cyprus belongs to Asia; e.g. see Herodotus, Histories, I.72.
# However, for various reasons many users expect to find it under Europe.

View File

@ -702,11 +702,13 @@ Rule Tonga 1999 only - Oct 7 2:00s 1:00 S
Rule Tonga 2000 only - Mar 19 2:00s 0 -
Rule Tonga 2000 2001 - Nov Sun>=1 2:00 1:00 S
Rule Tonga 2001 2002 - Jan lastSun 2:00 0 -
Rule Tonga 2016 max - Nov Sun>=1 2:00 1:00 S
Rule Tonga 2017 max - Jan Sun>=15 3:00 0 -
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone Pacific/Tongatapu 12:19:20 - LMT 1901
12:20 - TOT 1941 # Tonga Time
13:00 - TOT 1999
13:00 Tonga TO%sT
12:20 - +1220 1941
13:00 - +13 1999
13:00 Tonga +13/+14
# Tuvalu
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
@ -1712,9 +1714,17 @@ Zone Pacific/Wallis 12:15:20 - LMT 1901
# of January the standard time in the Kingdom shall be moved backward by one
# hour to 1:00am.
# From Pulu 'Anau (2002-11-05):
# From Pulu ʻAnau (2002-11-05):
# The law was for 3 years, supposedly to get renewed. It wasn't.
# From Pulu ʻAnau (2016-10-27):
# http://mic.gov.to/news-today/press-releases/6375-daylight-saving-set-to-run-from-6-november-2016-to-15-january-2017
# Cannot find anyone who knows the rules, has seen the duration or has seen
# the cabinet decision, but it appears we are following Fiji's rule set.
#
# From Tim Parenti (2016-10-26):
# Assume Tonga will observe DST from the first Sunday in November at 02:00
# through the third Sunday in January at 03:00, like Fiji, for now.
# Wake

677
contrib/tzdata/backzone Normal file
View File

@ -0,0 +1,677 @@
# Zones that go back beyond the scope of the tz database
# This file is in the public domain.
# This file is by no means authoritative; if you think you know
# better, go ahead and edit it (and please send any changes to
# tz@iana.org for general use in the future). For more, please see
# the file CONTRIBUTING in the tz distribution.
# From Paul Eggert (2014-10-31):
# This file contains data outside the normal scope of the tz database,
# in that its zones do not differ from normal tz zones after 1970.
# Links in this file point to zones in this file, superseding links in
# the file 'backward'.
# Although zones in this file may be of some use for analyzing
# pre-1970 time stamps, they are less reliable, cover only a tiny
# sliver of the pre-1970 era, and cannot feasibly be improved to cover
# most of the era. Because the zones are out of normal scope for the
# database, less effort is put into maintaining this file. Many of
# the zones were formerly in other source files, but were removed or
# replaced by links as their data entries were questionable and/or they
# differed from other zones only in pre-1970 time stamps.
# Unless otherwise specified, the source for data through 1990 is:
# Thomas G. Shanks and Rique Pottenger, The International Atlas (6th edition),
# San Diego: ACS Publications, Inc. (2003).
# Unfortunately this book contains many errors and cites no sources.
# This file is not intended to be compiled standalone, as it
# assumes rules from other files. In the tz distribution, use
# 'make PACKRATDATA=backzone zones' to compile and install this file.
# Zones are sorted by zone name. Each zone is preceded by the
# name of the country that the zone is in, along with any other
# commentary and rules associated with the entry.
#
# As explained in the zic man page, the zone columns are:
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
# Ethiopia
# From Paul Eggert (2014-07-31):
# Like the Swahili of Kenya and Tanzania, many Ethiopians keep a
# 12-hour clock starting at our 06:00, so their "8 o'clock" is our
# 02:00 or 14:00. Keep this in mind when you ask the time in Amharic.
#
# Shanks & Pottenger write that Ethiopia had six narrowly-spaced time
# zones between 1870 and 1890, that they merged to 38E50 (2:35:20) in
# 1890, and that they switched to 3:00 on 1936-05-05. Perhaps 38E50
# was for Adis Dera. Quite likely the Shanks data entries are wrong
# anyway.
Zone Africa/Addis_Ababa 2:34:48 - LMT 1870
2:35:20 - ADMT 1936 May 5 # Adis Dera MT
3:00 - EAT
# Eritrea
Zone Africa/Asmara 2:35:32 - LMT 1870
2:35:32 - AMT 1890 # Asmara Mean Time
2:35:20 - ADMT 1936 May 5 # Adis Dera MT
3:00 - EAT
Link Africa/Asmara Africa/Asmera
# Mali (southern)
Zone Africa/Bamako -0:32:00 - LMT 1912
0:00 - GMT 1934 Feb 26
-1:00 - WAT 1960 Jun 20
0:00 - GMT
# Central African Republic
Zone Africa/Bangui 1:14:20 - LMT 1912
1:00 - WAT
# Gambia
Zone Africa/Banjul -1:06:36 - LMT 1912
-1:06:36 - BMT 1935 # Banjul Mean Time
-1:00 - WAT 1964
0:00 - GMT
# Malawi
Zone Africa/Blantyre 2:20:00 - LMT 1903 Mar
2:00 - CAT
# Republic of the Congo
Zone Africa/Brazzaville 1:01:08 - LMT 1912
1:00 - WAT
# Burundi
Zone Africa/Bujumbura 1:57:28 - LMT 1890
2:00 - CAT
# Guinea
Zone Africa/Conakry -0:54:52 - LMT 1912
0:00 - GMT 1934 Feb 26
-1:00 - WAT 1960
0:00 - GMT
# Senegal
Zone Africa/Dakar -1:09:44 - LMT 1912
-1:00 - WAT 1941 Jun
0:00 - GMT
# Tanzania
Zone Africa/Dar_es_Salaam 2:37:08 - LMT 1931
3:00 - EAT 1948
2:45 - BEAUT 1961
3:00 - EAT
# Djibouti
Zone Africa/Djibouti 2:52:36 - LMT 1911 Jul
3:00 - EAT
# Cameroon
# Whitman says they switched to 1:00 in 1920; go with Shanks & Pottenger.
Zone Africa/Douala 0:38:48 - LMT 1912
1:00 - WAT
# Sierra Leone
# From Paul Eggert (2014-08-12):
# The following table is from Shanks & Pottenger, but it can't be right.
# Whitman gives Mar 31 - Aug 31 for 1931 on.
# The International Hydrographic Bulletin, 1932-33, p 63 says that
# Sierra Leone would advance its clocks by 20 minutes on 1933-10-01.
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
Rule SL 1935 1942 - Jun 1 0:00 0:40 SLST
Rule SL 1935 1942 - Oct 1 0:00 0 WAT
Rule SL 1957 1962 - Jun 1 0:00 1:00 SLST
Rule SL 1957 1962 - Sep 1 0:00 0 GMT
Zone Africa/Freetown -0:53:00 - LMT 1882
-0:53:00 - FMT 1913 Jun # Freetown Mean Time
-1:00 SL %s 1957
0:00 SL %s
# Botswana
# From Paul Eggert (2013-02-21):
# Milne says they were regulated by the Cape Town Signal in 1899;
# assume they switched to 2:00 when Cape Town did.
Zone Africa/Gaborone 1:43:40 - LMT 1885
1:30 - SAST 1903 Mar
2:00 - CAT 1943 Sep 19 2:00
2:00 1:00 CAST 1944 Mar 19 2:00
2:00 - CAT
# Zimbabwe
Zone Africa/Harare 2:04:12 - LMT 1903 Mar
2:00 - CAT
# South Sudan
Zone Africa/Juba 2:06:24 - LMT 1931
2:00 Sudan CA%sT 2000 Jan 15 12:00
3:00 - EAT
# Uganda
Zone Africa/Kampala 2:09:40 - LMT 1928 Jul
3:00 - EAT 1930
2:30 - BEAT 1948
2:45 - BEAUT 1957
3:00 - EAT
# Rwanda
Zone Africa/Kigali 2:00:16 - LMT 1935 Jun
2:00 - CAT
# Democratic Republic of the Congo (west)
Zone Africa/Kinshasa 1:01:12 - LMT 1897 Nov 9
1:00 - WAT
# Gabon
Zone Africa/Libreville 0:37:48 - LMT 1912
1:00 - WAT
# Togo
Zone Africa/Lome 0:04:52 - LMT 1893
0:00 - GMT
# Angola
#
# Shanks gives 1911-05-26 for the transition to WAT,
# evidently confusing the date of the Portuguese decree
# http://dre.pt/pdf1sdip/1911/05/12500/23132313.pdf
# with the date that it took effect, namely 1912-01-01.
#
Zone Africa/Luanda 0:52:56 - LMT 1892
0:52:04 - AOT 1912 Jan 1 # Angola Time
1:00 - WAT
# Democratic Republic of the Congo (east)
Zone Africa/Lubumbashi 1:49:52 - LMT 1897 Nov 9
2:00 - CAT
# Zambia
Zone Africa/Lusaka 1:53:08 - LMT 1903 Mar
2:00 - CAT
# Equatorial Guinea
#
# Although Shanks says that Malabo switched from UT +00 to +01 on 1963-12-15,
# a Google Books search says that London Calling, Issues 432-465 (1948), p 19,
# says that Spanish Guinea was at +01 back then. The Shanks data entries
# are most likely wrong, but we have nothing better; use them here for now.
#
Zone Africa/Malabo 0:35:08 - LMT 1912
0:00 - GMT 1963 Dec 15
1:00 - WAT
# Lesotho
Zone Africa/Maseru 1:50:00 - LMT 1903 Mar
2:00 - SAST 1943 Sep 19 2:00
2:00 1:00 SAST 1944 Mar 19 2:00
2:00 - SAST
# Swaziland
Zone Africa/Mbabane 2:04:24 - LMT 1903 Mar
2:00 - SAST
# Somalia
Zone Africa/Mogadishu 3:01:28 - LMT 1893 Nov
3:00 - EAT 1931
2:30 - BEAT 1957
3:00 - EAT
# Niger
Zone Africa/Niamey 0:08:28 - LMT 1912
-1:00 - WAT 1934 Feb 26
0:00 - GMT 1960
1:00 - WAT
# Mauritania
Zone Africa/Nouakchott -1:03:48 - LMT 1912
0:00 - GMT 1934 Feb 26
-1:00 - WAT 1960 Nov 28
0:00 - GMT
# Burkina Faso
Zone Africa/Ouagadougou -0:06:04 - LMT 1912
0:00 - GMT
# Benin
# Whitman says they switched to 1:00 in 1946, not 1934;
# go with Shanks & Pottenger.
Zone Africa/Porto-Novo 0:10:28 - LMT 1912 Jan 1
0:00 - GMT 1934 Feb 26
1:00 - WAT
# São Tomé and Príncipe
Zone Africa/Sao_Tome 0:26:56 - LMT 1884
-0:36:32 - LMT 1912 # Lisbon Mean Time
0:00 - GMT
# Mali (northern)
Zone Africa/Timbuktu -0:12:04 - LMT 1912
0:00 - GMT
# Anguilla
Zone America/Anguilla -4:12:16 - LMT 1912 Mar 2
-4:00 - AST
# Antigua and Barbuda
Zone America/Antigua -4:07:12 - LMT 1912 Mar 2
-5:00 - EST 1951
-4:00 - AST
# Chubut, Argentina
# The name "Comodoro Rivadavia" exceeds the 14-byte POSIX limit.
Zone America/Argentina/ComodRivadavia -4:30:00 - LMT 1894 Oct 31
-4:16:48 - CMT 1920 May
-4:00 - ART 1930 Dec
-4:00 Arg AR%sT 1969 Oct 5
-3:00 Arg AR%sT 1991 Mar 3
-4:00 - WART 1991 Oct 20
-3:00 Arg AR%sT 1999 Oct 3
-4:00 Arg AR%sT 2000 Mar 3
-3:00 - ART 2004 Jun 1
-4:00 - WART 2004 Jun 20
-3:00 - ART
# Aruba
Zone America/Aruba -4:40:24 - LMT 1912 Feb 12 # Oranjestad
-4:30 - ANT 1965 # Netherlands Antilles Time
-4:00 - AST
# Cayman Is
Zone America/Cayman -5:25:32 - LMT 1890 # Georgetown
-5:07:11 - KMT 1912 Feb # Kingston Mean Time
-5:00 - EST
# Canada
Zone America/Coral_Harbour -5:32:40 - LMT 1884
-5:00 NT_YK E%sT 1946
-5:00 - EST
# Dominica
Zone America/Dominica -4:05:36 - LMT 1911 Jul 1 0:01 # Roseau
-4:00 - AST
# Baja California
# See 'northamerica' for why this entry is here rather than there.
Zone America/Ensenada -7:46:28 - LMT 1922 Jan 1 0:13:32
-8:00 - PST 1927 Jun 10 23:00
-7:00 - MST 1930 Nov 16
-8:00 - PST 1942 Apr
-7:00 - MST 1949 Jan 14
-8:00 - PST 1996
-8:00 Mexico P%sT
# Grenada
Zone America/Grenada -4:07:00 - LMT 1911 Jul # St George's
-4:00 - AST
# Guadeloupe
Zone America/Guadeloupe -4:06:08 - LMT 1911 Jun 8 # Pointe-à-Pitre
-4:00 - AST
# Canada
#
# From Paul Eggert (2015-03-24):
# Since 1970 most of Quebec has been like Toronto; see
# America/Toronto. However, earlier versions of the tz database
# mistakenly relied on data from Shanks & Pottenger saying that Quebec
# differed from Ontario after 1970, and the following rules and zone
# were created for most of Quebec from the incorrect Shanks &
# Pottenger data. The post-1970 entries have been corrected, but the
# pre-1970 entries are unchecked and probably have errors.
#
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
Rule Mont 1917 only - Mar 25 2:00 1:00 D
Rule Mont 1917 only - Apr 24 0:00 0 S
Rule Mont 1919 only - Mar 31 2:30 1:00 D
Rule Mont 1919 only - Oct 25 2:30 0 S
Rule Mont 1920 only - May 2 2:30 1:00 D
Rule Mont 1920 1922 - Oct Sun>=1 2:30 0 S
Rule Mont 1921 only - May 1 2:00 1:00 D
Rule Mont 1922 only - Apr 30 2:00 1:00 D
Rule Mont 1924 only - May 17 2:00 1:00 D
Rule Mont 1924 1926 - Sep lastSun 2:30 0 S
Rule Mont 1925 1926 - May Sun>=1 2:00 1:00 D
Rule Mont 1927 1937 - Apr lastSat 24:00 1:00 D
Rule Mont 1927 1937 - Sep lastSat 24:00 0 S
Rule Mont 1938 1940 - Apr lastSun 0:00 1:00 D
Rule Mont 1938 1939 - Sep lastSun 0:00 0 S
Rule Mont 1946 1973 - Apr lastSun 2:00 1:00 D
Rule Mont 1945 1948 - Sep lastSun 2:00 0 S
Rule Mont 1949 1950 - Oct lastSun 2:00 0 S
Rule Mont 1951 1956 - Sep lastSun 2:00 0 S
Rule Mont 1957 1973 - Oct lastSun 2:00 0 S
Zone America/Montreal -4:54:16 - LMT 1884
-5:00 Mont E%sT 1918
-5:00 Canada E%sT 1919
-5:00 Mont E%sT 1942 Feb 9 2:00s
-5:00 Canada E%sT 1946
-5:00 Mont E%sT 1974
-5:00 Canada E%sT
# Montserrat
# From Paul Eggert (2006-03-22):
# In 1995 volcanic eruptions forced evacuation of Plymouth, the capital.
# world.gazetteer.com says Cork Hill is the most populous location now.
Zone America/Montserrat -4:08:52 - LMT 1911 Jul 1 0:01 # Cork Hill
-4:00 - AST
# Argentina
# This entry was intended for the following areas, but has been superseded by
# more detailed zones.
# Santa Fe (SF), Entre Ríos (ER), Corrientes (CN), Misiones (MN), Chaco (CC),
# Formosa (FM), La Pampa (LP), Chubut (CH)
Zone America/Rosario -4:02:40 - LMT 1894 Nov
-4:16:44 - CMT 1920 May
-4:00 - ART 1930 Dec
-4:00 Arg AR%sT 1969 Oct 5
-3:00 Arg AR%sT 1991 Jul
-3:00 - ART 1999 Oct 3 0:00
-4:00 Arg AR%sT 2000 Mar 3 0:00
-3:00 - ART
# St Kitts-Nevis
Zone America/St_Kitts -4:10:52 - LMT 1912 Mar 2 # Basseterre
-4:00 - AST
# St Lucia
Zone America/St_Lucia -4:04:00 - LMT 1890 # Castries
-4:04:00 - CMT 1912 # Castries Mean Time
-4:00 - AST
# Virgin Is
Zone America/St_Thomas -4:19:44 - LMT 1911 Jul # Charlotte Amalie
-4:00 - AST
# St Vincent and the Grenadines
Zone America/St_Vincent -4:04:56 - LMT 1890 # Kingstown
-4:04:56 - KMT 1912 # Kingstown Mean Time
-4:00 - AST
# British Virgin Is
Zone America/Tortola -4:18:28 - LMT 1911 Jul # Road Town
-4:00 - AST
# McMurdo, Ross Island, since 1955-12
Zone Antarctica/McMurdo 0 - -00 1956
12:00 NZ NZ%sT
Link Antarctica/McMurdo Antarctica/South_Pole
# Yemen
# Milne says 2:59:54 was the meridian of the saluting battery at Aden,
# and that Yemen was at 1:55:56, the meridian of the Hagia Sophia.
Zone Asia/Aden 2:59:54 - LMT 1950
3:00 - AST
# Bahrain
Zone Asia/Bahrain 3:22:20 - LMT 1920 # Manamah
4:00 - GST 1972 Jun
3:00 - AST
# India
#
# From Paul Eggert (2014-09-06):
# The 1876 Report of the Secretary of the [US] Navy, p 305 says that Madras
# civil time was 5:20:57.3.
#
# From Paul Eggert (2014-08-21):
# In tomorrow's The Hindu, Nitya Menon reports that India had two civil time
# zones starting in 1884, one in Bombay and one in Calcutta, and that railways
# used a third time zone based on Madras time (80 deg. 18'30" E). Also,
# in 1881 Bombay briefly switched to Madras time, but switched back. See:
# http://www.thehindu.com/news/cities/chennai/madras-375-when-madras-clocked-the-time/article6339393.ece
#Zone Asia/Chennai [not enough info to complete]
# China
# Long-shu Time (probably due to Long and Shu being two names of that area)
# Guangxi, Guizhou, Hainan, Ningxia, Sichuan, Shaanxi, and Yunnan;
# most of Gansu; west Inner Mongolia; west Qinghai; and the Guangdong
# counties Deqing, Enping, Kaiping, Luoding, Taishan, Xinxing,
# Yangchun, Yangjiang, Yu'nan, and Yunfu.
Zone Asia/Chongqing 7:06:20 - LMT 1928 # or Chungking
7:00 - LONT 1980 May # Long-shu Time
8:00 PRC C%sT
Link Asia/Chongqing Asia/Chungking
# Vietnam
# From Paul Eggert (2014-10-13):
# See Asia/Ho_Chi_Minh for the source for this data.
# Trần's book says the 1954-55 transition to 07:00 in Hanoi was in
# October 1954, with exact date and time unspecified.
Zone Asia/Hanoi 7:03:24 - LMT 1906 Jul 1
7:06:30 - PLMT 1911 May 1
7:00 - ICT 1942 Dec 31 23:00
8:00 - IDT 1945 Mar 14 23:00
9:00 - JST 1945 Sep 2
7:00 - ICT 1947 Apr 1
8:00 - IDT 1954 Oct
7:00 - ICT
# China
# Changbai Time ("Long-white Time", Long-white = Heilongjiang area)
# Heilongjiang (except Mohe county), Jilin
Zone Asia/Harbin 8:26:44 - LMT 1928 # or Haerbin
8:30 - CHAT 1932 Mar # Changbai Time
8:00 - CST 1940
9:00 - CHAT 1966 May
8:30 - CHAT 1980 May
8:00 PRC C%sT
# far west China
Zone Asia/Kashgar 5:03:56 - LMT 1928 # or Kashi or Kaxgar
5:30 - KAST 1940 # Kashgar Time
5:00 - KAST 1980 May
8:00 PRC C%sT
# Kuwait
Zone Asia/Kuwait 3:11:56 - LMT 1950
3:00 - AST
# Oman
# Milne says 3:54:24 was the meridian of the Muscat Tidal Observatory.
Zone Asia/Muscat 3:54:24 - LMT 1920
4:00 - GST
# India
# From Paul Eggert (2014-08-11), after a heads-up from Stephen Colebourne:
# According to a Portuguese decree (1911-05-26)
# http://dre.pt/pdf1sdip/1911/05/12500/23132313.pdf
# Portuguese India switched to UT +05 on 1912-01-01.
#Zone Asia/Panaji [not enough info to complete]
# Cambodia
# From Paul Eggert (2014-10-11):
# See Asia/Ho_Chi_Minh for the source for most of this data. Also, guess
# (1) Cambodia reverted to UT +07 on 1945-09-02, when Vietnam did, and
# (2) they also reverted to +07 on 1953-11-09, the date of independence.
# These guesses are probably wrong but they're better than guessing no
# transitions there.
Zone Asia/Phnom_Penh 6:59:40 - LMT 1906 Jul 1
7:06:30 - PLMT 1911 May 1
7:00 - ICT 1942 Dec 31 23:00
8:00 - IDT 1945 Mar 14 23:00
9:00 - JST 1945 Sep 2
7:00 - ICT 1947 Apr 1
8:00 - IDT 1953 Nov 9
7:00 - ICT
# Israel
Zone Asia/Tel_Aviv 2:19:04 - LMT 1880
2:21 - JMT 1918
2:00 Zion I%sT
# Laos
# From Paul Eggert (2014-10-11):
# See Asia/Ho_Chi_Minh for the source for most of this data.
# Trần's book says that Laos reverted to UT +07 on 1955-04-15.
# Also, guess that Laos reverted to +07 on 1945-09-02, when Vietnam did;
# this is probably wrong but it's better than guessing no transition.
Zone Asia/Vientiane 6:50:24 - LMT 1906 Jul 1
7:06:30 - PLMT 1911 May 1
7:00 - ICT 1942 Dec 31 23:00
8:00 - IDT 1945 Mar 14 23:00
9:00 - JST 1945 Sep 2
7:00 - ICT 1947 Apr 1
8:00 - IDT 1955 Apr 15
7:00 - ICT
# Jan Mayen
# From Whitman:
Zone Atlantic/Jan_Mayen -1:00 - EGT
# St Helena
Zone Atlantic/St_Helena -0:22:48 - LMT 1890 # Jamestown
-0:22:48 - JMT 1951 # Jamestown Mean Time
0:00 - GMT
# Northern Ireland
Zone Europe/Belfast -0:23:40 - LMT 1880 Aug 2
-0:25:21 - DMT 1916 May 21 2:00
# DMT = Dublin/Dunsink MT
-0:25:21 1:00 IST 1916 Oct 1 2:00s
# IST = Irish Summer Time
0:00 GB-Eire %s 1968 Oct 27
1:00 - BST 1971 Oct 31 2:00u
0:00 GB-Eire %s 1996
0:00 EU GMT/BST
# Guernsey
# Data from Joseph S. Myers
# http://mm.icann.org/pipermail/tz/2013-September/019883.html
# References to be added
# LMT Location - 49.27N -2.33E - St.Peter Port
Zone Europe/Guernsey -0:09:19 - LMT 1913 Jun 18
0:00 GB-Eire %s 1940 Jul 2
1:00 C-Eur CE%sT 1945 May 8
0:00 GB-Eire %s 1968 Oct 27
1:00 - BST 1971 Oct 31 2:00u
0:00 GB-Eire %s 1996
0:00 EU GMT/BST
# Isle of Man
#
# From Lester Caine (2013-09-04):
# The Isle of Man legislation is now on-line at
# <http://www.legislation.gov.im>, starting with the original Statutory
# Time Act in 1883 and including additional confirmation of some of
# the dates of the 'Summer Time' orders originating at
# Westminster. There is a little uncertainty as to the starting date
# of the first summer time in 1916 which may have be announced a
# couple of days late. There is still a substantial number of
# documents to work through, but it is thought that every GB change
# was also implemented on the island.
#
# AT4 of 1883 - The Statutory Time et cetera Act 1883 -
# LMT Location - 54.1508N -4.4814E - Tynwald Hill ( Manx parliament )
Zone Europe/Isle_of_Man -0:17:55 - LMT 1883 Mar 30 0:00s
0:00 GB-Eire %s 1968 Oct 27
1:00 - BST 1971 Oct 31 2:00u
0:00 GB-Eire %s 1996
0:00 EU GMT/BST
# Jersey
# Data from Joseph S. Myers
# http://mm.icann.org/pipermail/tz/2013-September/019883.html
# References to be added
# LMT Location - 49.187N -2.107E - St. Helier
Zone Europe/Jersey -0:08:25 - LMT 1898 Jun 11 16:00u
0:00 GB-Eire %s 1940 Jul 2
1:00 C-Eur CE%sT 1945 May 8
0:00 GB-Eire %s 1968 Oct 27
1:00 - BST 1971 Oct 31 2:00u
0:00 GB-Eire %s 1996
0:00 EU GMT/BST
# Slovenia
Zone Europe/Ljubljana 0:58:04 - LMT 1884
1:00 - CET 1941 Apr 18 23:00
1:00 C-Eur CE%sT 1945 May 8 2:00s
1:00 1:00 CEST 1945 Sep 16 2:00s
1:00 - CET 1982 Nov 27
1:00 EU CE%sT
# Bosnia and Herzegovina
Zone Europe/Sarajevo 1:13:40 - LMT 1884
1:00 - CET 1941 Apr 18 23:00
1:00 C-Eur CE%sT 1945 May 8 2:00s
1:00 1:00 CEST 1945 Sep 16 2:00s
1:00 - CET 1982 Nov 27
1:00 EU CE%sT
# Macedonia
Zone Europe/Skopje 1:25:44 - LMT 1884
1:00 - CET 1941 Apr 18 23:00
1:00 C-Eur CE%sT 1945 May 8 2:00s
1:00 1:00 CEST 1945 Sep 16 2:00s
1:00 - CET 1982 Nov 27
1:00 EU CE%sT
# Moldova / Transnistria
Zone Europe/Tiraspol 1:58:32 - LMT 1880
1:55 - CMT 1918 Feb 15 # Chisinau MT
1:44:24 - BMT 1931 Jul 24 # Bucharest MT
2:00 Romania EE%sT 1940 Aug 15
2:00 1:00 EEST 1941 Jul 17
1:00 C-Eur CE%sT 1944 Aug 24
3:00 Russia MSK/MSD 1991 Mar 31 2:00
2:00 Russia EE%sT 1992 Jan 19 2:00
3:00 Russia MSK/MSD
# Liechtenstein
Zone Europe/Vaduz 0:38:04 - LMT 1894 Jun
1:00 - CET 1981
1:00 EU CE%sT
# Croatia
Zone Europe/Zagreb 1:03:52 - LMT 1884
1:00 - CET 1941 Apr 18 23:00
1:00 C-Eur CE%sT 1945 May 8 2:00s
1:00 1:00 CEST 1945 Sep 16 2:00s
1:00 - CET 1982 Nov 27
1:00 EU CE%sT
# Madagascar
Zone Indian/Antananarivo 3:10:04 - LMT 1911 Jul
3:00 - EAT 1954 Feb 27 23:00s
3:00 1:00 EAST 1954 May 29 23:00s
3:00 - EAT
# Comoros
Zone Indian/Comoro 2:53:04 - LMT 1911 Jul # Moroni, Gran Comoro
3:00 - EAT
# Mayotte
Zone Indian/Mayotte 3:00:56 - LMT 1911 Jul # Mamoutzou
3:00 - EAT
# US minor outlying islands
Zone Pacific/Johnston -10:00 - HST
# US minor outlying islands
#
# From Mark Brader (2005-01-23):
# [Fallacies and Fantasies of Air Transport History, by R.E.G. Davies,
# published 1994 by Paladwr Press, McLean, VA, USA; ISBN 0-9626483-5-3]
# reproduced a Pan American Airways timetable from 1936, for their weekly
# "Orient Express" flights between San Francisco and Manila, and connecting
# flights to Chicago and the US East Coast. As it uses some time zone
# designations that I've never seen before:....
# Fri. 6:30A Lv. HONOLOLU (Pearl Harbor), H.I. H.L.T. Ar. 5:30P Sun.
# " 3:00P Ar. MIDWAY ISLAND . . . . . . . . . M.L.T. Lv. 6:00A "
#
Zone Pacific/Midway -11:49:28 - LMT 1901
-11:00 - NST 1956 Jun 3
-11:00 1:00 NDT 1956 Sep 2
-11:00 - NST 1967 Apr # N=Nome
-11:00 - BST 1983 Nov 30 # B=Bering
-11:00 - SST # S=Samoa
# N Mariana Is
Zone Pacific/Saipan -14:17:00 - LMT 1844 Dec 31
9:43:00 - LMT 1901
9:00 - MPT 1969 Oct # N Mariana Is Time
10:00 - MPT 2000 Dec 23
10:00 - ChST # Chamorro Standard Time

View File

@ -0,0 +1,48 @@
# Check links in tz tables.
# Contributed by Paul Eggert. This file is in the public domain.
BEGIN {
# Special marker indicating that the name is defined as a Zone.
# It is a newline so that it cannot match a valid name.
# It is not null so that its slot does not appear unset.
Zone = "\n"
}
/^Zone/ {
if (defined[$2]) {
if (defined[$2] == Zone) {
printf "%s: Zone has duplicate definition\n", $2
} else {
printf "%s: Link with same name as Zone\n", $2
}
status = 1
}
defined[$2] = Zone
}
/^Link/ {
if (defined[$3]) {
if (defined[$3] == Zone) {
printf "%s: Link with same name as Zone\n", $3
} else if (defined[$3] == $2) {
printf "%s: Link has duplicate definition\n", $3
} else {
printf "%s: Link to both %s and %s\n", $3, defined[$3], $2
}
status = 1
}
used[$2] = 1
defined[$3] = $2
}
END {
for (tz in used) {
if (defined[tz] != Zone) {
printf "%s: Link to non-zone\n", tz
status = 1
}
}
exit status
}

177
contrib/tzdata/checktab.awk Normal file
View File

@ -0,0 +1,177 @@
# Check tz tables for consistency.
# Contributed by Paul Eggert. This file is in the public domain.
BEGIN {
FS = "\t"
if (!iso_table) iso_table = "iso3166.tab"
if (!zone_table) zone_table = "zone1970.tab"
if (!want_warnings) want_warnings = -1
while (getline <iso_table) {
iso_NR++
if ($0 ~ /^#/) continue
if (NF != 2) {
printf "%s:%d: wrong number of columns\n", \
iso_table, iso_NR >>"/dev/stderr"
status = 1
}
cc = $1
name = $2
if (cc !~ /^[A-Z][A-Z]$/) {
printf "%s:%d: invalid country code '%s'\n", \
iso_table, iso_NR, cc >>"/dev/stderr"
status = 1
}
if (cc <= cc0) {
if (cc == cc0) {
s = "duplicate";
} else {
s = "out of order";
}
printf "%s:%d: country code '%s' is %s\n", \
iso_table, iso_NR, cc, s \
>>"/dev/stderr"
status = 1
}
cc0 = cc
if (name2cc[name]) {
printf "%s:%d: '%s' and '%s' have the same name\n", \
iso_table, iso_NR, name2cc[name], cc \
>>"/dev/stderr"
status = 1
}
name2cc[name] = cc
cc2name[cc] = name
cc2NR[cc] = iso_NR
}
cc0 = ""
while (getline <zone_table) {
zone_NR++
if ($0 ~ /^#/) continue
if (NF != 3 && NF != 4) {
printf "%s:%d: wrong number of columns\n", \
zone_table, zone_NR >>"/dev/stderr"
status = 1
}
split($1, cca, /,/)
cc = cca[1]
coordinates = $2
tz = $3
comments = $4
if (cc < cc0) {
printf "%s:%d: country code '%s' is out of order\n", \
zone_table, zone_NR, cc >>"/dev/stderr"
status = 1
}
cc0 = cc
tztab[tz] = 1
tz2comments[tz] = comments
tz2NR[tz] = zone_NR
for (i in cca) {
cc = cca[i]
cctz = cc tz
cctztab[cctz] = 1
if (cc2name[cc]) {
cc_used[cc]++
} else {
printf "%s:%d: %s: unknown country code\n", \
zone_table, zone_NR, cc >>"/dev/stderr"
status = 1
}
}
if (coordinates !~ /^[-+][0-9][0-9][0-5][0-9][-+][01][0-9][0-9][0-5][0-9]$/ \
&& coordinates !~ /^[-+][0-9][0-9][0-5][0-9][0-5][0-9][-+][01][0-9][0-9][0-5][0-9][0-5][0-9]$/) {
printf "%s:%d: %s: invalid coordinates\n", \
zone_table, zone_NR, coordinates >>"/dev/stderr"
status = 1
}
}
for (cctz in cctztab) {
cc = substr (cctz, 1, 2)
tz = substr (cctz, 3)
if (1 < cc_used[cc]) {
comments_needed[tz] = cc
}
}
for (cctz in cctztab) {
cc = substr (cctz, 1, 2)
tz = substr (cctz, 3)
if (!comments_needed[tz] && tz2comments[tz]) {
printf "%s:%d: unnecessary comment '%s'\n", \
zone_table, tz2NR[tz], tz2comments[tz] \
>>"/dev/stderr"
tz2comments[tz] = 0
status = 1
} else if (comments_needed[tz] && !tz2comments[tz]) {
printf "%s:%d: missing comment for %s\n", \
zone_table, tz2NR[tz], comments_needed[tz] \
>>"/dev/stderr"
tz2comments[tz] = 1
status = 1
}
}
FS = " "
}
$1 ~ /^#/ { next }
{
tz = rules = ""
if ($1 == "Zone") {
tz = $2
ruleUsed[$4] = 1
} else if ($1 == "Link" && zone_table == "zone.tab") {
# Ignore Link commands if source and destination basenames
# are identical, e.g. Europe/Istanbul versus Asia/Istanbul.
src = $2
dst = $3
while ((i = index(src, "/"))) src = substr(src, i+1)
while ((i = index(dst, "/"))) dst = substr(dst, i+1)
if (src != dst) tz = $3
} else if ($1 == "Rule") {
ruleDefined[$2] = 1
} else {
ruleUsed[$2] = 1
}
if (tz && tz ~ /\//) {
if (!tztab[tz]) {
printf "%s: no data for '%s'\n", zone_table, tz \
>>"/dev/stderr"
status = 1
}
zoneSeen[tz] = 1
}
}
END {
for (tz in ruleDefined) {
if (!ruleUsed[tz]) {
printf "%s: Rule never used\n", tz
status = 1
}
}
for (tz in tztab) {
if (!zoneSeen[tz]) {
printf "%s:%d: no Zone table for '%s'\n", \
zone_table, tz2NR[tz], tz >>"/dev/stderr"
status = 1
}
}
if (0 < want_warnings) {
for (cc in cc2name) {
if (!cc_used[cc]) {
printf "%s:%d: warning: " \
"no Zone entries for %s (%s)\n", \
iso_table, cc2NR[cc], cc, cc2name[cc]
}
}
}
exit status
}

View File

@ -1500,73 +1500,84 @@ Zone Atlantic/Reykjavik -1:28 - LMT 1908
# But these events all occurred before the 1970 cutoff,
# so record only the time in Rome.
#
# From Paul Eggert (2006-03-22):
# For Italian DST we have three sources: Shanks & Pottenger, Whitman, and
# F. Pollastri
# Day-light Saving Time in Italy (2006-02-03)
# http://toi.iriti.cnr.it/uk/ienitlt.html
# ('FP' below), taken from an Italian National Electrotechnical Institute
# publication. When the three sources disagree, guess who's right, as follows:
# From Michael Deckers (2016-10-24):
# http://www.ac-ilsestante.it/MERIDIANE/ora_legale quotes a law of 1893-08-10
# ... [translated as] "The preceding dispositions will enter into
# force at the instant at which, according to the time specified in
# the 1st article, the 1st of November 1893 will begin...."
#
# year FP Shanks&P. (S) Whitman (W) Go with:
# 1916 06-03 06-03 24:00 06-03 00:00 FP & W
# 09-30 09-30 24:00 09-30 01:00 FP; guess 24:00s
# 1917 04-01 03-31 24:00 03-31 00:00 FP & S
# 09-30 09-29 24:00 09-30 01:00 FP & W
# 1918 03-09 03-09 24:00 03-09 00:00 FP & S
# 10-06 10-05 24:00 10-06 01:00 FP & W
# 1919 03-01 03-01 24:00 03-01 00:00 FP & S
# 10-04 10-04 24:00 10-04 01:00 FP; guess 24:00s
# 1920 03-20 03-20 24:00 03-20 00:00 FP & S
# 09-18 09-18 24:00 10-01 01:00 FP; guess 24:00s
# 1944 04-02 04-03 02:00 S (see C-Eur)
# 09-16 10-02 03:00 FP; guess 24:00s
# 1945 09-14 09-16 24:00 FP; guess 24:00s
# 1970 05-21 05-31 00:00 S
# 09-20 09-27 00:00 S
# From Pierpaolo Bernardi (2016-10-20):
# The authoritative source for time in Italy is the national metrological
# institute, which has a summary page of historical DST data at
# http://www.inrim.it/res/tf/ora_legale_i.shtml
# (2016-10-24):
# http://www.renzobaldini.it/le-ore-legali-in-italia/
# has still different data for 1944. It divides Italy in two, as
# there were effectively two governments at the time, north of Gothic
# Line German controlled territory, official government RSI, and south
# of the Gothic Line, controlled by allied armies.
#
# From Brian Inglis (2016-10-23):
# Viceregal LEGISLATIVE DECREE. 14 September 1944, no. 219.
# Restoration of Standard Time. (044U0219) (OJ 62 of 30.9.1944) ...
# Given the R. law decreed on 1944-03-29, no. 92, by which standard time is
# advanced to sixty minutes later starting at hour two on 1944-04-02; ...
# Starting at hour three on the date 1944-09-17 standard time will be resumed.
#
# From Paul Eggert (2016-10-27):
# Go with INRiM for DST rules, except as corrected by Inglis for 1944
# for the Kingdom of Italy. This is consistent with Renzo Baldini.
# Model Rome's occupation by using using C-Eur rules from 1943-09-10
# to 1944-06-04; although Rome was an open city during this period, it
# was effectively controlled by Germany.
#
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
Rule Italy 1916 only - Jun 3 0:00s 1:00 S
Rule Italy 1916 only - Oct 1 0:00s 0 -
Rule Italy 1917 only - Apr 1 0:00s 1:00 S
Rule Italy 1917 only - Sep 30 0:00s 0 -
Rule Italy 1918 only - Mar 10 0:00s 1:00 S
Rule Italy 1918 1919 - Oct Sun>=1 0:00s 0 -
Rule Italy 1919 only - Mar 2 0:00s 1:00 S
Rule Italy 1920 only - Mar 21 0:00s 1:00 S
Rule Italy 1920 only - Sep 19 0:00s 0 -
Rule Italy 1940 only - Jun 15 0:00s 1:00 S
Rule Italy 1944 only - Sep 17 0:00s 0 -
Rule Italy 1945 only - Apr 2 2:00 1:00 S
Rule Italy 1945 only - Sep 15 0:00s 0 -
Rule Italy 1946 only - Mar 17 2:00s 1:00 S
Rule Italy 1946 only - Oct 6 2:00s 0 -
Rule Italy 1947 only - Mar 16 0:00s 1:00 S
Rule Italy 1947 only - Oct 5 0:00s 0 -
Rule Italy 1948 only - Feb 29 2:00s 1:00 S
Rule Italy 1948 only - Oct 3 2:00s 0 -
Rule Italy 1966 1968 - May Sun>=22 0:00 1:00 S
Rule Italy 1966 1969 - Sep Sun>=22 0:00 0 -
Rule Italy 1969 only - Jun 1 0:00 1:00 S
Rule Italy 1970 only - May 31 0:00 1:00 S
Rule Italy 1970 only - Sep lastSun 0:00 0 -
Rule Italy 1971 1972 - May Sun>=22 0:00 1:00 S
Rule Italy 1971 only - Sep lastSun 1:00 0 -
Rule Italy 1972 only - Oct 1 0:00 0 -
Rule Italy 1973 only - Jun 3 0:00 1:00 S
Rule Italy 1973 1974 - Sep lastSun 0:00 0 -
Rule Italy 1974 only - May 26 0:00 1:00 S
Rule Italy 1975 only - Jun 1 0:00s 1:00 S
Rule Italy 1975 1977 - Sep lastSun 0:00s 0 -
Rule Italy 1976 only - May 30 0:00s 1:00 S
Rule Italy 1977 1979 - May Sun>=22 0:00s 1:00 S
Rule Italy 1978 only - Oct 1 0:00s 0 -
Rule Italy 1979 only - Sep 30 0:00s 0 -
Rule Italy 1916 only - Jun 3 24:00 1:00 S
Rule Italy 1916 1917 - Sep 30 24:00 0 -
Rule Italy 1917 only - Mar 31 24:00 1:00 S
Rule Italy 1918 only - Mar 9 24:00 1:00 S
Rule Italy 1918 only - Oct 6 24:00 0 -
Rule Italy 1919 only - Mar 1 24:00 1:00 S
Rule Italy 1919 only - Oct 4 24:00 0 -
Rule Italy 1920 only - Mar 20 24:00 1:00 S
Rule Italy 1920 only - Sep 18 24:00 0 -
Rule Italy 1940 only - Jun 14 24:00 1:00 S
Rule Italy 1942 only - Nov 2 2:00s 0 -
Rule Italy 1943 only - Mar 29 2:00s 1:00 S
Rule Italy 1943 only - Oct 4 2:00s 0 -
Rule Italy 1944 only - Apr 2 2:00s 1:00 S
Rule Italy 1944 only - Sep 17 2:00s 0 -
Rule Italy 1945 only - Apr 2 2:00 1:00 S
Rule Italy 1945 only - Sep 15 1:00 0 -
Rule Italy 1946 only - Mar 17 2:00s 1:00 S
Rule Italy 1946 only - Oct 6 2:00s 0 -
Rule Italy 1947 only - Mar 16 0:00s 1:00 S
Rule Italy 1947 only - Oct 5 0:00s 0 -
Rule Italy 1948 only - Feb 29 2:00s 1:00 S
Rule Italy 1948 only - Oct 3 2:00s 0 -
Rule Italy 1966 1968 - May Sun>=22 0:00s 1:00 S
Rule Italy 1966 only - Sep 24 24:00 0 -
Rule Italy 1967 1969 - Sep Sun>=22 0:00s 0 -
Rule Italy 1969 only - Jun 1 0:00s 1:00 S
Rule Italy 1970 only - May 31 0:00s 1:00 S
Rule Italy 1970 only - Sep lastSun 0:00s 0 -
Rule Italy 1971 1972 - May Sun>=22 0:00s 1:00 S
Rule Italy 1971 only - Sep lastSun 0:00s 0 -
Rule Italy 1972 only - Oct 1 0:00s 0 -
Rule Italy 1973 only - Jun 3 0:00s 1:00 S
Rule Italy 1973 1974 - Sep lastSun 0:00s 0 -
Rule Italy 1974 only - May 26 0:00s 1:00 S
Rule Italy 1975 only - Jun 1 0:00s 1:00 S
Rule Italy 1975 1977 - Sep lastSun 0:00s 0 -
Rule Italy 1976 only - May 30 0:00s 1:00 S
Rule Italy 1977 1979 - May Sun>=22 0:00s 1:00 S
Rule Italy 1978 only - Oct 1 0:00s 0 -
Rule Italy 1979 only - Sep 30 0:00s 0 -
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone Europe/Rome 0:49:56 - LMT 1866 Sep 22
0:49:56 - RMT 1893 Nov 1 0:00s # Rome Mean
1:00 Italy CE%sT 1942 Nov 2 2:00s
1:00 C-Eur CE%sT 1944 Jul
0:49:56 - RMT 1893 Oct 31 23:49:56 # Rome Mean
1:00 Italy CE%sT 1943 Sep 10
1:00 C-Eur CE%sT 1944 Jun 4
1:00 Italy CE%sT 1980
1:00 EU CE%sT
@ -1765,6 +1776,10 @@ Zone Europe/Luxembourg 0:24:36 - LMT 1904 Jun
# See Europe/Belgrade.
# Malta
#
# From Paul Eggert (2016-10-21):
# Assume 1900-1972 was like Rome, overriding Shanks.
#
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
Rule Malta 1973 only - Mar 31 0:00s 1:00 S
Rule Malta 1973 only - Sep 29 0:00s 0 -
@ -1775,8 +1790,6 @@ Rule Malta 1975 1980 - Sep Sun>=15 2:00 0 -
Rule Malta 1980 only - Mar 31 2:00 1:00 S
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone Europe/Malta 0:58:04 - LMT 1893 Nov 2 0:00s # Valletta
1:00 Italy CE%sT 1942 Nov 2 2:00s
1:00 C-Eur CE%sT 1945 Apr 2 2:00s
1:00 Italy CE%sT 1973 Mar 31
1:00 Malta CE%sT 1981
1:00 EU CE%sT
@ -1908,7 +1921,7 @@ Zone Europe/Monaco 0:29:32 - LMT 1891 Mar 15
# Amsterdam mean time.
# The data entries before 1945 are taken from
# http://www.staff.science.uu.nl/~gent0113/idl/idl.htm
# http://www.staff.science.uu.nl/~gent0113/wettijd/wettijd.htm
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
Rule Neth 1916 only - May 1 0:00 1:00 NST # Netherlands Summer Time

View File

@ -0,0 +1,76 @@
# Generate the 'leapseconds' file from 'leap-seconds.list'.
# This file is in the public domain.
BEGIN {
print "# Allowance for leap seconds added to each time zone file."
print ""
print "# This file is in the public domain."
print ""
print "# This file is generated automatically from the data in the public-domain"
print "# leap-seconds.list file available from most NIST time servers."
print "# If the URL <ftp://time.nist.gov/pub/leap-seconds.list> does not work,"
print "# you should be able to pick up leap-seconds.list from a secondary NIST server."
print "# See <http://tf.nist.gov/tf-cgi/servers.cgi> for a list of secondary servers."
print "# For more about leap-seconds.list, please see"
print "# The NTP Timescale and Leap Seconds"
print "# http://www.eecis.udel.edu/~mills/leap.html"
print ""
print "# The International Earth Rotation and Reference Systems Service"
print "# periodically uses leap seconds to keep UTC to within 0.9 s of UT1"
print "# (which measures the true angular orientation of the earth in space); see"
print "# Terry J Quinn, The BIPM and the accurate measure of time,"
print "# Proc IEEE 79, 7 (July 1991), 894-905 <http://dx.doi.org/10.1109/5.84965>."
print "# There were no leap seconds before 1972, because the official mechanism"
print "# accounting for the discrepancy between atomic time and the earth's rotation"
print "# did not exist until the early 1970s."
print ""
print "# The correction (+ or -) is made at the given time, so lines"
print "# will typically look like:"
print "# Leap YEAR MON DAY 23:59:60 + R/S"
print "# or"
print "# Leap YEAR MON DAY 23:59:59 - R/S"
print ""
print "# If the leapsecond is Rolling (R) the given time is local time."
print "# If the leapsecond is Stationary (S) the given time is UTC."
print ""
print "# Leap YEAR MONTH DAY HH:MM:SS CORR R/S"
}
/^ *$/ { next }
/^#\tUpdated through/ || /^#\tFile expires on:/ {
last_lines = last_lines $0 "\n"
}
/^#/ { next }
{
NTP_timestamp = $1
TAI_minus_UTC = $2
hash_mark = $3
one = $4
month = $5
year = $6
if (old_TAI_minus_UTC) {
if (old_TAI_minus_UTC < TAI_minus_UTC) {
sign = "23:59:60\t+"
} else {
sign = "23:59:59\t-"
}
if (month == "Jan") {
year--;
month = "Dec";
day = 31
} else if (month == "Jul") {
month = "Jun";
day = 30
}
printf "Leap\t%s\t%s\t%s\t%s\tS\n", year, month, day, sign
}
old_TAI_minus_UTC = TAI_minus_UTC
}
END {
printf "\n%s", last_lines
}

1
contrib/tzdata/version Normal file
View File

@ -0,0 +1 @@
2016i

View File

@ -152,7 +152,8 @@ CU +2308-08222 America/Havana
CV +1455-02331 Atlantic/Cape_Verde
CW +1211-06900 America/Curacao
CX -1025+10543 Indian/Christmas
CY +3510+03322 Asia/Nicosia
CY +3510+03322 Asia/Nicosia Cyprus (most areas)
CY +3507+03357 Asia/Famagusta Northern Cyprus
CZ +5005+01426 Europe/Prague
DE +5230+01322 Europe/Berlin Germany (most areas)
DE +4742+00841 Europe/Busingen Busingen

View File

@ -145,7 +145,8 @@ CU +2308-08222 America/Havana
CV +1455-02331 Atlantic/Cape_Verde
CW,AW,BQ,SX +1211-06900 America/Curacao
CX -1025+10543 Indian/Christmas
CY +3510+03322 Asia/Nicosia
CY +3510+03322 Asia/Nicosia Cyprus (most areas)
CY +3507+03357 Asia/Famagusta Northern Cyprus
CZ,SK +5005+01426 Europe/Prague
DE +5230+01322 Europe/Berlin Germany (most areas)
DK +5540+01235 Europe/Copenhagen

52
contrib/tzdata/zoneinfo2tdf.pl Executable file
View File

@ -0,0 +1,52 @@
#! /usr/bin/perl -w
# Courtesy Ken Pizzini.
use strict;
#This file released to the public domain.
# Note: error checking is poor; trust the output only if the input
# has been checked by zic.
my $contZone = '';
while (<>) {
my $origline = $_;
my @fields = ();
while (s/^\s*((?:"[^"]*"|[^\s#])+)//) {
push @fields, $1;
}
next unless @fields;
my $type = lc($fields[0]);
if ($contZone) {
@fields >= 3 or warn "bad continuation line";
unshift @fields, '+', $contZone;
$type = 'zone';
}
$contZone = '';
if ($type eq 'zone') {
# Zone NAME GMTOFF RULES/SAVE FORMAT [UNTIL]
my $nfields = @fields;
$nfields >= 5 or warn "bad zone line";
if ($nfields > 6) {
#this splice is optional, depending on one's preference
#(one big date-time field, or componentized date and time):
splice(@fields, 5, $nfields-5, "@fields[5..$nfields-1]");
}
$contZone = $fields[1] if @fields > 5;
} elsif ($type eq 'rule') {
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
@fields == 10 or warn "bad rule line";
} elsif ($type eq 'link') {
# Link TARGET LINK-NAME
@fields == 3 or warn "bad link line";
} elsif ($type eq 'leap') {
# Leap YEAR MONTH DAY HH:MM:SS CORR R/S
@fields == 7 or warn "bad leap line";
} else {
warn "Fubar at input line $.: $origline";
}
print join("\t", @fields), "\n";
}