diff options
author | Stuart Bishop <stuart.bishop@canonical.com> | 2016-07-13 14:26:03 +0700 |
---|---|---|
committer | Stuart Bishop <stuart.bishop@canonical.com> | 2016-07-13 14:26:03 +0700 |
commit | 24e005edb7d777d0e8db25d483b64d4319a6e704 (patch) | |
tree | d7a58a20faa0e064e5f5e56647e17f2995fd11f7 | |
parent | cdac105114c130444a83e918a55a66ddb2a62f6c (diff) | |
parent | 6456b51f5d8399eb90c4d80422270347e29b7d3f (diff) | |
download | pytz-git-24e005edb7d777d0e8db25d483b64d4319a6e704.tar.gz |
Merge commit '6456b51f5d8399eb90c4d80422270347e29b7d3f' as 'tz'
-rw-r--r-- | tz/.gitignore | 16 | ||||
-rw-r--r-- | tz/CONTRIBUTING | 73 | ||||
-rw-r--r-- | tz/LICENSE | 4 | ||||
-rw-r--r-- | tz/Makefile | 695 | ||||
-rw-r--r-- | tz/NEWS | 3541 | ||||
-rw-r--r-- | tz/README | 63 | ||||
-rw-r--r-- | tz/Theory | 796 | ||||
-rw-r--r-- | tz/africa | 1188 | ||||
-rw-r--r-- | tz/antarctica | 337 | ||||
-rw-r--r-- | tz/asctime.c | 128 | ||||
-rw-r--r-- | tz/asia | 3066 | ||||
-rw-r--r-- | tz/australasia | 1773 | ||||
-rw-r--r-- | tz/backward | 124 | ||||
-rw-r--r-- | tz/backzone | 677 | ||||
-rw-r--r-- | tz/checklinks.awk | 48 | ||||
-rw-r--r-- | tz/checktab.awk | 177 | ||||
-rw-r--r-- | tz/date.1 | 164 | ||||
-rw-r--r-- | tz/date.c | 238 | ||||
-rw-r--r-- | tz/difftime.c | 58 | ||||
-rw-r--r-- | tz/etcetera | 80 | ||||
-rw-r--r-- | tz/europe | 3734 | ||||
-rw-r--r-- | tz/factory | 9 | ||||
-rw-r--r-- | tz/iso3166.tab | 274 | ||||
-rw-r--r-- | tz/leap-seconds.list | 249 | ||||
-rw-r--r-- | tz/leapseconds.awk | 76 | ||||
-rw-r--r-- | tz/localtime.c | 2271 | ||||
-rw-r--r-- | tz/newctime.3 | 306 | ||||
-rw-r--r-- | tz/newstrftime.3 | 226 | ||||
-rw-r--r-- | tz/newtzset.3 | 326 | ||||
-rw-r--r-- | tz/northamerica | 3306 | ||||
-rw-r--r-- | tz/pacificnew | 27 | ||||
-rw-r--r-- | tz/private.h | 585 | ||||
-rw-r--r-- | tz/southamerica | 1779 | ||||
-rw-r--r-- | tz/strftime.c | 626 | ||||
-rw-r--r-- | tz/systemv | 37 | ||||
-rw-r--r-- | tz/time2posix.3 | 129 | ||||
-rw-r--r-- | tz/tz-art.htm | 574 | ||||
-rw-r--r-- | tz/tz-how-to.html | 680 | ||||
-rw-r--r-- | tz/tz-link.htm | 847 | ||||
-rw-r--r-- | tz/tzfile.5 | 155 | ||||
-rw-r--r-- | tz/tzfile.h | 169 | ||||
-rw-r--r-- | tz/tzselect.8 | 113 | ||||
-rw-r--r-- | tz/tzselect.ksh | 559 | ||||
-rw-r--r-- | tz/workman.sh | 32 | ||||
-rw-r--r-- | tz/yearistype.sh | 38 | ||||
-rw-r--r-- | tz/zdump.8 | 92 | ||||
-rw-r--r-- | tz/zdump.c | 1014 | ||||
-rw-r--r-- | tz/zic.8 | 568 | ||||
-rw-r--r-- | tz/zic.c | 3064 | ||||
-rw-r--r-- | tz/zone.tab | 445 | ||||
-rw-r--r-- | tz/zone1970.tab | 376 | ||||
-rwxr-xr-x | tz/zoneinfo2tdf.pl | 52 |
52 files changed, 35984 insertions, 0 deletions
diff --git a/tz/.gitignore b/tz/.gitignore new file mode 100644 index 0000000..91098d5 --- /dev/null +++ b/tz/.gitignore @@ -0,0 +1,16 @@ +# Files intentionally not tracked by Git. +# This file is in the public domain. +*.a +*.asc +*.o +*.tar.gz +*.txt +*~ +ChangeLog +date +leapseconds +tzselect +version.h +yearistype +zdump +zic diff --git a/tz/CONTRIBUTING b/tz/CONTRIBUTING new file mode 100644 index 0000000..e40102e --- /dev/null +++ b/tz/CONTRIBUTING @@ -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. diff --git a/tz/LICENSE b/tz/LICENSE new file mode 100644 index 0000000..a9b60d8 --- /dev/null +++ b/tz/LICENSE @@ -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 tzcode's +date.c, newstrftime.3, and strftime.c, which contain material derived +from BSD and which use the BSD 3-clause license. diff --git a/tz/Makefile b/tz/Makefile new file mode 100644 index 0000000..bbe1ba8 --- /dev/null +++ b/tz/Makefile @@ -0,0 +1,695 @@ +# 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 numbers of the code and data distributions. +VERSION= 2016f + +# 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. +# Add -lintl if you want to use 'gettext' on Solaris. +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 (GNU, Linux, Solaris); also see LDLIBS +# -DHAVE_INCOMPATIBLE_CTIME_R=1 if your system's time.h declares +# ctime_r and asctime_r incompatibly with the POSIX standard (Solaris 8). +# -DHAVE_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?) +# -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 tzcode2012h 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 tzdata 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 is appropriate for Ubuntu 13.10. +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 + +# The name, arguments and environment of a program to validate your web pages. +# See <http://www.jclark.com/sp/> for a validator, and +# <http://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 +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 +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 +ENCHILADA= $(COMMON) $(DOCS) $(SOURCES) $(DATA) $(MISC) + +# And for the benefit of csh users on systems that assume the user +# shell should be used to handle commands in Makefiles. . . + +SHELL= /bin/sh + +all: tzselect 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.h: + (echo 'static char const PKGVERSION[]="($(PACKAGE)) ";' && \ + echo 'static char const TZVERSION[]="$(VERSION)";' && \ + echo 'static char const REPORT_BUGS_TO[]="$(BUGEMAIL)";') >$@ + +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 >$@ + +# 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) + +libtz.a: $(LIBOBJS) + $(AR) ru $@ $(LIBOBJS) + $(RANLIB) $@ + +date: $(DATEOBJS) + $(CC) -o $@ $(CFLAGS) $(LDFLAGS) $(DATEOBJS) $(LDLIBS) + +tzselect: tzselect.ksh + 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)|' \ + <$? >$@ + chmod +x $@ + +check: check_character_set check_white_space check_links check_sorted \ + check_tables check_web + +check_character_set: $(ENCHILADA) + LC_ALL=en_US.utf8 && export LC_ALL && \ + sharp='#' && \ + ! grep -Env $(SAFE_LINE) Makefile $(MANS) date.1 $(MANTXTS) \ + $(MISC) $(SOURCES) $(WEB_PAGES) && \ + ! grep -Env $(SAFE_SHARP_LINE) $(TDATA) backzone \ + leapseconds yearistype.sh zone.tab && \ + ! grep -Env $(OK_LINE) $(ENCHILADA) + +check_white_space: $(ENCHILADA) + ! grep -En ' '$(TAB_CHAR)"|$$(printf '[\f\r\v]')" $(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_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 tzpublic + +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 $(MANTXTS) *.asc *.tar.gz + +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$$'` >$@ + +# 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 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 $@ + +# 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 tzpublic + for i in $(TDATA) ; do \ + $(zic) -v -d tzpublic $$i 2>&1 || exit; \ + done + $(zic) -v -d tzpublic $(TDATA) + rm -fr tzpublic + +# 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 && \ + zones=`$(AWK) '/^[^#]/ { print $$3 }' <zone1970.tab` && \ + for type in $(TIME_T_ALTERNATIVES); do \ + mkdir -p tzpublic/$$type && \ + $(MAKE) clean_misc && \ + $(MAKE) TOPDIR=`pwd`/tzpublic/$$type \ + CFLAGS='$(CFLAGS) -Dtime_tz='"'$$type'" \ + REDO='$(REDO)' \ + install && \ + diff $$quiet_option -r \ + tzpublic/int64_t/etc/zoneinfo \ + tzpublic/$$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 ... && \ + tzpublic/int64_t/etc/zdump -V -t $$range $$zones \ + >tzpublic/int64_t.out && \ + tzpublic/$$type/etc/zdump -V -t $$range $$zones \ + >tzpublic/$$type.out && \ + diff -u tzpublic/int64_t.out tzpublic/$$type.out \ + || exit; \ + done + rm -fr tzpublic + +tarballs: tzcode$(VERSION).tar.gz tzdata$(VERSION).tar.gz + +tzcode$(VERSION).tar.gz: set-timestamps.out + LC_ALL=C && export LC_ALL && \ + tar $(TARFLAGS) -cf - \ + $(COMMON) $(DOCS) $(SOURCES) | \ + gzip $(GZIPFLAGS) > $@ + +tzdata$(VERSION).tar.gz: set-timestamps.out + LC_ALL=C && export LC_ALL && \ + tar $(TARFLAGS) -cf - $(COMMON) $(DATA) $(MISC) | \ + gzip $(GZIPFLAGS) > $@ + +signatures: tzcode$(VERSION).tar.gz.asc tzdata$(VERSION).tar.gz.asc + +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 $? + +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_web check_white_space clean clean_misc +.PHONY: install install_data maintainer-clean names +.PHONY: posix_only posix_packrat posix_right +.PHONY: public right_only right_posix signatures tarballs typecheck +.PHONY: zonenames zones @@ -0,0 +1,3541 @@ +News for the tz database + +Release 2016f - 2016-07-05 16:26:51 +0200 + + Changes affecting future time stamps + + The Egyptian government changed its mind on short notice, and + Africa/Cairo will not introduce DST starting 2016-07-07 after all. + (Thanks to Mina Samuel.) + + Asia/Novosibirsk switches from +06 to +07 on 2016-07-24 at 02:00. + (Thanks to Stepan Golosunov.) + + Changes to past and future time stamps + + Asia/Novokuznetsk and Asia/Novosibirsk now use numeric time zone + abbreviations instead of invented ones. + + Changes affecting past time stamps + + Europe/Minsk's 1992-03-29 spring-forward transition was at 02:00 not 00:00. + (Thanks to Stepan Golosunov.) + + +Release 2016e - 2016-06-14 08:46:16 -0700 + + Changes affecting future time stamps + + Africa/Cairo observes DST in 2016 from July 7 to the end of October. + Guess October 27 and 24:00 transitions. (Thanks to Steffen Thorsen.) + For future years, guess April's last Thursday to October's last + Thursday except for Ramadan. + + Changes affecting past time stamps + + Locations while uninhabited now use '-00', not 'zzz', as a + placeholder time zone abbreviation. This is inspired by Internet + RFC 3339 and is more consistent with numeric time zone + abbreviations already used elsewhere. The change affects several + arctic and antarctic locations, e.g., America/Cambridge_Bay before + 1920 and Antarctica/Troll before 2005. + + Asia/Baku's 1992-09-27 transition from +04 (DST) to +04 (non-DST) was + at 03:00, not 23:00 the previous day. (Thanks to Michael Deckers.) + + Changes to code + + zic now outputs a dummy transition at time 2**31 - 1 in zones + whose POSIX-style TZ strings contain a '<'. This mostly works + around Qt bug 53071 <https://bugreports.qt.io/browse/QTBUG-53071>. + (Thanks to Zhanibek Adilbekov for reporting the Qt bug.) + + Changes affecting documentation and commentary + + tz-link.htm says why governments should give plenty of notice for + time zone or DST changes, and refers to Matt Johnson's blog post. + + tz-link.htm mentions Tzdata for Elixir. (Thanks to Matt Johnson.) + + +Release 2016d - 2016-04-17 22:50:29 -0700 + + Changes affecting future time stamps + + America/Caracas switches from -0430 to -04 on 2016-05-01 at 02:30. + (Thanks to Alexander Krivenyshev for the heads-up.) + + Asia/Magadan switches from +10 to +11 on 2016-04-24 at 02:00. + (Thanks to Alexander Krivenyshev and Matt Johnson.) + + New zone Asia/Tomsk, split off from Asia/Novosibirsk. It covers + Tomsk Oblast, Russia, which switches from +06 to +07 on 2016-05-29 + at 02:00. (Thanks to Stepan Golosunov.) + + Changes affecting past time stamps + + New zone Europe/Kirov, split off from Europe/Volgograd. It covers + Kirov Oblast, Russia, which switched from +04/+05 to +03/+04 on + 1989-03-26 at 02:00, roughly a year after Europe/Volgograd made + the same change. (Thanks to Stepan Golosunov.) + + Russia and nearby locations had daylight-saving transitions on + 1992-03-29 at 02:00 and 1992-09-27 at 03:00, instead of on + 1992-03-28 at 23:00 and 1992-09-26 at 23:00. (Thanks to Stepan + Golosunov.) + + Many corrections to historical time in Kazakhstan from 1991 + through 2005. (Thanks to Stepan Golosunov.) Replace Kazakhstan's + invented time zone abbreviations with numeric abbreviations. + + Changes to commentary + + Mention Internet RFCs 7808 (TZDIST) and 7809 (CalDAV time zone references). + + +Release 2016c - 2016-03-23 00:51:27 -0700 + + Changes affecting future time stamps + + Azerbaijan no longer observes DST. (Thanks to Steffen Thorsen.) + + Chile reverts from permanent to seasonal DST. (Thanks to Juan + Correa for the heads-up, and to Tim Parenti for corrections.) + Guess that future transitions are August's and May's second + Saturdays at 24:00 mainland time. Also, call the period from + 2014-09-07 through 2016-05-14 daylight saving time instead of + standard time, as that seems more appropriate now. + + Changes affecting past time stamps + + Europe/Kaliningrad and Europe/Vilnius changed from +03/+04 to + +02/+03 on 1989-03-26, not 1991-03-31. Europe/Volgograd changed + from +04/+05 to +03/+04 on 1988-03-27, not 1989-03-26. + (Thanks to Stepan Golosunov.) + + Changes to commentary + + Several updates and URLs for historical and proposed Russian changes. + (Thanks to Stepan Golosunov, Matt Johnson, and Alexander Krivenyshev.) + + +Release 2016b - 2016-03-12 17:30:14 -0800 + + Compatibility note + + Starting with release 2016b, some data entries cause zic implementations + derived from tz releases 2005j through 2015e to issue warnings like + "time zone abbreviation differs from POSIX standard (+03)". + These warnings should not otherwise affect zic's output and can safely be + ignored on today's platforms, as the warnings refer to a restriction in + POSIX.1-1988 that was removed in POSIX.1-2001. One way to suppress the + warnings is to upgrade to zic derived from tz releases 2015f and later. + + Changes affecting future time stamps + + New zones Europe/Astrakhan and Europe/Ulyanovsk for Astrakhan and + Ulyanovsk Oblasts, Russia, both of which will switch from +03 to +04 on + 2016-03-27 at 02:00 local time. They need distinct zones since their + post-1970 histories disagree. New zone Asia/Barnaul for Altai Krai and + Altai Republic, Russia, which will switch from +06 to +07 on the same date + and local time. The Astrakhan change is already official; the others have + passed the first reading in the State Duma and are extremely likely. + Also, Asia/Sakhalin moves from +10 to +11 on 2016-03-27 at 02:00. + (Thanks to Alexander Krivenyshev for the heads-up, and to Matt Johnson + and Stepan Golosunov for followup.) + + As a trial of a new system that needs less information to be made up, + the new zones use numeric time zone abbreviations like "+04" + instead of invented abbreviations like "ASTT". + + Haiti will not observe DST in 2016. (Thanks to Jean Antoine via + Steffen Thorsen.) + + Palestine's spring-forward transition on 2016-03-26 is at 01:00, not 00:00. + (Thanks to Hannah Kreitem.) Guess future transitions will be March's last + Saturday at 01:00, not March's last Friday at 24:00. + + Changes affecting past time stamps + + Europe/Chisinau observed DST during 1990, and switched from +04 to + +03 at 1990-05-06 02:00, instead of switching from +03 to +02. + (Thanks to Stepan Golosunov.) + + 1991 abbreviations in Europe/Samara should be SAMT/SAMST, not + KUYT/KUYST. (Thanks to Stepan Golosunov.) + + Changes to code + + tzselect's diagnostics and checking, and checktab.awk's checking, + have been improved. (Thanks to J William Piggott.) + + tzcode now builds under MinGW. (Thanks to Ian Abbott and Esben Haabendal.) + + tzselect now tests Julian-date TZ settings more accurately. + (Thanks to J William Piggott.) + + Changes to commentary + + Comments in zone tables have been improved. (Thanks to J William Piggott.) + + tzselect again limits its menu comments so that menus fit on a + 24x80 alphanumeric display. + + A new web page tz-how-to.html. (Thanks to Bill Seymour.) + + In the Theory file, the description of possible time zone abbreviations in + tzdata has been cleaned up, as the old description was unclear and + inconsistent. (Thanks to Alain Mouette for reporting the problem.) + + +Release 2016a - 2016-01-26 23:28:02 -0800 + + Changes affecting future time stamps + + America/Cayman will not observe daylight saving this year after all. + Revert our guess that it would. (Thanks to Matt Johnson.) + + Asia/Chita switches from +0800 to +0900 on 2016-03-27 at 02:00. + (Thanks to Alexander Krivenyshev.) + + Asia/Tehran now has DST predictions for the year 2038 and later, + to be March 21 00:00 to September 21 00:00. This is likely better + than predicting no DST, albeit off by a day every now and then. + + Changes affecting past and future time stamps + + America/Metlakatla switched from PST all year to AKST/AKDT on + 2015-11-01 at 02:00. (Thanks to Steffen Thorsen.) + + America/Santa_Isabel has been removed, and replaced with a + backward compatibility link to America/Tijuana. Its contents were + apparently based on a misreading of Mexican legislation. + + Changes affecting past time stamps + + Asia/Karachi's two transition times in 2002 were off by a minute. + (Thanks to Matt Johnson.) + + Changes affecting build procedure + + An installer can now combine leap seconds with use of the backzone file, + e.g., with 'make PACKRATDATA=backzone REDO=posix_right zones'. + The old 'make posix_packrat' rule is now marked as obsolescent. + (Thanks to Ian Abbott for an initial implementation.) + + Changes affecting documentation and commentary + + A new file LICENSE makes it easier to see that the code and data + are mostly public-domain. (Thanks to James Knight.) The three + non-public-domain files now use the current (3-clause) BSD license + instead of older versions of that license. + + tz-link.htm mentions the BDE library (thanks to Andrew Paprocki), + CCTZ (thanks to Tim Parenti), TimeJones.com, and has a new section + on editing tz source files (with a mention of Sublime zoneinfo, + thanks to Gilmore Davidson). + + The Theory and asia files now mention the 2015 book "The Global + Transformation of Time, 1870-1950", and cite a couple of reviews. + + The America/Chicago entry now documents the informal use of US + central time in Fort Pierre, South Dakota. (Thanks to Rick + McDermid, Matt Johnson, and Steve Jones.) + + +Release 2015g - 2015-10-01 00:39:51 -0700 + + Changes affecting future time stamps + + Turkey's 2015 fall-back transition is scheduled for Nov. 8, not Oct. 25. + (Thanks to Fatih.) + + Norfolk moves from +1130 to +1100 on 2015-10-04 at 02:00 local time. + (Thanks to Alexander Krivenyshev.) + + Fiji's 2016 fall-back transition is scheduled for January 17, not 24. + (Thanks to Ken Rylander.) + + Fort Nelson, British Columbia will not fall back on 2015-11-01. It has + effectively been on MST (-0700) since it advanced its clocks on 2015-03-08. + New zone America/Fort_Nelson. (Thanks to Matt Johnson.) + + Changes affecting past time stamps + + Norfolk observed DST from 1974-10-27 02:00 to 1975-03-02 02:00. + + Changes affecting code + + localtime no longer mishandles America/Anchorage after 2037. + (Thanks to Bradley White for reporting the bug.) + + On hosts with signed 32-bit time_t, localtime no longer mishandles + Pacific/Fiji after 2038-01-16 14:00 UTC. + + The localtime module allows the variables 'timezone', 'daylight', + and 'altzone' to be in common storage shared with other modules, + and declares them in case the system <time.h> does not. + (Problems reported by Kees Dekker.) + + On platforms with tm_zone, strftime.c now assumes it is not NULL. + This simplifies the code and is consistent with zdump.c. + (Problem reported by Christos Zoulas.) + + Changes affecting documentation + + The tzfile man page now documents that transition times denote the + starts (not the ends) of the corresponding time periods. + (Ambiguity reported by Bill Seymour.) + + +Release 2015f - 2015-08-10 18:06:56 -0700 + + Changes affecting future time stamps + + North Korea switches to +0830 on 2015-08-15. (Thanks to Steffen Thorsen.) + The abbreviation remains "KST". (Thanks to Robert Elz.) + + Uruguay no longer observes DST. (Thanks to Steffen Thorsen + and Pablo Camargo.) + + Changes affecting past and future time stamps + + Moldova starts and ends DST at 00:00 UTC, not at 01:00 UTC. + (Thanks to Roman Tudos.) + + Changes affecting data format and code + + zic's '-y YEARISTYPE' option is no longer documented. The TYPE + field of a Rule line should now be '-'; the old values 'even', + 'odd', 'uspres', 'nonpres', 'nonuspres' were already undocumented. + Although the implementation has not changed, these features do not + work in the default installation, they are not used in the data, + and they are now considered obsolescent. + + zic now checks that two rules don't take effect at the same time. + (Thanks to Jon Skeet and Arthur David Olson.) Constraints on + simultaneity are now documented. + + The two characters '%z' in a zone format now stand for the UTC + offset, e.g., '-07' for seven hours behind UTC and '+0530' for + five hours and thirty minutes ahead. This better supports time + zone abbreviations conforming to POSIX.1-2001 and later. + + Changes affecting installed data files + + Comments for America/Halifax and America/Glace_Bay have been improved. + (Thanks to Brian Inglis.) + + Data entries have been simplified for Atlantic/Canary, Europe/Simferopol, + Europe/Sofia, and Europe/Tallinn. This yields slightly smaller + installed data files for Europe/Simferopol and Europe/Tallinn. + It does not affect timestamps. (Thanks to Howard Hinnant.) + + Changes affecting code + + zdump and zic no longer warn about valid time zone abbreviations + like '-05'. + + Some Visual Studio 2013 warnings have been suppressed. + (Thanks to Kees Dekker.) + + 'date' no longer sets the time of day and its -a, -d, -n and -t + options have been removed. Long obsolescent, the implementation + of these features had porting problems. Builders no longer need + to configure HAVE_ADJTIME, HAVE_SETTIMEOFDAY, or HAVE_UTMPX_H. + (Thanks to Kees Dekker for pointing out the problem.) + + Changes affecting documentation + + The Theory file mentions naming issues earlier, as these seem to be + poorly publicized (thanks to Gilmore Davidson for reporting the problem). + + tz-link.htm mentions Time Zone Database Parser (thanks to Howard Hinnant). + + Mention that Herbert Samuel introduced the term "Summer Time". + + +Release 2015e - 2015-06-13 10:56:02 -0700 + + Changes affecting future time stamps + + Morocco will suspend DST from 2015-06-14 03:00 through 2015-07-19 02:00, + not 06-13 and 07-18 as we had guessed. (Thanks to Milamber.) + + Assume Cayman Islands will observe DST starting next year, using US rules. + Although it isn't guaranteed, it is the most likely. + + Changes affecting data format + + The file 'iso3166.tab' now uses UTF-8, so that its entries can better + spell the names of Åland Islands, Côte d'Ivoire, and Réunion. + + Changes affecting code + + When displaying data, tzselect converts it to the current locale's + encoding if the iconv command works. (Problem reported by random832.) + + tzselect no longer mishandles Dominica, fixing a bug introduced + in Release 2014f. (Problem reported by Owen Leibman.) + + zic -l no longer fails when compiled with -DTZDEFAULT=\"/etc/localtime\". + This fixes a bug introduced in Release 2014f. + (Problem reported by Leonardo Chiquitto.) + + +Release 2015d - 2015-04-24 08:09:46 -0700 + + Changes affecting future time stamps + + Egypt will not observe DST in 2015 and will consider canceling it + permanently. For now, assume no DST indefinitely. + (Thanks to Ahmed Nazmy and Tim Parenti.) + + Changes affecting past time stamps + + America/Whitehorse switched from UTC-9 to UTC-8 on 1967-05-28, not + 1966-07-01. Also, Yukon's time zone history is documented better. + (Thanks to Brian Inglis and Dennis Ferguson.) + + Change affecting past and future time zone abbreviations + + The abbreviations for Hawaii-Aleutian standard and daylight times + have been changed from HAST/HADT to HST/HDT, as per US Government + Printing Office style. This affects only America/Adak since 1983, + as America/Honolulu was already using the new style. + + Changes affecting code + + zic has some minor performance improvements. + + +Release 2015c - 2015-04-11 08:55:55 -0700 + + Changes affecting future time stamps + + Egypt's spring-forward transition is at 24:00 on April's last Thursday, + not 00:00 on April's last Friday. 2015's transition will therefore be on + Thursday, April 30 at 24:00, not Friday, April 24 at 00:00. Similar fixes + apply to 2026, 2037, 2043, etc. (Thanks to Steffen Thorsen.) + + Changes affecting past time stamps + + The following changes affect some pre-1991 Chile-related time stamps + in America/Santiago, Antarctica/Palmer, and Pacific/Easter. + + The 1910 transition was January 10, not January 1. + + The 1918 transition was September 10, not September 1. + + The UTC-4 time observed from 1932 to 1942 is now considered to be + standard time, not year-round DST. + + Santiago observed DST (UTC-3) from 1946-07-15 through 1946-08-31, + then reverted to standard time, then switched its time zone to + UTC-5 on 1947-04-01. + + Assume transitions before 1968 were at 00:00, since we have no data + saying otherwise. + + The spring 1988 transition was 1988-10-09, not 1988-10-02. + The fall 1990 transition was 1990-03-11, not 1990-03-18. + + Assume no UTC offset change for Pacific/Easter on 1890-01-01, + and omit all transitions on Pacific/Easter from 1942 through 1946 + since we have no data suggesting that they existed. + + One more zone has been turned into a link, as it differed + from an existing zone only for older time stamps. As usual, + this change affects UTC offsets in pre-1970 time stamps only. + The zone's old contents have been moved to the 'backzone' file. + The affected zone is America/Montreal. + + Changes affecting commentary + + Mention the TZUpdater tool. + + Mention "The Time Now". (Thanks to Brandon Ramsey.) + + +Release 2015b - 2015-03-19 23:28:11 -0700 + + Changes affecting future time stamps + + Mongolia will start observing DST again this year, from the last + Saturday in March at 02:00 to the last Saturday in September at 00:00. + (Thanks to Ganbold Tsagaankhuu.) + + Palestine will start DST on March 28, not March 27. Also, + correct the fall 2014 transition from September 26 to October 24. + Adjust future predictions accordingly. (Thanks to Steffen Thorsen.) + + Changes affecting past time stamps + + The 1982 zone shift in Pacific/Easter has been corrected, fixing a 2015a + regression. (Thanks to Stuart Bishop for reporting the problem.) + + Some more zones have been turned into links, when they differed + from existing zones only for older time stamps. As usual, + these changes affect UTC offsets in pre-1970 time stamps only. + Their old contents have been moved to the 'backzone' file. + The affected zones are: America/Antigua, America/Cayman, + Pacific/Midway, and Pacific/Saipan. + + Changes affecting time zone abbreviations + + Correct the 1992-2010 DST abbreviation in Volgograd from "MSK" to "MSD". + (Thanks to Hank W.) + + Changes affecting code + + Fix integer overflow bug in reference 'mktime' implementation. + (Problem reported by Jörg Richter.) + + Allow -Dtime_tz=time_t compilations, and allow -Dtime_tz=... libraries + to be used in the same executable as standard-library time_t functions. + (Problems reported by Bradley White.) + + Changes affecting commentary + + Cite the recent Mexican decree changing Quintana Roo's time zone. + (Thanks to Carlos Raúl Perasso.) + + Likewise for the recent Chilean decree. (Thanks to Eduardo Romero Urra.) + + Update info about Mars time. + + +Release 2015a - 2015-01-29 22:35:20 -0800 + + Changes affecting future time stamps + + The Mexican state of Quintana Roo, represented by America/Cancun, + will shift from Central Time with DST to Eastern Time without DST + on 2015-02-01 at 02:00. (Thanks to Steffen Thorsen and Gwillim Law.) + + Chile will not change clocks in April or thereafter; its new standard time + will be its old daylight saving time. This affects America/Santiago, + Pacific/Easter, and Antarctica/Palmer. (Thanks to Juan Correa.) + + New leap second 2015-06-30 23:59:60 UTC as per IERS Bulletin C 49. + (Thanks to Tim Parenti.) + + Changes affecting past time stamps + + Iceland observed DST in 1919 and 1921, and its 1939 fallback + transition was Oct. 29, not Nov. 29. Remove incorrect data from + Shanks about time in Iceland between 1837 and 1908. + + Some more zones have been turned into links, when they differed + from existing zones only for older time stamps. As usual, + these changes affect UTC offsets in pre-1970 time stamps only. + Their old contents have been moved to the 'backzone' file. + The affected zones are: Asia/Aden, Asia/Bahrain, Asia/Kuwait, + and Asia/Muscat. + + Changes affecting code + + tzalloc now scrubs time zone abbreviations compatibly with the way + that tzset always has, by replacing invalid bytes with '_' and by + shortening too-long abbreviations. + + tzselect ports to POSIX awk implementations, no longer mishandles + POSIX TZ settings when GNU awk is used, and reports POSIX TZ + settings to the user. (Thanks to Stefan Kuhn.) + + Changes affecting build procedure + + 'make check' now checks for links to links in the data. + One such link (for Africa/Asmera) has been fixed. + (Thanks to Stephen Colebourne for pointing out the problem.) + + Changes affecting commentary + + The leapseconds file commentary now mentions the expiration date. + (Problem reported by Martin Burnicki.) + + Update Mexican Library of Congress URL. + + +Release 2014j - 2014-11-10 17:37:11 -0800 + + Changes affecting current and future time stamps + + Turks & Caicos' switch from US eastern time to UTC-4 year-round + did not occur on 2014-11-02 at 02:00. It's currently scheduled + for 2015-11-01 at 02:00. (Thanks to Chris Walton.) + + Changes affecting past time stamps + + Many pre-1989 time stamps have been corrected for Asia/Seoul and + Asia/Pyongyang, based on sources for the Korean-language Wikipedia + entry for time in Korea. (Thanks to Sanghyuk Jung.) Also, no + longer guess that Pyongyang mimicked Seoul time after World War II, + as this is politically implausible. + + Some more zones have been turned into links, when they differed + from existing zones only for older time stamps. As usual, + these changes affect UTC offsets in pre-1970 time stamps only. + Their old contents have been moved to the 'backzone' file. + The affected zones are: Africa/Addis_Ababa, Africa/Asmara, + Africa/Dar_es_Salaam, Africa/Djibouti, Africa/Kampala, + Africa/Mogadishu, Indian/Antananarivo, Indian/Comoro, and + Indian/Mayotte. + + Changes affecting commentary + + The commentary is less enthusiastic about Shanks as a source, + and is more careful to distinguish UT from UTC. + + +Release 2014i - 2014-10-21 22:04:57 -0700 + + Changes affecting future time stamps + + Pacific/Fiji will observe DST from 2014-11-02 02:00 to 2015-01-18 03:00. + (Thanks to Ken Rylander for the heads-up.) Guess that future + years will use a similar pattern. + + A new Zone Pacific/Bougainville, for the part of Papua New Guinea + that plans to switch from UTC+10 to UTC+11 on 2014-12-28 at 02:00. + (Thanks to Kiley Walbom for the heads-up.) + + Changes affecting time zone abbreviations + + Since Belarus is not changing its clocks even though Moscow is, + the time zone abbreviation in Europe/Minsk is changing from FET + to its more-traditional value MSK on 2014-10-26 at 01:00. + (Thanks to Alexander Bokovoy for the heads-up about Belarus.) + + The new abbreviation IDT stands for the pre-1976 use of UT+8 in + Indochina, to distinguish it better from ICT (UT+7). + + Changes affecting past time stamps + + Many time stamps have been corrected for Asia/Ho_Chi_Minh before 1976 + (thanks to Trần Ngọc Quân for an indirect pointer to Trần Tiến Bình's + authoritative book). Asia/Ho_Chi_Minh has been added to + zone1970.tab, to give tzselect users in Vietnam two choices, + since north and south Vietnam disagreed after our 1970 cutoff. + + Asia/Phnom_Penh and Asia/Vientiane have been turned into links, as + they differed from existing zones only for older time stamps. As + usual, these changes affect pre-1970 time stamps only. Their old + contents have been moved to the 'backzone' file. + + Changes affecting code + + The time-related library functions now set errno on failure, and + some crashes in the new tzalloc-related library functions have + been fixed. (Thanks to Christos Zoulas for reporting most of + these problems and for suggesting fixes.) + + If USG_COMPAT is defined and the requested time stamp is standard time, + the tz library's localtime and mktime functions now set the extern + variable timezone to a value appropriate for that time stamp; and + similarly for ALTZONE, daylight saving time, and the altzone variable. + This change is a companion to the tzname change in 2014h, and is + designed to make timezone and altzone more compatible with tzname. + + The tz library's functions now set errno to EOVERFLOW if they fail + because the result cannot be represented. ctime and ctime_r now + return NULL and set errno when a time stamp is out of range, rather + than having undefined behavior. + + Some bugs associated with the new 2014g functions have been fixed. + This includes a bug that largely incapacitated the new functions + time2posix_z and posix2time_z. (Thanks to Christos Zoulas.) + It also includes some uses of uninitialized variables after tzalloc. + The new code uses the standard type 'ssize_t', which the Makefile + now gives porting advice about. + + Changes affecting commentary + + Updated URLs for NRC Canada (thanks to Matt Johnson and Brian Inglis). + + +Release 2014h - 2014-09-25 18:59:03 -0700 + + Changes affecting past time stamps + + America/Jamaica's 1974 spring-forward transition was Jan. 6, not Apr. 28. + + Shanks says Asia/Novokuznetsk switched from LMT (not "NMT") on 1924-05-01, + not 1920-01-06. The old entry was based on a misinterpretation of Shanks. + + Some more zones have been turned into links, when they differed + from existing zones only for older time stamps. As usual, + these changes affect UTC offsets in pre-1970 time stamps only. + Their old contents have been moved to the 'backzone' file. + The affected zones are: Africa/Blantyre, Africa/Bujumbura, + Africa/Gaborone, Africa/Harare, Africa/Kigali, Africa/Lubumbashi, + Africa/Lusaka, Africa/Maseru, and Africa/Mbabane. + + Changes affecting code + + zdump -V and -v now output gmtoff= values on all platforms, + not merely on platforms defining TM_GMTOFF. + + The tz library's localtime and mktime functions now set tzname to a value + appropriate for the requested time stamp, and zdump now uses this + on platforms not defining TM_ZONE, fixing a 2014g regression. + (Thanks to Tim Parenti for reporting the problem.) + + The tz library no longer sets tzname if localtime or mktime fails. + + zdump -c no longer mishandles transitions near year boundaries. + (Thanks to Tim Parenti for reporting the problem.) + + An access to uninitalized data has been fixed. + (Thanks to Jörg Richter for reporting the problem.) + + When THREAD_SAFE is defined, the code ports to the C11 memory model. + A memory leak has been fixed if ALL_STATE and THREAD_SAFE are defined + and two threads race to initialize data used by gmtime-like functions. + (Thanks to Andy Heninger for reporting the problems.) + + Changes affecting build procedure + + 'make check' now checks better for properly-sorted data. + + Changes affecting documentation and commentary + + zdump's gmtoff=N output is now documented, and its isdst=D output + is now documented to possibly output D values other than 0 or 1. + + zdump -c's treatment of years is now documented to use the + Gregorian calendar and Universal Time without leap seconds, + and its behavior at cutoff boundaries is now documented better. + (Thanks to Arthur David Olson and Tim Parenti for reporting the problems.) + + Programs are now documented to use the proleptic Gregorian calendar. + (Thanks to Alan Barrett for the suggestion.) + + Fractional-second GMT offsets have been documented for civil time + in 19th-century Chennai, Jakarta, and New York. + + +Release 2014g - 2014-08-28 12:31:23 -0700 + + Changes affecting future time stamps + + Turks & Caicos is switching from US eastern time to UTC-4 year-round, + modeled as a switch from EST/EDT to AST on 2014-11-02 at 02:00. + [As noted in 2014j, this switch was later delayed.] + + Changes affecting past time stamps + + Time in Russia or the USSR before 1926 or so has been corrected by + a few seconds in the following zones: Asia/Irkutsk, + Asia/Krasnoyarsk, Asia/Omsk, Asia/Samarkand, Asia/Tbilisi, + Asia/Vladivostok, Asia/Yakutsk, Europe/Riga, Europe/Samara. For + Asia/Yekaterinburg the correction is a few minutes. (Thanks to + Vladimir Karpinsky.) + + The Portuguese decree of 1911-05-26 took effect on 1912-01-01. + This affects 1911 time stamps in Africa/Bissau, Africa/Luanda, + Atlantic/Azores, and Atlantic/Madeira. Also, Lisbon's pre-1912 + GMT offset was -0:36:45 (rounded from -0:36:44.68), not -0:36:32. + (Thanks to Stephen Colebourne for pointing to the decree.) + + Asia/Dhaka ended DST on 2009-12-31 at 24:00, not 23:59. + + A new file 'backzone' contains data which may appeal to + connoisseurs of old time stamps, although it is out of scope for + the tz database, is often poorly sourced, and contains some data + that is known to be incorrect. The new file is not recommended + for ordinary use and its entries are not installed by default. + (Thanks to Lester Caine for the high-quality Jersey, Guernsey, and + Isle of Man entries.) + + Some more zones have been turned into links, when they differed + from existing zones only for older time stamps. As usual, + these changes affect UTC offsets in pre-1970 time stamps only. + Their old contents have been moved to the 'backzone' file. + The affected zones are: Africa/Bangui, Africa/Brazzaville, + Africa/Douala, Africa/Kinshasa, Africa/Libreville, Africa/Luanda, + Africa/Malabo, Africa/Niamey, and Africa/Porto-Novo. + + Changes affecting code + + Unless NETBSD_INSPIRED is defined to 0, the tz library now + supplies functions for creating and using objects that represent + time zones. The new functions are tzalloc, tzfree, localtime_rz, + mktime_z, and (if STD_INSPIRED is also defined) posix2time_z and + time2posix_z. They are intended for performance: for example, + localtime_rz (unlike localtime_r) is trivially thread-safe without + locking. (Thanks to Christos Zoulas for proposing NetBSD-inspired + functions, and to Alan Barrett and Jonathan Lennox for helping to + debug the change.) + + zdump now builds with the tz library unless USE_LTZ is defined to 0, + This lets zdump use tz features even if the system library lacks them. + To build zdump with the system library, use 'make CFLAGS=-DUSE_LTZ=0 + TZDOBJS=zdump.o CHECK_TIME_T_ALTERNATIVES='. + + zdump now uses localtime_rz if available, as it's significantly faster, + and it can help zdump better diagnose invalid time zone names. + Define HAVE_LOCALTIME_RZ to 0 to suppress this. HAVE_LOCALTIME_RZ + defaults to 1 if NETBSD_INSPIRED && USE_LTZ. When localtime_rz is + not available, zdump now uses localtime_r and tzset if available, + as this is a bit cleaner and faster than plain localtime. Compile + with -DHAVE_LOCALTIME_R=0 and/or -DHAVE_TZSET=0 if your system + lacks these two functions. + + If THREAD_SAFE is defined to 1, the tz library is now thread-safe. + Although not needed for tz's own applications, which are single-threaded, + this supports POSIX better if the tz library is used in multithreaded apps. + + Some crashes have been fixed when zdump or the tz library is given + invalid or outlandish input. + + The tz library no longer mishandles leap seconds on platforms with + unsigned time_t in time zones that lack ordinary transitions after 1970. + + The tz code now attempts to infer TM_GMTOFF and TM_ZONE if not + already defined, to make it easier to configure on common platforms. + Define NO_TM_GMTOFF and NO_TM_ZONE to suppress this. + + Unless the new macro UNINIT_TRAP is defined to 1, the tz code now + assumes that reading uninitialized memory yields garbage values + but does not cause other problems such as traps. + + If TM_GMTOFF is defined and UNINIT_TRAP is 0, mktime is now + more likely to guess right for ambiguous time stamps near + transitions where tm_isdst does not change. + + If HAVE_STRFTIME_L is defined to 1, the tz library now defines + strftime_l for compatibility with recent versions of POSIX. + Only the C locale is supported, though. HAVE_STRFTIME_L defaults + to 1 on recent POSIX versions, and to 0 otherwise. + + tzselect -c now uses a hybrid distance measure that works better + in Africa. (Thanks to Alan Barrett for noting the problem.) + + The C source code now ports to NetBSD when GCC_DEBUG_FLAGS is used, + or when time_tz is defined. + + When HAVE_UTMPX_H is set the 'date' command now builds on systems + whose <utmpx.h> file does not define WTMPX_FILE, and when setting + the date it updates the wtmpx file if _PATH_WTMPX is defined. + This affects GNU/Linux and similar systems. + + For easier maintenance later, some C code has been simplified, + some lint has been removed, and the code has been tweaked so that + plain 'make' is more likely to work. + + The C type 'bool' is now used for boolean values, instead of 'int'. + + The long-obsolete LOCALE_HOME code has been removed. + + The long-obsolete 'gtime' function has been removed. + + Changes affecting build procedure + + 'zdump' no longer links in ialloc.o, as it's not needed. + + 'make check_time_t_alternatives' no longer assumes GNU diff. + + Changes affecting distribution tarballs + + The files checktab.awk and zoneinfo2tdf.pl are now distributed in + the tzdata tarball instead of the tzcode tarball, since they help + maintain the data. The NEWS and Theory files are now also + distributed in the tzdata tarball, as they're relevant for data. + (Thanks to Alan Barrett for pointing this out.) Also, the + leapseconds.awk file is no longer distributed in the tzcode + tarball, since it belongs in the tzdata tarball (where 2014f + inadvertently also distributed it). + + Changes affecting documentation and commentary + + A new file CONTRIBUTING is distributed. (Thanks to Tim Parenti for + suggesting a CONTRIBUTING file, and to Tony Finch and Walter Harms + for debugging it.) + + The man pages have been updated to use function prototypes, + to document thread-safe variants like localtime_r, and to document + the NetBSD-inspired functions tzalloc, tzfree, localtime_rz, and + mktime_z. + + The fields in Link lines have been renamed to be more descriptive + and more like the parameters of 'ln'. LINK-FROM has become TARGET, + and LINK-TO has become LINK-NAME. + + tz-link.htm mentions the IETF's tzdist working group; Windows + Runtime etc. (thanks to Matt Johnson); and HP-UX's tztab. + + Some broken URLs have been fixed in the commentary. (Thanks to + Lester Caine.) + + Commentary about Philippines DST has been updated, and commentary + on pre-1970 time in India has been added. + + +Release 2014f - 2014-08-05 17:42:36 -0700 + + Changes affecting future time stamps + + Russia will subtract an hour from most of its time zones on 2014-10-26 + at 02:00 local time. (Thanks to Alexander Krivenyshev.) + There are a few exceptions: Magadan Oblast (Asia/Magadan) and Zabaykalsky + Krai are subtracting two hours; conversely, Chukotka Autonomous Okrug + (Asia/Anadyr), Kamchatka Krai (Asia/Kamchatka), Kemerovo Oblast + (Asia/Novokuznetsk), and the Samara Oblast and the Udmurt Republic + (Europe/Samara) are not changing their clocks. The changed zones are + Europe/Kaliningrad, Europe/Moscow, Europe/Simferopol, Europe/Volgograd, + Asia/Yekaterinburg, Asia/Omsk, Asia/Novosibirsk, Asia/Krasnoyarsk, + Asia/Irkutsk, Asia/Yakutsk, Asia/Vladivostok, Asia/Khandyga, + Asia/Sakhalin, and Asia/Ust-Nera; Asia/Magadan will have two hours + subtracted; and Asia/Novokuznetsk's time zone abbreviation is affected, + but not its UTC offset. Two zones are added: Asia/Chita (split + from Asia/Yakutsk, and also with two hours subtracted) and + Asia/Srednekolymsk (split from Asia/Magadan, but with only one hour + subtracted). (Thanks to Tim Parenti for much of the above.) + + Changes affecting time zone abbreviations + + Australian eastern time zone abbreviations are now AEST/AEDT not EST, + and similarly for the other Australian zones. That is, for eastern + standard and daylight saving time the abbreviations are AEST and AEDT + instead of the former EST for both; similarly, ACST/ACDT, ACWST/ACWDT, + and AWST/AWDT are now used instead of the former CST, CWST, and WST. + This change does not affect UTC offsets, only time zone abbreviations. + (Thanks to Rich Tibbett and many others.) + + Asia/Novokuznetsk shifts from NOVT to KRAT (remaining on UTC+7) + effective 2014-10-26 at 02:00 local time. + + The time zone abbreviation for Xinjiang Time (observed in Ürümqi) + has been changed from URUT to XJT. (Thanks to Luther Ma.) + + Prefer MSK/MSD for Moscow time in Russia, even in other cities. + Similarly, prefer EET/EEST for eastern European time in Russia. + + Change time zone abbreviations in (western) Samoa to use "ST" and + "DT" suffixes, as this is more likely to match common practice. + Prefix "W" to (western) Samoa time when its standard-time offset + disagrees with that of American Samoa. + + America/Metlakatla now uses PST, not MeST, to abbreviate its time zone. + + Time zone abbreviations have been updated for Japan's two time + zones used 1896-1937. JWST now stands for Western Standard + Time, and JCST for Central Standard Time (formerly this was CJT). + These abbreviations are now used for time in Korea, Taiwan, + and Sakhalin while controlled by Japan. + + Changes affecting past time stamps + + China's five zones have been simplified to two, since the post-1970 + differences in the other three seem to have been imaginary. The + zones Asia/Harbin, Asia/Chongqing, and Asia/Kashgar have been + removed; backwards-compatibility links still work, albeit with + different behaviors for time stamps before May 1980. Asia/Urumqi's + 1980 transition to UTC+8 has been removed, so that it is now at + UTC+6 and not UTC+8. (Thanks to Luther Ma and to Alois Treindl; + Treindl sent helpful translations of two papers by Guo Qingsheng.) + + Some zones have been turned into links, when they differed from existing + zones only for older UTC offsets where data entries were likely invented. + These changes affect UTC offsets in pre-1970 time stamps only. This is + similar to the change in release 2013e, except this time for western + Africa. The affected zones are: Africa/Bamako, Africa/Banjul, + Africa/Conakry, Africa/Dakar, Africa/Freetown, Africa/Lome, + Africa/Nouakchott, Africa/Ouagadougou, Africa/Sao_Tome, and + Atlantic/St_Helena. This also affects the backwards-compatibility + link Africa/Timbuktu. (Thanks to Alan Barrett, Stephen Colebourne, + Tim Parenti, and David Patte for reporting problems in earlier + versions of this change.) + + Asia/Shanghai's pre-standard-time UT offset has been changed from + 8:05:57 to 8:05:43, the location of Xujiahui Observatory. Its + transition to standard time has been changed from 1928 to 1901. + + Asia/Taipei switched to JWST on 1896-01-01, then to JST on 1937-10-01, + then to CST on 1945-09-21 at 01:00, and did not observe DST in 1945. + In 1946 it observed DST from 05-15 through 09-30; in 1947 + from 04-15 through 10-31; and in 1979 from 07-01 through 09-30. + (Thanks to Yu-Cheng Chuang.) + + Asia/Riyadh's transition to standard time is now 1947-03-14, not 1950. + + Europe/Helsinki's 1942 fall-back transition was 10-04 at 01:00, not + 10-03 at 00:00. (Thanks to Konstantin Hyppönen.) + + Pacific/Pago_Pago has been changed from UTC-11:30 to UTC-11 for the period + from 1911 to 1950. + + Pacific/Chatham has been changed to New Zealand standard time plus + 45 minutes for the period before 1957, reflecting a 1956 remark in + the New Zealand parliament. + + Europe/Budapest has several pre-1946 corrections: in 1918 the transition + out of DST was on 09-16, not 09-29; in 1919 it was on 11-24, not 09-15; in + 1945 it was on 11-01, not 11-03; in 1941 the transition to DST was 04-08 + not 04-06 at 02:00; and there was no DST in 1920. + + Africa/Accra is now assumed to have observed DST from 1920 through 1935. + + Time in Russia before 1927 or so has been corrected by a few seconds in + the following zones: Europe/Moscow, Asia/Irkutsk, Asia/Tbilisi, + Asia/Tashkent, Asia/Vladivostok, Asia/Yekaterinburg, Europe/Helsinki, and + Europe/Riga. Also, Moscow's location has been changed to its Kilometer 0 + point. (Thanks to Vladimir Karpinsky for the Moscow changes.) + + Changes affecting data format + + A new file 'zone1970.tab' supersedes 'zone.tab' in the installed data. + The new file's extended format allows multiple country codes per zone. + The older file is still installed but is deprecated; its format is + not changing and it will still be distributed for a while, but new + applications should use the new file. + + The new file format simplifies maintenance of obscure locations. + To test this, it adds coverage for the Crozet Islands and the + Scattered Islands. (Thanks to Tobias Conradi and Antoine Leca.) + + The file 'iso3166.tab' is planned to switch from ASCII to UTF-8. + It is still ASCII now, but commentary about the switch has been added. + The new file 'zone1970.tab' already uses UTF-8. + + Changes affecting code + + 'localtime', 'mktime', etc. now use much less stack space if ALL_STATE + is defined. (Thanks to Elliott Hughes for reporting the problem.) + + 'zic' no longer mishandles input when ignoring case in locales that + are not compatible with English, e.g., unibyte Turkish locales when + compiled with HAVE_GETTEXT. + + Error diagnostics of 'zic' and 'yearistype' have been reworded so that + they no longer use ASCII '-' as if it were a dash. + + 'zic' now rejects output file names that contain '.' or '..' components. + (Thanks to Tim Parenti for reporting the problem.) + + 'zic -v' now warns about output file names that do not follow + POSIX rules, or that contain a digit or '.'. (Thanks to Arthur + David Olson for starting the ball rolling on this.) + + Some lint has been removed when using GCC_DEBUG_FLAGS with GCC 4.9.0. + + Changes affecting build procedure + + 'zic' no longer links in localtime.o and asctime.o, as they're not needed. + (Thanks to John Cochran.) + + Changes affecting documentation and commentary + + The 'Theory' file documents legacy names, the longstanding + exceptions to the POSIX-inspired file name rules. + + The 'zic' documentation clarifies the role of time types when + interpreting dates. (Thanks to Arthur David Olson.) + + Documentation and commentary now prefer UTF-8 to US-ASCII, + allowing the use of proper accents in foreign words and names. + Code and data have not changed because of this. (Thanks to + Garrett Wollman, Ian Abbott, and Guy Harris for helping to debug + this.) + + Non-HTML documentation and commentary now use plain-text URLs instead of + HTML insertions, and are more consistent about bracketing URLs when they + are not already surrounded by white space. (Thanks to suggestions by + Steffen Nurpmeso.) + + There is new commentary about Xujiahui Observatory, the five time-zone + project in China from 1918 to 1949, timekeeping in Japanese-occupied + Shanghai, and Tibet Time in the 1950s. The sharp-eyed can spot the + warlord Jin Shuren in the data. + + Commentary about the coverage of each Russian zone has been standardized. + (Thanks to Tim Parenti). + + There is new commentary about contemporary timekeeping in Ethiopia. + + Obsolete comments about a 2007 proposal for DST in Kuwait has been removed. + + There is new commentary about time in Poland in 1919. + + Proper credit has been given to DST inventor George Vernon Hudson. + + Commentary about time in Metlakatla, AK and Resolute, NU has been + improved, with a new source for the former. + + In zone.tab, Pacific/Easter no longer mentions Salas y Gómez, as it + is uninhabited. + + Commentary about permanent Antarctic bases has been updated. + + Several typos have been corrected. (Thanks to Tim Parenti for + contributing some of these fixes.) + + tz-link.htm now mentions the JavaScript libraries Moment Timezone, + TimezoneJS.Date, Walltime-js, and Timezone. (Thanks to a heads-up + from Matt Johnson.) Also, it mentions the Go 'latlong' package. + (Thanks to a heads-up from Dirkjan Ochtman.) + + The files usno1988, usno1989, usno1989a, usno1995, usno1997, and usno1998 + have been removed. These obsolescent US Naval Observatory entries were no + longer helpful for maintenance. (Thanks to Tim Parenti for the suggestion.) + + +Release 2014e - 2014-06-12 21:53:52 -0700 + + Changes affecting near-future time stamps + + Egypt's 2014 Ramadan-based transitions are June 26 and July 31 at 24:00. + (Thanks to Imed Chihi.) Guess that from 2015 on Egypt will temporarily + switch to standard time at 24:00 the last Thursday before Ramadan, and + back to DST at 00:00 the first Friday after Ramadan. + + Similarly, Morocco's are June 28 at 03:00 and August 2 at 02:00. (Thanks + to Milamber Space Network.) Guess that from 2015 on Morocco will + temporarily switch to standard time at 03:00 the last Saturday before + Ramadan, and back to DST at 02:00 the first Saturday after Ramadan. + + Changes affecting past time stamps + + The abbreviation "MSM" (Moscow Midsummer Time) is now used instead of + "MSD" for Moscow's double daylight time in summer 1921. Also, a typo + "VLASST" has been repaired to be "VLAST" for Vladivostok summer time + in 1991. (Thanks to Hank W. for reporting the problems.) + + Changes affecting commentary + + tz-link.htm now cites RFC 7265 for jCal, mentions PTP and the + draft CalDAV extension, updates URLs for TSP, TZInfo, IATA, and + removes stale pointers to World Time Explorer and WORLDTIME. + + +Release 2014d - 2014-05-27 21:34:40 -0700 + + Changes affecting code + + zic no longer generates files containing time stamps before the Big Bang. + This works around GNOME bug 730332 + <https://bugzilla.gnome.org/show_bug.cgi?id=730332>. + (Thanks to Leonardo Chiquitto for reporting the bug, and to + Arthur David Olson and James Cloos for suggesting improvements to the fix.) + + Changes affecting documentation + + tz-link.htm now mentions GNOME. + + +Release 2014c - 2014-05-13 07:44:13 -0700 + + Changes affecting near-future time stamps + + Egypt observes DST starting 2014-05-15 at 24:00. + (Thanks to Ahmad El-Dardiry and Gunther Vermier.) + Details have not been announced, except that DST will not be observed + during Ramadan. Guess that DST will stop during the same Ramadan dates as + Morocco, and that Egypt's future spring and fall transitions will be the + same as 2010 when it last observed DST, namely April's last Friday at + 00:00 to September's last Thursday at 23:00 standard time. Also, guess + that Ramadan transitions will be at 00:00 standard time. + + Changes affecting code + + zic now generates transitions for minimum time values, eliminating guesswork + when handling low-valued time stamps. (Thanks to Arthur David Olson.) + + Port to Cygwin sans glibc. (Thanks to Arthur David Olson.) + + Changes affecting commentary and documentation + + Remove now-confusing comment about Jordan. (Thanks to Oleksii Nochovnyi.) + + +Release 2014b - 2014-03-24 21:28:50 -0700 + + Changes affecting near-future time stamps + + Crimea switches to Moscow time on 2014-03-30 at 02:00 local time. + (Thanks to Alexander Krivenyshev.) Move its zone.tab entry from UA to RU. + + New entry for Troll station, Antarctica. (Thanks to Paul-Inge Flakstad and + Bengt-Inge Larsson.) This is currently an approximation; a better version + will require the zic and localtime fixes mentioned below, and the plan is + to wait for a while until at least the zic fixes propagate. + + Changes affecting code + + 'zic' and 'localtime' no longer reject locations needing four transitions + per year for the foreseeable future. (Thanks to Andrew Main (Zefram).) + Also, 'zic' avoids some unlikely failures due to integer overflow. + + Changes affecting build procedure + + 'make check' now detects Rule lines defined but never used. + The NZAQ rules, an instance of this problem, have been removed. + + Changes affecting commentary and documentation + + Fix Tuesday/Thursday typo in description of time in Israel. + (Thanks to Bert Katz via Pavel Kharitonov and Mike Frysinger.) + + Microsoft Windows 8.1 doesn't support tz database names. (Thanks + to Donald MacQueen.) Instead, the Microsoft Windows Store app + library supports them. + + Add comments about Johnston Island time in the 1960s. + (Thanks to Lyle McElhaney.) + + Morocco's 2014 DST start will be as predicted. + (Thanks to Sebastien Willemijns.) + + +Release 2014a - 2014-03-07 23:30:29 -0800 + + Changes affecting near-future time stamps + + Turkey begins DST on 2014-03-31, not 03-30. (Thanks to Faruk Pasin for + the heads-up, and to Tim Parenti for simplifying the update.) + + Changes affecting past time stamps + + Fiji ended DST on 2014-01-19 at 02:00, not the previously-scheduled 03:00. + (Thanks to Steffen Thorsen.) + + Ukraine switched from Moscow to Eastern European time on 1990-07-01 + (not 1992-01-01), and observed DST during the entire next winter. + (Thanks to Vladimir in Moscow via Alois Treindl.) + + In 1988 Israel observed DST from 04-10 to 09-04, not 04-09 to 09-03. + (Thanks to Avigdor Finkelstein.) + + Changes affecting code + + A uninitialized-storage bug in 'localtime' has been fixed. + (Thanks to Logan Chien.) + + Changes affecting the build procedure + + The settings for 'make check_web' now default to Ubuntu 13.10. + + Changes affecting commentary and documentation + + The boundary of the US Pacific time zone is given more accurately. + (Thanks to Alan Mintz.) + + Chile's 2014 DST will be as predicted. (Thanks to José Miguel Garrido.) + + Paraguay's 2014 DST will be as predicted. (Thanks to Carlos Raúl Perasso.) + + Better descriptions of countries with same time zone history as + Trinidad and Tobago since 1970. (Thanks to Alan Barrett for suggestion.) + + Several changes affect tz-link.htm, the main web page. + + Mention Time.is (thanks to Even Scharning) and WX-now (thanks to + David Braverman). + + Mention xCal (Internet RFC 6321) and jCal. + + Microsoft has some support for tz database names. + + CLDR data formats include both XML and JSON. + + Mention Maggiolo's map of solar vs standard time. + (Thanks to Arthur David Olson.) + + Mention TZ4Net. (Thanks to Matt Johnson.) + + Mention the timezone-olson Haskell package. + + Mention zeitverschiebung.net. (Thanks to Martin Jäger.) + + Remove moribund links to daylight-savings-time.info and to + Simple Timer + Clocks. + + Update two links. (Thanks to Oscar van Vlijmen.) + + Fix some formatting glitches, e.g., remove random newlines from + abbr elements' title attributes. + + +Release 2013i - 2013-12-17 07:25:23 -0800 + + Changes affecting near-future time stamps: + + Jordan switches back to standard time at 00:00 on December 20, 2013. + The 2006-2011 transition schedule is planned to resume in 2014. + (Thanks to Steffen Thorsen.) + + Changes affecting past time stamps: + + In 2004, Cuba began DST on March 28, not April 4. + (Thanks to Steffen Thorsen.) + + Changes affecting code + + The compile-time flag NOSOLAR has been removed, as nowadays the + benefit of slightly shrinking runtime table size is outweighed by the + cost of disallowing potential future updates that exceed old limits. + + Changes affecting documentation and commentary + + The files solar87, solar88, and solar89 are no longer distributed. + They were a negative experiment - that is, a demonstration that + tz data can represent solar time only with some difficulty and error. + Their presence in the distribution caused confusion, as Riyadh + civil time was generally not solar time in those years. + + tz-link.htm now mentions Noda Time. (Thanks to Matt Johnson.) + + +Release 2013h - 2013-10-25 15:32:32 -0700 + + Changes affecting current and future time stamps: + + Libya has switched its time zone back to UTC+2 without DST, + instead of UTC+1 with DST. (Thanks to Even Scharning.) + + Western Sahara (Africa/El_Aaiun) uses Morocco's DST rules. + (Thanks to Gwillim Law.) + + Changes affecting future time stamps: + + Acre and (we guess) western Amazonas will switch from UTC-4 to UTC-5 + on 2013-11-10. This affects America/Rio_Branco and America/Eirunepe. + (Thanks to Steffen Thorsen.) + + Add entries for DST transitions in Morocco in the year 2038. + This avoids some year-2038 glitches introduced in 2013g. + (Thanks to Yoshito Umaoka for reporting the problem.) + + Changes affecting API + + The 'tzselect' command no longer requires the 'select' command, + and should now work with /bin/sh on more platforms. It also works + around a bug in BusyBox awk before version 1.21.0. (Thanks to + Patrick 'P. J.' McDermott and Alan Barrett.) + + Changes affecting code + + Fix localtime overflow bugs with 32-bit unsigned time_t. + + zdump no longer assumes sscanf returns maximal values on overflow. + + Changes affecting the build procedure + + The builder can specify which programs to use, if any, instead of + 'ar' and 'ranlib', and libtz.a is now built locally before being + installed. (Thanks to Michael Forney.) + + A dependency typo in the 'zdump' rule has been fixed. + (Thanks to Andrew Paprocki.) + + The Makefile has been simplified by assuming that 'mkdir -p' and 'cp -f' + work as specified by POSIX.2-1992 or later; this is portable nowadays. + + 'make clean' no longer removes 'leapseconds', since it's + host-independent and is part of the distribution. + + The unused makefile macros TZCSRCS, TZDSRCS, DATESRCS have been removed. + + Changes affecting documentation and commentary + + tz-link.htm now mentions TC TIMEZONE's draft time zone service protocol + (thanks to Mike Douglass) and TimezoneJS.Date (thanks to Jim Fehrle). + + Update URLs in tz-link page. Add URLs for Microsoft Windows, since + 8.1 introduces tz support. Remove URLs for Tru64 and UnixWare (no + longer maintained) and for old advisories. SOFA now does C. + +Release 2013g - 2013-09-30 21:08:26 -0700 + + Changes affecting current and near-future time stamps + + Morocco now observes DST from the last Sunday in March to the last + Sunday in October, not April to September respectively. (Thanks + to Steffen Thorsen.) + + Changes affecting 'zic' + + 'zic' now runs on platforms that lack both hard links and symlinks. + (Thanks to Theo Veenker for reporting the problem, for MinGW.) + Also, fix some bugs on platforms that lack hard links but have symlinks. + + 'zic -v' again warns that Asia/Tehran has no POSIX environment variable + to predict the far future, fixing a bug introduced in 2013e. + + Changes affecting the build procedure + + The 'leapseconds' file is again put into the tzdata tarball. + Also, 'leapseconds.awk', so tzdata is self-contained. (Thanks to + Matt Burgess and Ian Abbott.) The timestamps of these and other + dependent files in tarballs are adjusted more consistently. + + Changes affecting documentation and commentary + + The README file is now part of the data tarball as well as the code. + It now states that files are public domain unless otherwise specified. + (Thanks to Andrew Main (Zefram) for asking for clarifications.) + Its details about the 1989 release moved to a place of honor near + the end of NEWS. + + +Release 2013f - 2013-09-24 23:37:36 -0700 + + Changes affecting near-future time stamps + + Tocantins will very likely not observe DST starting this spring. + (Thanks to Steffen Thorsen.) + + Jordan will likely stay at UTC+3 indefinitely, and will not fall + back this fall. + + Palestine will fall back at 00:00, not 01:00. (Thanks to Steffen Thorsen.) + + Changes affecting API + + The types of the global variables 'timezone' and 'altzone' (if present) + have been changed back to 'long'. This is required for 'timezone' + by POSIX, and for 'altzone' by common practice, e.g., Solaris 11. + These variables were originally 'long' in the tz code, but were + mistakenly changed to 'time_t' in 1987; nobody reported the + incompatibility until now. The difference matters on x32, where + 'long' is 32 bits and 'time_t' is 64. (Thanks to Elliott Hughes.) + + Changes affecting the build procedure + + Avoid long strings in leapseconds.awk to work around a mawk bug. + (Thanks to Cyril Baurand.) + + Changes affecting documentation and commentary + + New file 'NEWS' that contains release notes like this one. + + Paraguay's law does not specify DST transition time; 00:00 is customary. + (Thanks to Waldemar Villamayor-Venialbo.) + + Minor capitalization fixes. + + Changes affecting version-control only + + The experimental GitHub repository now contains annotated and + signed tags for recent releases, e.g., '2013e' for Release 2013e. + Releases are tagged starting with 2012e; earlier releases were + done differently, and tags would either not have a simple name or + not exactly match what was released. + + 'make set-timestamps' is now simpler and a bit more portable. + + +Release 2013e - 2013-09-19 23:50:04 -0700 + + Changes affecting near-future time stamps + + This year Fiji will start DST on October 27, not October 20. + (Thanks to David Wheeler for the heads-up.) For now, guess that + Fiji will continue to spring forward the Sunday before the fourth + Monday in October. + + Changes affecting current and future time zone abbreviations + + Use WIB/WITA/WIT rather than WIT/CIT/EIT for alphabetic Indonesian + time zone abbreviations since 1932. (Thanks to George Ziegler, + Priyadi Iman Nurcahyo, Zakaria, Jason Grimes, Martin Pitt, and + Benny Lin.) This affects Asia/Dili, Asia/Jakarta, Asia/Jayapura, + Asia/Makassar, and Asia/Pontianak. + + Use ART (UTC-3, standard time), rather than WARST (also UTC-3, but + daylight saving time) for San Luis, Argentina since 2009. + + Changes affecting Godthåb time stamps after 2037 if version mismatch + + Allow POSIX-like TZ strings where the transition time's hour can + range from -167 through 167, instead of the POSIX-required 0 + through 24. E.g., TZ='FJT-12FJST,M10.3.1/146,M1.3.4/75' for the + new Fiji rules. This is a more-compact way to represent + far-future time stamps for America/Godthab, America/Santiago, + Antarctica/Palmer, Asia/Gaza, Asia/Hebron, Asia/Jerusalem, + Pacific/Easter, and Pacific/Fiji. Other zones are unaffected by + this change. (Derived from a suggestion by Arthur David Olson.) + + Allow POSIX-like TZ strings where daylight saving time is in + effect all year. E.g., TZ='WART4WARST,J1/0,J365/25' for Western + Argentina Summer Time all year. This supports a more-compact way + to represent the 2013d data for America/Argentina/San_Luis. + Because of the change for San Luis noted above this change does not + affect the current data. (Thanks to Andrew Main (Zefram) for + suggestions that improved this change.) + + Where these two TZ changes take effect, there is a minor extension + to the tz file format in that it allows new values for the + embedded TZ-format string, and the tz file format version number + has therefore been increased from 2 to 3 as a precaution. + Version-2-based client code should continue to work as before for + all time stamps before 2038. Existing version-2-based client code + (tzcode, GNU/Linux, Solaris) has been tested on version-3-format + files, and typically works in practice even for time stamps after + 2037; the only known exception is America/Godthab. + + Changes affecting time stamps before 1970 + + Pacific/Johnston is now a link to Pacific/Honolulu. This corrects + some errors before 1947. + + Some zones have been turned into links, when they differ from existing + zones only in older data entries that were likely invented or that + differ only in LMT or transitions from LMT. These changes affect + only time stamps before 1943. The affected zones are: + Africa/Juba, America/Anguilla, America/Aruba, America/Dominica, + America/Grenada, America/Guadeloupe, America/Marigot, + America/Montserrat, America/St_Barthelemy, America/St_Kitts, + America/St_Lucia, America/St_Thomas, America/St_Vincent, + America/Tortola, and Europe/Vaduz. (Thanks to Alois Treindl for + confirming that the old Europe/Vaduz zone was wrong and the new + link is better for WWII-era times.) + + Change Kingston Mean Time from -5:07:12 to -5:07:11. This affects + America/Cayman, America/Jamaica and America/Grand_Turk time stamps + from 1890 to 1912. + + Change the UT offset of Bern Mean Time from 0:29:44 to 0:29:46. + This affects Europe/Zurich time stamps from 1853 to 1894. (Thanks + to Alois Treindl). + + Change the date of the circa-1850 Zurich transition from 1849-09-12 + to 1853-07-16, overriding Shanks with data from Messerli about + postal and telegraph time in Switzerland. + + Changes affecting time zone abbreviations before 1970 + + For Asia/Jakarta, use BMT (not JMT) for mean time from 1923 to 1932, + as Jakarta was called Batavia back then. + + Changes affecting API + + The 'zic' command now outputs a dummy transition when far-future + data can't be summarized using a TZ string, and uses a 402-year + window rather than a 400-year window. For the current data, this + affects only the Asia/Tehran file. It does not affect any of the + time stamps that this file represents, so zdump outputs the same + information as before. (Thanks to Andrew Main (Zefram).) + + The 'date' command has a new '-r' option, which lets you specify + the integer time to display, a la FreeBSD. + + The 'tzselect' command has two new options '-c' and '-n', which lets you + select a zone based on latitude and longitude. + + The 'zic' command's '-v' option now warns about constructs that + require the new version-3 binary file format. (Thanks to Arthur + David Olson for the suggestion.) + + Support for floating-point time_t has been removed. + It was always dicey, and POSIX no longer requires it. + (Thanks to Eric Blake for suggesting to the POSIX committee to + remove it, and thanks to Alan Barrett, Clive D.W. Feather, Andy + Heninger, Arthur David Olson, and Alois Treindl, for reporting + bugs and elucidating some of the corners of the old floating-point + implementation.) + + The signatures of 'offtime', 'timeoff', and 'gtime' have been + changed back to the old practice of using 'long' to represent UT + offsets. This had been inadvertently and mistakenly changed to + 'int_fast32_t'. (Thanks to Christos Zoulas.) + + The code avoids undefined behavior on integer overflow in some + more places, including gmtime, localtime, mktime and zdump. + + Changes affecting the zdump utility + + zdump now outputs "UT" when referring to Universal Time, not "UTC". + "UTC" does not make sense for time stamps that predate the introduction + of UTC, whereas "UT", a more-generic term, does. (Thanks to Steve Allen + for clarifying UT vs UTC.) + + Data changes affecting behavior of tzselect and similar programs + + Country code BQ is now called the more-common name "Caribbean Netherlands" + rather than the more-official "Bonaire, St Eustatius & Saba". + + Remove from zone.tab the names America/Montreal, America/Shiprock, + and Antarctica/South_Pole, as they are equivalent to existing + same-country-code zones for post-1970 time stamps. The data entries for + these names are unchanged, so the names continue to work as before. + + Changes affecting code internals + + zic -c now runs way faster on 64-bit hosts when given large numbers. + + zic now uses vfprintf to avoid allocating and freeing some memory. + + tzselect now computes the list of continents from the data, + rather than have it hard-coded. + + Minor changes pacify GCC 4.7.3 and GCC 4.8.1. + + Changes affecting the build procedure + + The 'leapseconds' file is now generated automatically from a + new file 'leap-seconds.list', which is a copy of + <ftp://time.nist.gov/pub/leap-seconds.list>. + A new source file 'leapseconds.awk' implements this. + The goal is simplification of the future maintenance of 'leapseconds'. + + When building the 'posix' or 'right' subdirectories, if the + subdirectory would be a copy of the default subdirectory, it is + now made a symbolic link if that is supported. This saves about + 2 MB of file system space. + + The links America/Shiprock and Antarctica/South_Pole have been + moved to the 'backward' file. This affects only nondefault builds + that omit 'backward'. + + Changes affecting version-control only + + .gitignore now ignores 'date'. + + Changes affecting documentation and commentary + + Changes to the 'tzfile' man page + + It now mentions that the binary file format may be extended in + future versions by appending data. + + It now refers to the 'zdump' and 'zic' man pages. + + Changes to the 'zic' man page + + It lists conditions that elicit a warning with '-v'. + + It says that the behavior is unspecified when duplicate names + are given, or if the source of one link is the target of another. + + Its examples are updated to match the latest data. + + The definition of white space has been clarified slightly. + (Thanks to Michael Deckers.) + + Changes to the 'Theory' file + + There is a new section about the accuracy of the tz database, + describing the many ways that errors can creep in, and + explaining why so many of the pre-1970 time stamps are wrong or + misleading (thanks to Steve Allen, Lester Caine, and Garrett + Wollman for discussions that contributed to this). + + The 'Theory' file describes LMT better (this follows a + suggestion by Guy Harris). + + It refers to the 2013 edition of POSIX rather than the 2004 edition. + + It's mentioned that excluding 'backward' should not affect the + other data, and it suggests at least one zone.tab name per + inhabited country (thanks to Stephen Colebourne). + + Some longstanding restrictions on names are documented, e.g., + 'America/New_York' precludes 'America/New_York/Bronx'. + + It gives more reasons for the 1970 cutoff. + + It now mentions which time_t variants are supported, such as + signed integer time_t. (Thanks to Paul Goyette for reporting + typos in an experimental version of this change.) + + (Thanks to Philip Newton for correcting typos in these changes.) + + Documentation and commentary is more careful to distinguish UT in + general from UTC in particular. (Thanks to Steve Allen.) + + Add a better source for the Zurich 1894 transition. + (Thanks to Pierre-Yves Berger.) + + Update shapefile citations in tz-link.htm. (Thanks to Guy Harris.) + + +Release 2013d - 2013-07-05 07:38:01 -0700 + + Changes affecting future time stamps: + + Morocco's midsummer transitions this year are July 7 and August 10, + not July 9 and August 8. (Thanks to Andrew Paprocki.) + + Israel now falls back on the last Sunday of October. + (Thanks to Ephraim Silverberg.) + + Changes affecting past time stamps: + + Specify Jerusalem's location more precisely; this changes the pre-1880 + times by 2 s. + + Changing affecting metadata only: + + Fix typos in the entries for country codes BQ and SX. + + Changes affecting code: + + Rework the code to fix a bug with handling Australia/Macquarie on + 32-bit hosts (thanks to Arthur David Olson). + + Port to platforms like NetBSD, where time_t can be wider than long. + + Add support for testing time_t types other than the system's. + Run 'make check_time_t_alternatives' to try this out. + Currently, the tests fail for unsigned time_t; + this should get fixed at some point. + + Changes affecting documentation and commentary: + + Deemphasize the significance of national borders. + + Update the zdump man page. + + Remove obsolete NOID comment (thanks to Denis Excoffier). + + Update several URLs and comments in the web pages. + + Spelling fixes (thanks to Kevin Lyda and Jonathan Leffler). + + Update URL for CLDR Zone->Tzid table (thanks to Yoshito Umaoka). + + +Release 2013c - 2013-04-19 16:17:40 -0700 + + Changes affecting current and future time stamps: + + Palestine observed DST starting March 29, 2013. (Thanks to + Steffen Thorsen.) From 2013 on, Gaza and Hebron both observe DST, + with the predicted rules being the last Thursday in March at 24:00 + to the first Friday on or after September 21 at 01:00. + + Assume that the recent change to Paraguay's DST rules is permanent, + by moving the end of DST to the 4th Sunday in March every year. + (Thanks to Carlos Raúl Perasso.) + + Changes affecting past time stamps: + + Fix some historical data for Palestine to agree with that of + timeanddate.com, as follows: + + The spring 2008 change in Gaza and Hebron was on 00:00 Mar 28, not + 00:00 Apr 1. + + The fall 2009 change in Gaza and Hebron on Sep 4 was at 01:00, not + 02:00. + + The spring 2010 change in Hebron was 00:00 Mar 26, not 00:01 Mar 27. + + The spring 2011 change in Gaza was 00:01 Apr 1, not 12:01 Apr 2. + + The spring 2011 change in Hebron on Apr 1 was at 00:01, not 12:01. + + The fall 2011 change in Hebron on Sep 30 was at 00:00, not 03:00. + + Fix times of habitation for Macquarie to agree with the Tasmania + Parks & Wildlife Service history, which indicates that permanent + habitation was 1899-1919 and 1948 on. + + Changing affecting metadata only: + + Macquarie Island is politically part of Australia, not Antarctica. + (Thanks to Tobias Conradi.) + + Sort Macquarie more-consistently with other parts of Australia. + (Thanks to Tim Parenti.) + + +Release 2013b - 2013-03-10 22:33:40 -0700 + + Changes affecting current and future time stamps: + + Haiti uses US daylight-saving rules this year, and presumably future years. + This changes time stamps starting today. (Thanks to Steffen Thorsen.) + + Paraguay will end DST on March 24 this year. + (Thanks to Steffen Thorsen.) For now, assume it's just this year. + + Morocco does not observe DST during Ramadan; + try to predict Ramadan in Morocco as best we can. + (Thanks to Erik Homoet for the heads-up.) + + Changes affecting commentary: + + Update URLs in tz-link page. Add URLs for webOS, BB10, iOS. + Update URL for Solaris. Mention Internet RFC 6557. + Update Internet RFCs 2445->5545, 2822->5322. + Switch from FTP to HTTP for Internet RFCs. + + +Release 2013a - 2013-02-27 09:20:35 -0800 + + Change affecting binary data format: + + The zone offset at the end of version-2-format zone files is now + allowed to be 24:00, as per POSIX.1-2008. (Thanks to Arthur David Olson.) + + Changes affecting current and future time stamps: + + Chile's 2013 rules, and we guess rules for 2014 and later, will be + the same as 2012, namely Apr Sun>=23 03:00 UTC to Sep Sun>=2 04:00 UTC. + (Thanks to Steffen Thorsen and Robert Elz.) + + New Zones Asia/Khandyga, Asia/Ust-Nera, Europe/Busingen. + (Thanks to Tobias Conradi and Arthur David Olson.) + + Many changes affect historical time stamps before 1940. + These were deduced from: Milne J. Civil time. Geogr J. 1899 + Feb;13(2):173-94 <http://www.jstor.org/stable/1774359>. + + Changes affecting the code: + + Fix zic bug that mishandled Egypt's 2010 changes (this also affected + the data). (Thanks to Arthur David Olson.) + + Fix localtime bug when time_t is unsigned and data files were generated + by a signed time_t system. (Thanks to Doug Bailey for reporting and + to Arthur David Olson for fixing.) + + Allow the email address for bug reports to be set by the packager. + The default is tz@iana.org, as before. (Thanks to Joseph S. Myers.) + + Update HTML checking to be compatible with Ubuntu 12.10. + + Check that files are a safe subset of ASCII. At some point we may + relax this requirement to a safe subset of UTF-8. Without the + check, some non-UTF-8 encodings were leaking into the distribution. + + Commentary changes: + + Restore a comment about copyright notices that was inadvertently deleted. + (Thanks to Arthur David Olson.) + + Improve the commentary about which districts observe what times + in Russia. (Thanks to Oscar van Vlijmen and Arthur David Olson). + + Add web page links to tz.js. + + Add "Run by the Monkeys" to tz-art. (Thanks to Arthur David Olson.) + + +Release 2012j - 2012-11-12 18:34:49 -0800 + + Libya moved to CET this weekend, but with DST planned next year. + (Thanks to Even Scharning, Steffen Thorsen, and Tim Parenti.) + + Signatures now have the extension .asc, not .sign, as that's more + standard. (Thanks to Phil Pennock.) + + The output of 'zdump --version', and of 'zic --version', now + uses a format that is more typical for --version. + (Thanks to Joseph S. Myers.) + + The output of 'tzselect --help', 'zdump --help', and 'zic --help' + now uses tz@iana.org rather than the old elsie address. + + zic -v now complains about abbreviations that are less than 3 + or more than 6 characters, as per Posix. Formerly, it checked + for abbreviations that were more than 3. + + 'make public' no longer puts its temporary directory under /tmp, + and uses the just-built zic rather than the system zic. + + Various fixes to documentation and commentary. + + +Release 2012i - 2012-11-03 12:57:09 -0700 + + Cuba switches from DST tomorrow at 01:00. (Thanks to Steffen Thorsen.) + + Linker flags can now be specified via LDFLAGS. + AWK now defaults to 'awk', not 'nawk'. + The shell in tzselect now defaults to /bin/bash, but this can + be overridden by specifying KSHELL. + The main web page now mentions the unofficial GitHub repository. + (Thanks to Mike Frysinger.) + + Tarball signatures can now be built by running 'make signatures'. + There are also new makefile rules 'tarballs', 'check_public', and + separate makefile rules for each tarball and signature file. + A few makefile rules are now more portable to strict POSIX. + + The main web page now lists the canonical IANA URL. + + +Release 2012h - 2012-10-26 22:49:10 -0700 + + Bahia no longer has DST. (Thanks to Kelley Cook.) + + Tocantins has DST. (Thanks to Rodrigo Severo.) + + Israel has new DST rules next year. (Thanks to Ephraim Silverberg.) + + Jordan stays on DST this winter. (Thanks to Steffen Thorsen.) + + Web page updates. + + More C modernization, except that at Arthur David Olson's suggestion + the instances of 'register' were kept. + + +Release 2012g - 2012-10-17 20:59:45 -0700 + + Samoa fall 2012 and later. (Thanks to Nicholas Pereira and Robert Elz.) + + Palestine fall 2012. (Thanks to Steffen Thorsen.) + + Assume C89. + + To attack the version-number problem, this release ships the file + 'Makefile' (which contains the release number) in both the tzcode and + the tzdata tarballs. The two Makefiles are identical, and should be + identical in any matching pair of tarballs, so it shouldn't matter + which order you extract the tarballs. Perhaps we can come up with a + better version-number scheme at some point; this scheme does have the + virtue of not adding more files. + + +Release 2012f - 2012-09-12 23:17:03 -0700 + + * australasia (Pacific/Fiji): Fiji DST is October 21 through January + 20 this year. (Thanks to Steffen Thorsen.) + + +Release 2012e - 2012-08-02 20:44:55 -0700 + + * australasia (Pacific/Fakaofo): Tokelau is UTC+13, not UTC+14. + (Thanks to Steffen Thorsen.) + + * Use a single version number for both code and data. + + * .gitignore: New file. + + * Remove trailing white space. + + +Release code2012c-data2012d - 2012-07-19 16:35:33 -0700 + + Changes for Morocco's time stamps, which take effect in a couple of + hours, along with infrastructure changes to accommodate how the tz + code and data are released on IANA. + + +Release data2012c - 2012-03-27 12:17:25 -0400 + + africa + Summer time changes for Morocco (to start late April 2012) + + asia + Changes for 2012 for Gaza & the West Bank (Hebron) and Syria + + northamerica + Haiti following US/Canada rules for 2012 (and we're assuming, + for now anyway, for the future). + + +Release 2012b - 2012-03-02 12:29:15 +0700 + + There is just one change to tzcode2012b (compared with 2012a): + the Makefile that was accidentally included with 2012a has been + replaced with the version that should have been there, which is + identical with the previous version (from tzcode2011i). + + There are just two changes in tzdata2012b compared with 2012a. + + Most significantly, summer time in Cuba has been delayed 3 weeks + (now starts April 1 rather than March 11). Since Mar 11 (the old start + date, as listed in 2012a) is just a little over a week away, this + change is urgent. + + Less importantly, an excess tab in one of the changes in zone.tab + in 2012a has been removed. + + +Release 2012a - 2012-03-01 18:28:10 +0700 + + The changes in tzcode2012a (compared to the previous version, 2011i) + are entirely to the README and tz-art.htm and tz-link.htm files, if + none of those concern you, you can ignore the code update. The changes + reflect the changed addresses for the mailing list and the code and + data distribution points & methods (and a link to DateTime::TimeZone::Tzfile + has been added to tz-link.htm). + + In tzdata2012a (compared to the previous release, which was 2011n) + the major changes are: + Chile 2011/2012 and 2012/2013 summer time date adjustments. + Falkland Islands onto permanent summer time (we're assuming for the + foreseeable future, though 2012 is all we're fairly certain of.) + Armenia has abolished Summer Time. + Tokelau jumped the International Date Line back last December + (just the same as their near neighbour, Samoa). + America/Creston is a new zone for a small area of British Columbia + There will be a leapsecond 2012-06-30 23:59:60 UTC. + + Other minor changes are: + Corrections to 1918 Canadian summer time end dates. + Updated URL for UK time zone history (in comments) + A few typos in Le Corre's list of free French place names (comments) + + +Release data2011n - 2011-10-30 14:57:54 +0700 + + There are three changes of note - most urgently, Cuba (America/Havana) + has extended summer time by two weeks, now to end on Nov 13, rather than + the (already past) Oct 30. Second, the Pridnestrovian Moldavian Republic + (Europe/Tiraspol) decided not to split from the rest of Moldova after + all, and consequently that zone has been removed (again) and reinstated + in the "backward" file as a link to Europe/Chisinau. And third, the + end date for Fiji's summer time this summer was moved forward from the + earlier planned Feb 26, to Jan 22. + + Apart from that, Moldova (MD) returns to a single entry in zone.tab + (and the incorrect syntax that was in the 2011m version of that file + is so fixed - it would have been fixed in a different way had this + change not happened - that's the "missing" sccs version id). + + +Release data2011m - 2011-10-24 21:42:16 +0700 + + In particular, the typos in comments in the data (2011-11-17 should have + been 2011-10-17 as Alan Barrett noted, and spelling of Tiraspol that + Tim Parenti noted) have been fixed, and the change for Ukraine has been + made in all 4 Ukrainian zones, rather than just Kiev (again, thanks to + Tim Parenti, and also Denys Gavrysh) + + In addition, I added Europe/Tiraspol to zone.tab. + + This time, all the files have new version numbers... (including the files + otherwise unchanged in 2011m that were changed in 2011l but didn't get new + version numbers there...) + + +Release data2011l - 2011-10-10 11:15:43 +0700 + + There are just 2 changes that cause different generated tzdata files from + zic, to Asia/Hebron and Pacific/Fiji - the possible change for Bahia, Brazil + is included, but commented out. Compared with the diff I sent out last week, + this version also includes attributions for the sources for the changes + (in much the same format as ado used, but the html tags have not been + checked, verified, or used in any way at all, so if there are errors there, + please let me know.) + + +Release data2011k - 2011-09-20 17:54:03 -0400 + + [not summarized] + + +Release data2011j - 2011-09-12 09:22:49 -0400 + + (contemporary changes for Samoa; past changes for Kenya, Uganda, and + Tanzania); there are also two spelling corrections to comments in + the australasia file (with thanks to Christos Zoulas). + + +Release 2011i - 2011-08-29 05:56:32 -0400 + + [not summarized] + + +Release data2011h - 2011-06-15 18:41:48 -0400 + + Russia and Curaçao changes + + +Release 2011g - 2011-04-25 09:07:22 -0400 + + update the rules for Egypt to reflect its abandonment of DST this year + + +Release 2011f - 2011-04-06 17:14:53 -0400 + + [not summarized] + + +Release 2011e - 2011-03-31 16:04:38 -0400 + + Morocco, Chile, and tz-link changes + + +Release 2011d - 2011-03-14 09:18:01 -0400 + + changes that impact present-day time stamps in Cuba, Samoa, and Turkey + + +Release 2011c - 2011-03-07 09:30:09 -0500 + + These do affect current time stamps in Chile and Annette Island, Canada. + + +Release 2011b - 2011-02-07 08:44:50 -0500 + + [not summarized] + + +Release 2011a - 2011-01-24 10:30:16 -0500 + + [not summarized] + + +Release data2010o - 2010-11-01 09:18:23 -0400 + + change to the end of DST in Fiji in 2011 + + +Release 2010n - 2010-10-25 08:19:17 -0400 + + [not summarized] + + +Release 2010m - 2010-09-27 09:24:48 -0400 + + Hong Kong, Vostok, and zic.c changes + + +Release 2010l - 2010-08-16 06:57:25 -0400 + + [not summarized] + + +Release 2010k - 2010-07-26 10:42:27 -0400 + + [not summarized] + + +Release 2010j - 2010-05-10 09:07:48 -0400 + + changes for Bahía de Banderas and for version naming + + +Release data2010i - 2010-04-16 18:50:45 -0400 + + the end of DST in Morocco on 2010-08-08 + + +Release data2010h - 2010-04-05 09:58:56 -0400 + + [not summarized] + + +Release data2010g - 2010-03-24 11:14:53 -0400 + + [not summarized] + + +Release 2010f - 2010-03-22 09:45:46 -0400 + + [not summarized] + + +Release data2010e - 2010-03-08 14:24:27 -0500 + + corrects the Dhaka bug found by Danvin Ruangchan + + +Release data2010d - 2010-03-06 07:26:01 -0500 + + [not summarized] + + +Release 2010c - 2010-03-01 09:20:58 -0500 + + changes including KRE's suggestion for earlier initialization of + "goahead" and "goback" structure elements + + +Release code2010a - 2010-02-16 10:40:04 -0500 + + [not summarized] + + +Release data2010b - 2010-01-20 12:37:01 -0500 + + Mexico changes + + +Release data2010a - 2010-01-18 08:30:04 -0500 + + changes to Dhaka + + +Release data2009u - 2009-12-26 08:32:28 -0500 + + changes to DST in Bangladesh + + +Release 2009t - 2009-12-21 13:24:27 -0500 + + [not summarized] + + +Release data2009s - 2009-11-14 10:26:32 -0500 + + (cosmetic) Antarctica change and the DST-in-Fiji-in-2009-and-2010 change + + +Release 2009r - 2009-11-09 10:10:31 -0500 + + "antarctica" and "tz-link.htm" changes + + +Release 2009q - 2009-11-02 09:12:40 -0500 + + with two corrections as reported by Eric Muller and Philip Newton + + +Release data2009p - 2009-10-23 15:05:27 -0400 + + Argentina (including San Luis) changes (with the correction from + Mariano Absatz) + + +Release data2009o - 2009-10-14 16:49:38 -0400 + + Samoa (commentary only), Pakistan, and Bangladesh changes + + +Release data2009n - 2009-09-22 15:13:38 -0400 + + added commentary for Argentina and a change to the end of DST in + 2009 in Pakistan + + +Release data2009m - 2009-09-03 10:23:43 -0400 + + Samoa and Palestine changes + + +Release data2009l - 2009-08-14 09:13:07 -0400 + + Samoa (comments only) and Egypt + + +Release 2009k - 2009-07-20 09:46:08 -0400 + + [not summarized] + + +Release data2009j - 2009-06-15 06:43:59 -0400 + + Bangladesh change (with a short turnaround since the DST change is + impending) + + +Release 2009i - 2009-06-08 09:21:22 -0400 + + updating for DST in Bangladesh this year + + +Release 2009h - 2009-05-26 09:19:14 -0400 + + [not summarized] + + +Release data2009g - 2009-04-20 16:34:07 -0400 + + Cairo + + +Release data2009f - 2009-04-10 11:00:52 -0400 + + correct DST in Pakistan + + +Release 2009e - 2009-04-06 09:08:11 -0400 + + [not summarized] + + +Release 2009d - 2009-03-23 09:38:12 -0400 + + Morocco, Tunisia, Argentina, and American Astronomical Society changes + + +Release data2009c - 2009-03-16 09:47:51 -0400 + + change to the start of Cuban DST + + +Release 2009b - 2009-02-09 11:15:22 -0500 + + [not summarized] + + +Release 2009a - 2009-01-21 10:09:39 -0500 + + [not summarized] + + +Release data2008i - 2008-10-21 12:10:25 -0400 + + southamerica and zone.tab files, with Argentina DST rule changes and + United States zone reordering and recommenting + + +Release 2008h - 2008-10-13 07:33:56 -0400 + + [not summarized] + + +Release 2008g - 2008-10-06 09:03:18 -0400 + + Fix a broken HTML anchor and update Brazil's DST transitions; + there's also a slight reordering of information in tz-art.htm. + + +Release data2008f - 2008-09-09 22:33:26 -0400 + + [not summarized] + + +Release 2008e - 2008-07-28 14:11:17 -0400 + + changes by Arthur David Olson and Jesper Nørgaard Welen + + +Release data2008d - 2008-07-07 09:51:38 -0400 + + changes by Arthur David Olson, Paul Eggert, and Rodrigo Severo + + +Release data2008c - 2008-05-19 17:48:03 -0400 + + Pakistan, Morocco, and Mongolia + + +Release data2008b - 2008-03-24 08:30:59 -0400 + + including renaming Asia/Calcutta to Asia/Kolkata, with a backward + link provided + + +Release 2008a - 2008-03-08 05:42:16 -0500 + + [not summarized] + + +Release 2007k - 2007-12-31 10:25:22 -0500 + + most importantly, changes to the "southamerica" file based on + Argentina's readoption of daylight saving time + + +Release 2007j - 2007-12-03 09:51:01 -0500 + + 1. eliminate the "P" (parameter) macro; + + 2. the "noncontroversial" changes circulated on the time zone + mailing list (less the changes to "logwtmp.c"); + + 3. eliminate "too many transition" errors when "min" is used in time + zone rules; + + 4. changes by Paul Eggert (including updated information for Venezuela). + + +Release data2007i - 2007-10-30 10:28:11 -0400 + + changes for Cuba and Syria + + +Release 2007h - 2007-10-01 10:05:51 -0400 + + changes by Paul Eggert, as well as an updated link to the ICU + project in tz-link.htm + + +Release 2007g - 2007-08-20 10:47:59 -0400 + + changes by Paul Eggert + + The "leapseconds" file has been updated to incorporate the most + recent International Earth Rotation and Reference Systems Service + (IERS) bulletin. + + There's an addition to tz-art.htm regarding the television show "Medium". + + +Release 2007f - 2007-05-07 10:46:46 -0400 + + changes by Paul Eggert (including Haiti, Turks and Caicos, and New + Zealand) + + changes to zic.c to allow hour values greater than 24 (along with + Paul's improved time value overflow checking) + + +Release 2007e - 2007-04-02 10:11:52 -0400 + + Syria and Honduras changes by Paul Eggert + + zic.c variable renaming changes by Arthur David Olson + + +Release 2007d - 2007-03-20 08:48:30 -0400 + + changes by Paul Eggert + + the elimination of white space at the ends of lines + + +Release 2007c - 2007-02-26 09:09:37 -0500 + + changes by Paul Eggert + + +Release 2007b - 2007-02-12 09:34:20 -0500 + + Paul Eggert's proposed change to the quotation handling logic in zic.c. + + changes to the commentary in "leapseconds" reflecting the IERS + announcement that there is to be no positive leap second at the end + of June 2007. + + +Release 2007a - 2007-01-08 12:28:29 -0500 + + changes by Paul Eggert + + Derick Rethan's Asmara change + + Oscar van Vlijmen's Easter Island local mean time change + + symbolic link changes + + +Release 2006p - 2006-11-27 08:54:27 -0500 + + changes by Paul Eggert + + +Release 2006o - 2006-11-06 09:18:07 -0500 + + changes by Paul Eggert + + +Release 2006n - 2006-10-10 11:32:06 -0400 + + changes by Paul Eggert + + +Release 2006m - 2006-10-02 15:32:35 -0400 + + changes for Uruguay, Palestine, and Egypt by Paul Eggert + + (minimalist) changes to zic.8 to clarify "until" information + + +Release data2006l - 2006-09-18 12:58:11 -0400 + + Paul's best-effort work on this coming weekend's Egypt time change + + +Release 2006k - 2006-08-28 12:19:09 -0400 + + changes by Paul Eggert + + +Release 2006j - 2006-08-21 09:56:32 -0400 + + changes by Paul Eggert + + +Release code2006i - 2006-08-07 12:30:55 -0400 + + localtime.c fixes + + Ken Pizzini's conversion script + + +Release code2006h - 2006-07-24 09:19:37 -0400 + + adds public domain notices to four files + + includes a fix for transition times being off by a second + + adds a new recording to the "arts" file (information courtesy Colin Bowern) + + +Release 2006g - 2006-05-08 17:18:09 -0400 + + northamerica changes by Paul Eggert + + +Release 2006f - 2006-05-01 11:46:00 -0400 + + a missing version number problem is fixed (with thanks to Bradley + White for catching the problem) + + +Release 2006d - 2006-04-17 14:33:43 -0400 + + changes by Paul Eggert + + added new items to tz-arts.htm that were found by Paul + + +Release 2006c - 2006-04-03 10:09:32 -0400 + + two sets of data changes by Paul Eggert + + a fencepost error fix in zic.c + + changes to zic.c and the "europe" file to minimize differences + between output produced by the old 32-bit zic and the new 64-bit + version + + +Release 2006b - 2006-02-20 10:08:18 -0500 + [tz32code2006b + tz64code2006b + tzdata2006b] + + 64-bit code + + All SCCS IDs were bumped to "8.1" for this release. + + +Release 2006a - 2006-01-30 08:59:31 -0500 + + changes by Paul Eggert (in particular, Indiana time zone moves) + + an addition to the zic manual page to describe how special-case + transitions are handled + + +Release 2005r - 2005-12-27 09:27:13 -0500 + + Canadian changes by Paul Eggert + + They also add "<pre>" directives to time zone data files and reflect + changes to warning message logic in "zdump.c" (but with calls to + "gettext" kept unbundled at the suggestion of Ken Pizzini). + + +Release 2005q - 2005-12-13 09:17:09 -0500 + + Nothing earth-shaking here: + 1. Electronic mail addresses have been removed. + 2. Casts of the return value of exit have been removed. + 3. Casts of the argument of is.* macros have been added. + 4. Indentation in one section of zic.c has been fixed. + 5. References to dead URLs in the data files have been dealt with. + + +Release 2005p - 2005-12-05 10:30:53 -0500 + + "systemv", "tz-link.htm", and "zdump.c" changes + (less the casts of arguments to the is* macros) + + +Release 2005o - 2005-11-28 10:55:26 -0500 + + Georgia, Cuba, Nicaragua, and Jordan changes by Paul Eggert + + zdump.c lint fixes by Arthur David Olson + + +Release 2005n - 2005-10-03 09:44:09 -0400 + + changes by Paul Eggert (both the Uruguay changes and the Kyrgyzstan + et al. changes) + + +Release 2005m - 2005-08-29 12:15:40 -0400 + + changes by Paul Eggert (with a small tweak to the tz-art change) + + a declaration of an unused variable has been removed from zdump.c + + +Release 2005l - 2005-08-22 12:06:39 -0400 + + changes by Paul Eggert + + overflow/underflow checks by Arthur David Olson, minus changes to + the "Theory" file about the pending addition of 64-bit data (I grow + less confident of the changes being accepted with each passing day, + and the changes no longer increase the data files nine-fold--there's + less than a doubling in size by my local Sun's reckoning) + + +Release 2005k - 2005-07-14 14:14:24 -0400 + + The "leapseconds" file has been edited to reflect the recently + announced leap second at the end of 2005. + + I've also deleted electronic mail addresses from the files as an + anti-spam measure. + + +Release 2005j - 2005-06-13 14:34:13 -0400 + + These reflect changes to limit the length of time zone abbreviations + and the characters used in those abbreviations. + + There are also changes to handle POSIX-style "quoted" time zone + environment variables. + + The changes were circulated on the time zone mailing list; the only + change since then was the removal of a couple of minimum-length of + abbreviation checks. + + +Release data2005i - 2005-04-21 15:04:16 -0400 + + changes (most importantly to Nicaragua and Haiti) by Paul Eggert + + +Release 2005h - 2005-04-04 11:24:47 -0400 + + changes by Paul Eggert + + minor changes to Makefile and zdump.c to produce more useful output + when doing a "make typecheck" + + +Release 2005g - 2005-03-14 10:11:21 -0500 + + changes by Paul Eggert (a change to current DST rules in Uruguay and + an update to a link to time zone software) + + +Release 2005f - 2005-03-01 08:45:32 -0500 + + data and documentation changes by Paul Eggert + + +Release 2005e - 2005-02-10 15:59:44 -0500 + + [not summarized] + + +Release code2005d - 2005-01-31 09:21:47 -0500 + + make zic complain about links to links if the -v flag is used + + have "make public" do more code checking + + add an include to "localtime.c" for the benefit of gcc systems + + +Release 2005c - 2005-01-17 18:36:29 -0500 + + get better results when mktime runs on a system where time_t is double + + changes to the data files (most importantly to Paraguay) + + +Release 2005b - 2005-01-10 09:19:54 -0500 + + Get localtime and gmtime working on systems with exotic time_t types. + + Update the leap second commentary in the "leapseconds" file. + + +Release 2005a - 2005-01-01 13:13:44 -0500 + + [not summarized] + + +Release code2004i - 2004-12-14 13:42:58 -0500 + + Deal with systems where time_t is unsigned. + + +Release code2004h - 2004-12-07 11:40:18 -0500 + + 64-bit-time_t changes + + +Release 2004g - 2004-11-02 09:06:01 -0500 + + update to Cuba (taking effect this weekend) + + other changes by Paul Eggert + + correction of the spelling of Oslo + + changed versions of difftime.c and private.h + + +Release code2004f - 2004-10-21 10:25:22 -0400 + + Cope with wide-ranging tm_year values. + + +Release 2004e - 2004-10-11 14:47:21 -0400 + + Brazil/Argentina/Israel changes by Paul Eggert + + changes to tz-link.htm by Paul + + one small fix to Makefile + + +Release 2004d - 2004-09-22 08:27:29 -0400 + + Avoid overflow problems when TM_YEAR_BASE is added to an integer. + + +Release 2004c - 2004-08-11 12:06:26 -0400 + + asctime-related changes + + (variants of) some of the documentation changes suggested by Paul Eggert + + +Release 2004b - 2004-07-19 14:33:35 -0400 + + data changes by Paul Eggert - most importantly, updates for Argentina + + +Release 2004a - 2004-05-27 12:00:47 -0400 + + changes by Paul Eggert + + Handle DST transitions that occur at the end of a month in some + years but at the start of the following month in other years. + + Add a copy of the correspondence that's the basis for claims about + DST in the Navajo Nation. + + +Release 2003e - 2003-12-15 09:36:47 -0500 + + changes by Arthur David Olson (primarily code changes) + + changes by Paul Eggert (primarily data changes) + + minor changes to "Makefile" and "northamerica" (in the latter case, + optimization of the "Toronto" rules) + + +Release 2003d - 2003-10-06 09:34:44 -0400 + + changes by Paul Eggert + + +Release 2003c - 2003-09-16 10:47:05 -0400 + + Fix bad returns in zic.c's inleap function. + Thanks to Bradley White for catching the problem! + + +Release 2003b - 2003-09-16 07:13:44 -0400 + + Add a "--version" option (and documentation) to the zic and zdump commands. + + changes to overflow/underflow checking in zic + + a localtime typo fix. + + Update the leapseconds and tz-art.htm files. + + +Release 2003a - 2003-03-24 09:30:54 -0500 + + changes by Paul Eggert + + a few additions and modifications to the tz-art.htm file + + +Release 2002d - 2002-10-15 13:12:42 -0400 + + changes by Paul Eggert, less the "Britain (UK)" change in iso3166.tab + + There's also a new time zone quote in "tz-art.htm". + + +Release 2002c - 2002-04-04 11:55:20 -0500 + + changes by Paul Eggert + + Change zic.c to avoid creating symlinks to files that don't exist. + + +Release 2002b - 2002-01-28 12:56:03 -0500 + + [These change notes are for Release 2002a, which was corrupted. + 2002b was a corrected version of 2002a.] + + changes by Paul Eggert + + Update the "leapseconds" file to note that there'll be no leap + second at the end of June, 2002. + + Change "zic.c" to deal with a problem in handling the "Asia/Bishkek" zone. + + Change to "difftime.c" to avoid sizeof problems. + + +Release 2001d - 2001-10-09 13:31:32 -0400 + + changes by Paul Eggert + + +Release 2001c - 2001-06-05 13:59:55 -0400 + + changes by Paul Eggert and Andrew Brown + + +Release 2001b - 2001-04-05 16:44:38 -0400 + + changes by Paul Eggert (modulo jnorgard's typo fix) + + tz-art.htm has been HTMLified. + + +Release 2001a - 2001-03-13 12:57:44 -0500 + + changes by Paul Eggert + + An addition to the "leapseconds" file: comments with the text of the + latest IERS leap second notice. + + Trailing white space has been removed from data file lines, and + repeated spaces in "Rule Jordan" lines in the "asia" file have been + converted to tabs. + + +Release 2000h - 2000-12-14 15:33:38 -0500 + + changes by Paul Eggert + + one typo fix in the "art" file + + With providence, this is the last update of the millennium. + + +Release 2000g - 2000-10-10 11:35:22 -0400 + + changes by Paul Eggert + + correction of John Mackin's name submitted by Robert Elz + + Garry Shandling's Daylight Saving Time joke (!?!) from the recent + Emmy Awards broadcast. + + +Release 2000f - 2000-08-10 09:31:58 -0400 + + changes by Paul Eggert + + Added information in "tz-art.htm" on a Seinfeld reference to DST. + + Error checking and messages in the "yearistype" script have been + improved. + + +Release 2000e - 2000-07-31 09:27:54 -0400 + + data changes by Paul Eggert + + a change to the default value of the defined constant HAVE_STRERROR + + the addition of a Dave Barry quote on DST to the tz-arts file + + +Release 2000d - 2000-04-20 15:43:04 -0400 + + changes to the documentation and code of strftime for C99 conformance + + a bug fix for date.c + + These are based on (though modified from) changes by Paul Eggert. + + +Release 2000c - 2000-03-04 10:31:43 -0500 + + changes by Paul Eggert + + +Release 2000b - 2000-02-21 12:16:29 -0500 + + changes by Paul Eggert and Joseph Myers + + modest tweaks to the tz-art.htm and tz-link.htm files + + +Release 2000a - 2000-01-18 09:21:26 -0500 + + changes by Paul Eggert + + The two hypertext documents have also been renamed. + + +Release code1999i-data1999j - 1999-11-15 18:43:22 -0500 + + Paul Eggert's changes + + additions to the "zic" manual page and the "Arts.htm" file + + +Release code1999h-data1999i - 1999-11-08 14:55:21 -0500 + + [not summarized] + + +Release data1999h - 1999-10-07 03:50:29 -0400 + + changes by Paul Eggert to "europe" (most importantly, fixing + Lithuania and Estonia) + + +Release 1999g - 1999-09-28 11:06:18 -0400 + + data changes by Paul Eggert (most importantly, the change for + Lebanon that buys correctness for this coming Sunday) + + The "code" file contains changes to "Makefile" and "checktab.awk" to + allow better checking of time zone files before they are published. + + +Release 1999f - 1999-09-23 09:48:14 -0400 + + changes by Arthur David Olson and Paul Eggert + + +Release 1999e - 1999-08-17 15:20:54 -0400 + + changes circulated by Paul Eggert, although the change to handling + of DST-specifying time zone names has been commented out for now + (search for "XXX" in "localtime.c" for details). These files also + do not make any changes to the start of DST in Brazil. + + In addition to Paul's changes, there are updates to "Arts.htm" and + cleanups of URLs. + + +Release 1999d - 1999-03-30 11:31:07 -0500 + + changes by Paul Eggert + + The Makefile's "make public" rule has also been changed to do a test + compile of each individual time zone data file (which should help + avoid problems such as the one we had with Nicosia). + + +Release 1999c - 1999-03-25 09:47:47 -0500 + + changes by Paul Eggert, most importantly the change for Chile. + + +Release 1999b - 1999-02-01 17:51:44 -0500 + + changes by Paul Eggert + + code changes (suggested by Mani Varadarajan, mani at be.com) for + correct handling of symbolic links when building using a relative directory + + code changes to generate correct messages for failed links + + updates to the URLs in Arts.htm + + +Release 1999a - 1999-01-19 16:20:29 -0500 + + error message internationalizations and corrections in zic.c and + zdump.c (as suggested by Vladimir Michl, vladimir.michl at upol.cz, + to whom thanks!) + + +Release code1998h-data1998i - 1998-10-01 09:56:10 -0400 + + changes for Brazil, Chile, and Germany + + support for use of "24:00" in the input files for the time zone compiler + + +Release code1998g-data1998h - 1998-09-24 10:50:28 -0400 + + changes by Paul Eggert + + correction to a define in the "private.h" file + + +Release data1998g - 1998-08-11 03:28:35 -0000 + [tzdata1998g.tar.gz is missing!] + + Lithuanian change provided by mgedmin at pub.osf.it + + Move creation of the GMT link with Etc/GMT to "etcetera" (from + "backward") to ensure that the GMT file is created even where folks + don't want the "backward" links (as suggested by Paul Eggert). + + +Release data1998f - 1998-07-20 13:50:00 -0000 + [tzdata1998f.tar.gz is missing!] + + Update the "leapseconds" file to include the newly-announced + insertion at the end of 1998. + + +Release code1998f - 1998-06-01 10:18:31 -0400 + + addition to localtime.c by Guy Harris + + +Release 1998e - 1998-05-28 09:56:26 -0400 + + The Makefile is changed to produce zoneinfo-posix rather than + zoneinfo/posix, and to produce zoneinfo-leaps rather than + zoneinfo/right. + + data changes by Paul Eggert + + changes from Guy Harris to provide asctime_r and ctime_r + + A usno1998 file (substantially identical to usno1997) has been added. + + +Release 1998d - 1998-05-14 11:58:34 -0400 + + changes to comments (in particular, elimination of references to CIA maps). + "Arts.htm", "WWW.htm", "asia", and "australasia" are the only places + where changes occur. + + +Release 1998c - 1998-02-28 12:32:26 -0500 + + changes by Paul Eggert (save the "French correction," on which I'll + wait for the dust to settle) + + symlink changes + + changes and additions to Arts.htm + + +Release 1998b - 1998-01-17 14:31:51 -0500 + + URL cleanups and additions + + +Release 1998a - 1998-01-13 12:37:35 -0500 + + changes by Paul Eggert + + +Release code1997i-data1997k - 1997-12-29 09:53:41 -0500 + + changes by Paul Eggert, with minor modifications from Arthur David + Olson to make the files more browser friendly + + +Release code1997h-data1997j - 1997-12-18 17:47:35 -0500 + + minor changes to put "TZif" at the start of each time zone information file + + a rule has also been added to the Makefile so you can + make zones + to just recompile the zone information files (rather than doing a + full "make install" with its other effects). + + +Release data1997i - 1997-10-07 08:45:38 -0400 + + changes to Africa by Paul Eggert + + +Release code1997g-data1997h - 1997-09-04 16:56:54 -0400 + + corrections for Uruguay (and other locations) + + Arthur David Olson's simple-minded fix allowing mktime to both + correctly handle leap seconds and correctly handle tm_sec values + upon which arithmetic has been performed. + + +Release code1997f-data1997g - 1997-07-19 13:15:02 -0400 + + Paul Eggert's updates + + a small change to a function prototype; + + "Music" has been renamed "Arts.htm", HTMLified, and augmented to + include information on Around the World in Eighty Days. + + +Release code1997e-data1997f - 1997-05-03 18:52:34 -0400 + + fixes to zic's error handling + + changes inspired by the item circulated on Slovenia + + The description of Web resources has been HTMLified for browsing + convenience. + + A new piece of tz-related music has been added to the "Music" file. + + +Release code1997d-data1997e - 1997-03-29 12:48:52 -0500 + + Paul Eggert's latest suggestions + + +Release code1997c-data1997d - 1997-03-07 20:37:54 -0500 + + changes to "zic.c" to correct performance of the "-s" option + + a new file "usno1997" + + +Release data1997c - 1997-03-04 09:58:18 -0500 + + changes in Israel + + +Release 1997b - 1997-02-27 18:34:19 -0500 + + The data file incorporates the 1997 leap second. + + The code file incorporates Arthur David Olson's take on the + zic/multiprocessor/directory-creation situation. + + +Release 1997a - 1997-01-21 09:11:10 -0500 + + Paul Eggert's Antarctica (and other changes) + + Arthur David Olson finessed the "getopt" issue by checking against + both -1 and EOF (regardless of POSIX, SunOS 4.1.1's manual says -1 + is returned while SunOS 5.5's manual says EOF is returned). + + +Release code1996o-data1996n - 1996-12-27 21:42:05 -0500 + + Paul Eggert's latest changes + + +Release code1996n - 1996-12-16 09:42:02 -0500 + + link snapping fix from Bruce Evans (via Garrett Wollman) + + +Release data1996m - 1996-11-24 02:37:34 -0000 + [tzdata1996m.tar.gz is missing!] + + Paul Eggert's batch of changes + + +Release code1996m-data1996l - 1996-11-05 14:00:12 -0500 + + No functional changes here; the files have simply been changed to + make more use of ISO style dates in comments. The names of the above + files now include the year in full. + + +Release code96l - 1996-09-08 17:12:20 -0400 + + tzcode96k was missing a couple of pieces. + + +Release 96k - 1996-09-08 16:06:22 -0400 + + the latest round of changes from Paul Eggert + + the recent Year 2000 material + + +Release code96j - 1996-07-30 13:18:53 -0400 + + Set sp->typecnt as suggested by Timothy Patrick Murphy. + + +Release code96i - 1996-07-27 20:11:35 -0400 + + Paul's suggested patch for strftime %V week numbers + + +Release data96i - 1996-07-01 18:13:04 -0400 + + "northamerica" and "europe" changes by Paul Eggert + + +Release code96h - 1996-06-05 08:02:21 -0400 + + fix for handling transitions specified in Universal Time + + Some "public domain" notices have also been added. + + +Release code96g - 1996-05-16 14:00:26 -0400 + + fix for the simultaneous-DST-and-zone-change challenge + + +Release data96h - 1996-05-09 17:40:51 -0400 + + changes by Paul Eggert + + +Release code96f-data96g - 1996-05-03 03:09:59 -0000 + [tzcode96f.tar.gz + tzdata96g.tar.gz are both missing!] + + The changes get us some of the way to fixing the problems noted in Paul + Eggert's letter yesterday (in addition to a few others). The approach + has been to make zic a bit smarter about figuring out what time zone + abbreviations apply just after the time specified in the "UNTIL" part + of a zone line. Putting the smarts in zic means avoiding having + transition times show up in both "Zone" lines and "Rule" lines, which + in turn avoids multiple transition time entries in time zone files. + (This also makes the zic input files such as "europe" a bit shorter and + should ease maintenance.) + + +Release data96f - 1996-04-19 19:20:03 -0000 + [tzdata96f.tar.gz is missing!] + + The only changes are to the "northamerica" file; the time zone + abbreviation for Denver is corrected to MST (and MDT), and the + comments for Mexico have been updated. + + +Release data96e - 1996-03-19 17:37:26 -0500 + + Proposals by Paul Eggert, in particular the Portugal change that + comes into play at the end of this month. + + +Release data96d - 1996-03-18 20:49:39 -0500 + + [not summarized] + + +Release code96e - 1996-02-29 15:43:27 -0000 + [tzcode96e.tar.gz is missing!] + + internationalization changes and the fix to the documentation for strftime + + +Release code96d-data96c - 1996-02-12 11:05:27 -0500 + + The "code" file simply updates Bob Kridle's electronic address. + + The "data" file updates rules for Mexico. + + +Release data96b - 1996-01-27 15:44:42 -0500 + + Kiribati change + + +Release code96c - 1996-01-16 16:58:15 -0500 + + leap-year streamlining and binary-search changes + + fix to newctime.3 + + +Release code96b - 1996-01-10 20:42:39 -0500 + + fixes and enhancements from Paul Eggert, including code that + emulates the behavior of recent versions of the SunOS "date" + command. + + +Release 96a - 1996-01-06 09:08:24 -0500 + + Israel updates + + fixes to strftime.c for correct ISO 8601 week number generation, + plus support for two new formats ('G' and 'g') to give ISO 8601 year + numbers (which are not necessarily the same as calendar year numbers) + + +Release code95i-data95m - 1995-12-21 12:46:47 -0500 + + The latest revisions from Paul Eggert are included, the usno1995 + file has been updated, and a new file ("WWW") covering useful URLs + has been added. + + +Release code95h-data95l - 1995-12-19 18:10:12 -0500 + + A simplification of a macro definition, a change to data for Sudan, + and (for last minute shoppers) notes in the "Music" file on the CD + "Old Man Time". + + +Release code95g-data95k - 1995-10-30 10:32:47 -0500 + + (slightly reformatted) 8-bit-clean proposed patch + + minor patch: US/Eastern -> America/New_York + + snapshot of the USNO's latest data ("usno1995") + + some other minor cleanups + + +Release code95f-data95j - 1995-10-28 21:01:34 -0000 + [tzcode95f.tar.gz + tzdata95j.tar.gz are both missing!] + + European cleanups + + support for 64-bit time_t's + + optimization in localtime.c + + +Release code95e - 1995-10-13 13:23:57 -0400 + + the mktime change to scan from future to past when trying to find time zone + offsets + + +Release data95i - 1995-09-26 10:43:26 -0400 + + For Canada/Central, guess that the Sun customer's "one week too + early" was just a approximation, and the true error is one month + too early. This is consistent with the rest of Canada. + + +Release data95h - 1995-09-21 11:26:48 -0400 + + latest changes from Paul Eggert + + +Release code95d - 1995-09-14 11:14:45 -0400 + + the addition of a "Music" file, which documents four recorded + versions of the tune "Save That Time". + + +Release data95g - 1995-09-01 17:21:36 -0400 + + "yearistype" correction + + +Release data95f - 1995-08-28 20:46:56 -0400 + + Paul Eggert's change to the australasia file + + +Release data95e - 1995-07-08 18:02:34 -0400 + + The only change is a leap second at the end of this year. + Thanks to Bradley White for forwarding news on the leap second. + + +Release data95d - 1995-07-03 13:26:22 -0400 + + Paul Eggert's changes + + +Release data95c - 1995-07-02 19:19:28 -0400 + + changes to "asia", "backward", "europe", and "southamerica" + (read: northamericacentrics need not apply) + + +Release code95c - 1995-03-13 14:00:46 -0500 + + one-line fix for sign extension problems in detzcode + + +Release 95b - 1995-03-04 11:22:38 -0500 + + Minor changes in both: + + The "code" file contains a workaround for the lack of "unistd.h" in + Microsoft C++ version 7. + + The "data" file contains a fixed "Link" for America/Shiprock. + + +Release 94h - 1994-12-10 12:51:14 -0500 + + The files: + + * incorporate the changes to "zdump" and "date" to make changes to + the "TZ" environment variable permanent; + + * incorporate the table changes by Paul Eggert; + + * include (and document) support for universal time specifications in + data files - but do not (yet) include use of this feature in the + data files. + + Think of this as "TZ Classic" - the software has been set up not to break if + universal time shows up in its input, and data entries have been + left as is so as not to break existing implementations. + + +Release data94f - 1994-08-20 12:56:09 -0400 + + (with thanks!) the latest data updates from Paul Eggert + + +Release data94e - 1994-06-04 13:13:53 -0400 + + [not summarized] + + +Release code94g - 1994-05-05 12:14:07 -0400 + + fix missing "optind.c" and a reference to it in the Makefile + + +Release code94f - 1994-05-05 13:00:33 -0000 + [tzcode94f.tar.gz is missing!] + + changes to avoid overflow in difftime, as well as changes to cope + with the 52/53 challenge in strftime + + +Release code94e - 1994-03-30 23:32:59 -0500 + + change for the benefit of PCTS + + +Release 94d - 1994-02-24 15:42:25 -0500 + + Avoid clashes with POSIX semantics for zones such as GMT+4. + + Some other very minor housekeeping is also present. + + +Release code94c - 1994-02-10 08:52:40 -0500 + + Fix bug where mkdirs was broken unless you compile with + -fwritable-strings (which is generally losing to do). + + +Release 94b - 1994-02-07 10:04:33 -0500 + + work by Paul Eggert who notes: + + I found another book of time zone histories by E W Whitman; it's not + as extensive as Shanks but has a few goodies of its own. I used it + to update the tables. I also fixed some more as a result of + correspondence with Adam David and Peter Ilieve, and move some stray + links from 'europe' to 'backward'. I corrected some scanning errors + in usno1989. + + As far as the code goes, I fixed zic to allow years in the range + INT_MIN to INT_MAX; this fixed a few boundary conditions around 1900. + And I cleaned up the zic documentation a little bit. + + +Release data94a - 1994-02-03 08:58:54 -0500 + + It simply incorporates the recently announced leap second into the + "leapseconds" file. + + +Release 93g - 1993-11-22 17:28:27 -0500 + + Paul Eggert has provided a good deal of historic information (based + on Shanks), and there are some code changes to deal with the buglets + that crawled out in dealing with the new information. + + +Release 93f - 1993-10-15 12:27:46 -0400 + + Paul Eggert's changes + + +Release 93e - 1993-09-05 21:21:44 -0400 + + This has updated data for Israel, England, and Kwajalein. There's + also an update to "zdump" to cope with Kwajalein's 24-hour jump. + Thanks to Paul Eggert and Peter Ilieve for the changes. + + +Release 93d - 1993-06-17 23:34:17 -0400 + + new fix and new data on Israel + + +Release 93c - 1993-06-06 19:31:55 -0400 + + [not summarized] + + +Release 93b - 1993-02-02 14:53:58 -0500 + + updated "leapseconds" file + + +Release 93 - 1993-01-08 07:01:06 -0500 + + At kre's suggestion, the package has been split in two - a code piece + (which also includes documentation) that's only of use to folks who + want to recompile things and a data piece useful to anyone who can + run "zic". + + The new version has a few changes to the data files, a few + portability changes, and an off-by-one fix (with thanks to + Tom Karzes at deshaw.com for providing a description and a + solution). + + +Release 92c - 1992-11-21 17:35:36 -0000 + [tz92c.tar.Z is missing!] + + The fallout from the latest round of DST transitions. + + There are changes for Portugal, Saskatchewan, and "Pacific-New"; + there's also a change to "zic.c" that makes it portable to more systems. + + +Release 92 - 1992-04-25 18:17:03 -0000 + [tz92.tar.Z is missing!] + + By popular demand (well, at any rate, following a request by kre at munnari) + + +The 1989 update of the time zone package featured: + + * POSIXization (including interpretation of POSIX-style TZ environment + variables, provided by Guy Harris), + * ANSIfication (including versions of "mktime" and "difftime"), + * SVIDulation (an "altzone" variable) + * MACHination (the "gtime" function) + * corrections to some time zone data (including corrections to the rules + for Great Britain and New Zealand) + * reference data from the United States Naval Observatory for folks who + want to do additional time zones + * and the 1989 data for Saudi Arabia. + + (Since this code will be treated as "part of the implementation" in some + places and as "part of the application" in others, there's no good way to + name functions, such as timegm, that are not part of the proposed ANSI C + standard; such functions have kept their old, underscore-free names in this + update.) + + And the "dysize" function has disappeared; it was present to allow + compilation of the "date" command on old BSD systems, and a version of "date" + is now provided in the package. The "date" command is not created when you + "make all" since it may lack options provided by the version distributed with + your operating system, or may not interact with the system in the same way + the native version does. + + Since POSIX frowns on correct leap second handling, the default behavior of + the "zic" command (in the absence of a "-L" option) has been changed to omit + leap second information from its output files. + + +----- +Notes + +This file contains copies of the part of each release announcement +that talks about the changes in that release. The text has been +adapted and reformatted for the purposes of this file. + +Typically a release R consists of a pair of tarball files, +tzcodeR.tar.gz and tzdataR.tar.gz. However, some releases (e.g., +code2010a, data2012c) consist of just one or the other tarball, and a +few (e.g., code2012c-data2012d) have tarballs with mixed version +numbers. + +Release time stamps are taken from the release's commit (for newer, +git releases), from the newest file in the tarball (for older +releases, where this info is available) or from the email announcing +the release (if all else fails; these are marked with a time zone of +-0000 and an "is missing!" comment). + +Earlier versions of the code and data were not announced on the tz +list and are not summarized here. + +This file is in the public domain. + +Local Variables: +coding: utf-8 +End: diff --git a/tz/README b/tz/README new file mode 100644 index 0000000..8deaf16 --- /dev/null +++ b/tz/README @@ -0,0 +1,63 @@ +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. + + 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 - + +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. diff --git a/tz/Theory b/tz/Theory new file mode 100644 index 0000000..60678fe --- /dev/null +++ b/tz/Theory @@ -0,0 +1,796 @@ +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. + +* In POSIX, there's no tamper-proof way for a process to learn the + system's best idea of local wall clock. (This is important for + applications that an administrator wants used only at certain times - + without regard to whether the user has fiddled the "TZ" environment + variable. While an administrator can "do everything in UTC" to get + around the problem, doing so is inconvenient and precludes handling + daylight saving time shifts - as might be required to limit phone + calls to off-peak hours.) + +* POSIX requires that systems ignore leap seconds. + +* 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). + +* To handle places where more than two time zone abbreviations are used, + the functions "localtime" and "gmtime" set tzname[tmp->tm_isdst] + (where "tmp" is the value the function returns) to the time zone + abbreviation to be used. This differs from POSIX, where the elements + of tzname are only changed as a result of calls to tzset. + +* Since the "TZ" environment variable can now be used to control time + conversion, the "daylight" and "timezone" variables are no longer + needed. (These variables are defined and set by "tzset"; however, their + values will not be used by "localtime.") + +* The "localtime" function has been set up to deliver correct results + for near-minimum or near-maximum time_t values. (A comment in the + source code tells how to get compatibly wrong results). + +* A function "tzsetwall" has been added to arrange for the system's + best approximation to local wall clock time to be delivered by + subsequent calls to "localtime." Source code for portable + applications that "must" run on local wall clock time should call + "tzsetwall();" if such code is moved to "old" systems that don't + provide tzsetwall, you won't be able to generate an executable program. + (These time zone functions also arrange for local wall clock time to be + used if tzset is called - directly or indirectly - and there's no "TZ" + environment variable; portable applications should not, however, rely + on this behavior since it's not the way SVR2 systems behave.) + +* 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: + +* This package is already part of many POSIX-compliant hosts, + including BSD, HP, Linux, Network Appliance, SCO, SGI, and Sun. + On such hosts, the primary use of this package + is to update obsolete time zone rule tables. + To do this, you may need to compile the time zone compiler + 'zic' supplied with this package instead of using the system 'zic', + since the format of zic's input changed slightly in late 1994, + and many vendors still do not support the new input format. + +* The UNIX Version 7 "timezone" function is not present in this package; + it's impossible to reliably map timezone's arguments (a "minutes west + of GMT" value and a "daylight saving time in effect" flag) to a + time zone abbreviation, and we refuse to guess. + Programs that in the past used the timezone function may now examine + tzname[localtime(&clock)->tm_isdst] to learn the correct time + zone abbreviation to use. Alternatively, use + localtime(&clock)->tm_zone if this has been enabled. + +* The 4.2BSD gettimeofday function is not used in this package. + This formerly let users obtain the current UTC offset and DST flag, + but this functionality was removed in later versions of BSD. + +* In SVR2, time conversion fails for near-minimum or near-maximum + time_t values when doing conversions for places that don't use UT. + This package takes care to do these conversions correctly. + +The functions that are conditionally compiled if STD_INSPIRED is defined +should, at this point, be looked on primarily as food for thought. They are +not in any sense "standard compatible" - some are not, in fact, specified in +*any* standard. They do, however, represent responses of various authors to +standardization proposals. + +Other time conversion proposals, in particular the one developed by folks at +Hewlett Packard, offer a wider selection of functions that provide capabilities +beyond those provided here. The absence of such functions from this package +is not meant to discourage the development, standardization, or use of such +functions. Rather, their absence reflects the decision to make this package +contain valid extensions to POSIX, to ensure its broad acceptability. If +more powerful time conversion functions can be standardized, so much the +better. + + +----- 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: diff --git a/tz/africa b/tz/africa new file mode 100644 index 0000000..50f29d5 --- /dev/null +++ b/tz/africa @@ -0,0 +1,1188 @@ +# This file is in the public domain, so clarified as of +# 2009-05-17 by Arthur David Olson. + +# This file is by no means authoritative; if you think you know better, +# go ahead and edit the file (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): +# +# 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. +# +# Gwillim Law writes that a good source +# for recent time zone data is the International Air Transport +# Association's Standard Schedules Information Manual (IATA SSIM), +# published semiannually. Law sent in several helpful summaries +# of the IATA's data after 1990. Except where otherwise noted, +# IATA SSIM is the source for entries after 1990. +# +# Another source occasionally used is Edward W. Whitman, World Time Differences, +# Whitman Publishing Co, 2 Niagara Av, Ealing, London (undated), which +# I found in the UCLA library. +# +# For data circa 1899, a common source is: +# Milne J. Civil time. Geogr J. 1899 Feb;13(2):173-94. +# http://www.jstor.org/stable/1774359 +# +# A reliable and entertaining source about time zones is +# Derek Howse, Greenwich time and longitude, Philip Wilson Publishers (1997). +# +# Previous editions of this database used WAT, CAT, SAT, and EAT +# for +0:00 through +3:00, respectively, +# but Mark R V Murray reports that +# 'SAST' is the official abbreviation for +2:00 in the country of South Africa, +# 'CAT' is commonly used for +2:00 in countries north of South Africa, and +# 'WAT' is probably the best name for +1:00, as the common phrase for +# the area that includes Nigeria is "West Africa". +# He has heard of "Western Sahara Time" for +0:00 but can find no reference. +# +# To make things confusing, 'WAT' seems to have been used for -1:00 long ago; +# I'd guess that this was because people needed _some_ name for -1:00, +# and at the time, far west Africa was the only major land area in -1:00. +# This usage is now obsolete, as the last use of -1:00 on the African +# mainland seems to have been 1976 in Western Sahara. +# +# To summarize, the following abbreviations seem to have some currency: +# -1:00 WAT West Africa Time (no longer used) +# 0:00 GMT Greenwich Mean Time +# 2:00 CAT Central Africa Time +# 2:00 SAST South Africa Standard Time +# and Murray suggests the following abbreviation: +# 1:00 WAT West Africa Time +# I realize that this leads to 'WAT' being used for both -1:00 and 1:00 +# for times before 1976, but this is the best I can think of +# until we get more information. +# +# I invented the following abbreviations; corrections are welcome! +# 2:00 WAST West Africa Summer Time +# 2:30 BEAT British East Africa Time (no longer used) +# 2:45 BEAUT British East Africa Unified Time (no longer used) +# 3:00 CAST Central Africa Summer Time (no longer used) +# 3:00 SAST South Africa Summer Time (no longer used) +# 3:00 EAT East Africa Time + +# Algeria +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Algeria 1916 only - Jun 14 23:00s 1:00 S +Rule Algeria 1916 1919 - Oct Sun>=1 23:00s 0 - +Rule Algeria 1917 only - Mar 24 23:00s 1:00 S +Rule Algeria 1918 only - Mar 9 23:00s 1:00 S +Rule Algeria 1919 only - Mar 1 23:00s 1:00 S +Rule Algeria 1920 only - Feb 14 23:00s 1:00 S +Rule Algeria 1920 only - Oct 23 23:00s 0 - +Rule Algeria 1921 only - Mar 14 23:00s 1:00 S +Rule Algeria 1921 only - Jun 21 23:00s 0 - +Rule Algeria 1939 only - Sep 11 23:00s 1:00 S +Rule Algeria 1939 only - Nov 19 1:00 0 - +Rule Algeria 1944 1945 - Apr Mon>=1 2:00 1:00 S +Rule Algeria 1944 only - Oct 8 2:00 0 - +Rule Algeria 1945 only - Sep 16 1:00 0 - +Rule Algeria 1971 only - Apr 25 23:00s 1:00 S +Rule Algeria 1971 only - Sep 26 23:00s 0 - +Rule Algeria 1977 only - May 6 0:00 1:00 S +Rule Algeria 1977 only - Oct 21 0:00 0 - +Rule Algeria 1978 only - Mar 24 1:00 1:00 S +Rule Algeria 1978 only - Sep 22 3:00 0 - +Rule Algeria 1980 only - Apr 25 0:00 1:00 S +Rule Algeria 1980 only - Oct 31 2:00 0 - +# Shanks & Pottenger give 0:09:20 for Paris Mean Time; go with Howse's +# more precise 0:09:21. +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Africa/Algiers 0:12:12 - LMT 1891 Mar 15 0:01 + 0:09:21 - PMT 1911 Mar 11 # Paris Mean Time + 0:00 Algeria WE%sT 1940 Feb 25 2:00 + 1:00 Algeria CE%sT 1946 Oct 7 + 0:00 - WET 1956 Jan 29 + 1:00 - CET 1963 Apr 14 + 0:00 Algeria WE%sT 1977 Oct 21 + 1:00 Algeria CE%sT 1979 Oct 26 + 0:00 Algeria WE%sT 1981 May + 1:00 - CET + +# Angola +# Benin +# See Africa/Lagos. + +# Botswana +# See Africa/Maputo. + +# Burkina Faso +# See Africa/Abidjan. + +# Burundi +# See Africa/Maputo. + +# Cameroon +# See Africa/Lagos. + +# Cape Verde +# +# Shanks gives 1907 for the transition to CVT. +# Perhaps the 1911-05-26 Portuguese decree +# http://dre.pt/pdf1sdip/1911/05/12500/23132313.pdf +# merely made it official? +# +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Atlantic/Cape_Verde -1:34:04 - LMT 1907 # Praia + -2:00 - CVT 1942 Sep + -2:00 1:00 CVST 1945 Oct 15 + -2:00 - CVT 1975 Nov 25 2:00 + -1:00 - CVT + +# Central African Republic +# See Africa/Lagos. + +# Chad +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Africa/Ndjamena 1:00:12 - LMT 1912 # N'Djamena + 1:00 - WAT 1979 Oct 14 + 1:00 1:00 WAST 1980 Mar 8 + 1:00 - WAT + +# Comoros +# See Africa/Nairobi. + +# Democratic Republic of the Congo +# See Africa/Lagos for the western part and Africa/Maputo for the eastern. + +# Republic of the Congo +# See Africa/Lagos. + +# Côte d'Ivoire / Ivory Coast +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Africa/Abidjan -0:16:08 - LMT 1912 + 0:00 - GMT +Link Africa/Abidjan Africa/Bamako # Mali +Link Africa/Abidjan Africa/Banjul # Gambia +Link Africa/Abidjan Africa/Conakry # Guinea +Link Africa/Abidjan Africa/Dakar # Senegal +Link Africa/Abidjan Africa/Freetown # Sierra Leone +Link Africa/Abidjan Africa/Lome # Togo +Link Africa/Abidjan Africa/Nouakchott # Mauritania +Link Africa/Abidjan Africa/Ouagadougou # Burkina Faso +Link Africa/Abidjan Africa/Sao_Tome # São Tomé and Príncipe +Link Africa/Abidjan Atlantic/St_Helena # St Helena + +# Djibouti +# See Africa/Nairobi. + +############################################################################### + +# Egypt + +# Milne says Cairo used 2:05:08.9, the local mean time of the Abbasizeh +# observatory; round to nearest. Milne also says that the official time for +# Egypt was mean noon at the Great Pyramid, 2:04:30.5, but apparently this +# did not apply to Cairo, Alexandria, or Port Said. + +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Egypt 1940 only - Jul 15 0:00 1:00 S +Rule Egypt 1940 only - Oct 1 0:00 0 - +Rule Egypt 1941 only - Apr 15 0:00 1:00 S +Rule Egypt 1941 only - Sep 16 0:00 0 - +Rule Egypt 1942 1944 - Apr 1 0:00 1:00 S +Rule Egypt 1942 only - Oct 27 0:00 0 - +Rule Egypt 1943 1945 - Nov 1 0:00 0 - +Rule Egypt 1945 only - Apr 16 0:00 1:00 S +Rule Egypt 1957 only - May 10 0:00 1:00 S +Rule Egypt 1957 1958 - Oct 1 0:00 0 - +Rule Egypt 1958 only - May 1 0:00 1:00 S +Rule Egypt 1959 1981 - May 1 1:00 1:00 S +Rule Egypt 1959 1965 - Sep 30 3:00 0 - +Rule Egypt 1966 1994 - Oct 1 3:00 0 - +Rule Egypt 1982 only - Jul 25 1:00 1:00 S +Rule Egypt 1983 only - Jul 12 1:00 1:00 S +Rule Egypt 1984 1988 - May 1 1:00 1:00 S +Rule Egypt 1989 only - May 6 1:00 1:00 S +Rule Egypt 1990 1994 - May 1 1:00 1:00 S +# IATA (after 1990) says transitions are at 0:00. +# Go with IATA starting in 1995, except correct 1995 entry from 09-30 to 09-29. + +# From Alexander Krivenyshev (2011-04-20): +# "...Egypt's interim cabinet decided on Wednesday to cancel daylight +# saving time after a poll posted on its website showed the majority of +# Egyptians would approve the cancellation." +# +# Egypt to cancel daylight saving time +# http://www.almasryalyoum.com/en/node/407168 +# or +# http://www.worldtimezone.com/dst_news/dst_news_egypt04.html +Rule Egypt 1995 2010 - Apr lastFri 0:00s 1:00 S +Rule Egypt 1995 2005 - Sep lastThu 24:00 0 - +# From Steffen Thorsen (2006-09-19): +# The Egyptian Gazette, issue 41,090 (2006-09-18), page 1, reports: +# Egypt will turn back clocks by one hour at the midnight of Thursday +# after observing the daylight saving time since May. +# http://news.gom.com.eg/gazette/pdf/2006/09/18/01.pdf +Rule Egypt 2006 only - Sep 21 24:00 0 - +# From Dirk Losch (2007-08-14): +# I received a mail from an airline which says that the daylight +# saving time in Egypt will end in the night of 2007-09-06 to 2007-09-07. +# From Jesper Nørgaard Welen (2007-08-15): [The following agree:] +# http://www.nentjes.info/Bill/bill5.htm +# http://www.timeanddate.com/worldclock/city.html?n=53 +# From Steffen Thorsen (2007-09-04): The official information...: +# http://www.sis.gov.eg/En/EgyptOnline/Miscellaneous/000002/0207000000000000001580.htm +Rule Egypt 2007 only - Sep Thu>=1 24:00 0 - +# From Abdelrahman Hassan (2007-09-06): +# Due to the Hijri (lunar Islamic calendar) year being 11 days shorter +# than the year of the Gregorian calendar, Ramadan shifts earlier each +# year. This year it will be observed September 13 (September is quite +# hot in Egypt), and the idea is to make fasting easier for workers by +# shifting business hours one hour out of daytime heat. Consequently, +# unless discontinued, next DST may end Thursday 28 August 2008. +# From Paul Eggert (2007-08-17): +# For lack of better info, assume the new rule is last Thursday in August. + +# From Petr Machata (2009-04-06): +# The following appeared in Red Hat bugzilla[1] (edited): +# +# > $ zdump -v /usr/share/zoneinfo/Africa/Cairo | grep 2009 +# > /usr/share/zoneinfo/Africa/Cairo Thu Apr 23 21:59:59 2009 UTC = Thu = +# Apr 23 +# > 23:59:59 2009 EET isdst=0 gmtoff=7200 +# > /usr/share/zoneinfo/Africa/Cairo Thu Apr 23 22:00:00 2009 UTC = Fri = +# Apr 24 +# > 01:00:00 2009 EEST isdst=1 gmtoff=10800 +# > /usr/share/zoneinfo/Africa/Cairo Thu Aug 27 20:59:59 2009 UTC = Thu = +# Aug 27 +# > 23:59:59 2009 EEST isdst=1 gmtoff=10800 +# > /usr/share/zoneinfo/Africa/Cairo Thu Aug 27 21:00:00 2009 UTC = Thu = +# Aug 27 +# > 23:00:00 2009 EET isdst=0 gmtoff=7200 +# +# > end date should be Thu Sep 24 2009 (Last Thursday in September at 23:59= +# :59) +# > http://support.microsoft.com/kb/958729/ +# +# timeanddate[2] and another site I've found[3] also support that. +# +# [1] https://bugzilla.redhat.com/show_bug.cgi?id=492263 +# [2] http://www.timeanddate.com/worldclock/clockchange.html?n=53 +# [3] http://wwp.greenwichmeantime.com/time-zone/africa/egypt/ + +# From Arthur David Olson (2009-04-20): +# In 2009 (and for the next several years), Ramadan ends before the fourth +# Thursday in September; Egypt is expected to revert to the last Thursday +# in September. + +# From Steffen Thorsen (2009-08-11): +# We have been able to confirm the August change with the Egyptian Cabinet +# Information and Decision Support Center: +# http://www.timeanddate.com/news/time/egypt-dst-ends-2009.html +# +# The Middle East News Agency +# http://www.mena.org.eg/index.aspx +# also reports "Egypt starts winter time on August 21" +# today in article numbered "71, 11/08/2009 12:25 GMT." +# Only the title above is available without a subscription to their service, +# and can be found by searching for "winter" in their search engine +# (at least today). + +# From Alexander Krivenyshev (2010-07-20): +# According to News from Egypt - Al-Masry Al-Youm Egypt's cabinet has +# decided that Daylight Saving Time will not be used in Egypt during +# Ramadan. +# +# Arabic translation: +# "Clocks to go back during Ramadan - and then forward again" +# http://www.almasryalyoum.com/en/news/clocks-go-back-during-ramadan-and-then-forward-again +# http://www.worldtimezone.com/dst_news/dst_news_egypt02.html + +# From Ahmad El-Dardiry (2014-05-07): +# Egypt is to change back to Daylight system on May 15 +# http://english.ahram.org.eg/NewsContent/1/64/100735/Egypt/Politics-/Egypts-government-to-reapply-daylight-saving-time-.aspx + +# From Gunther Vermier (2014-05-13): +# our Egypt office confirms that the change will be at 15 May "midnight" (24:00) + +# From Imed Chihi (2014-06-04): +# We have finally "located" a precise official reference about the DST changes +# in Egypt. The Ministers Cabinet decision is explained at +# http://www.cabinet.gov.eg/Media/CabinetMeetingsDetails.aspx?id=347 ... +# [T]his (Arabic) site is not accessible outside Egypt, but the page ... +# translates into: "With regard to daylight saving time, it is scheduled to +# take effect at exactly twelve o'clock this evening, Thursday, 15 MAY 2014, +# to be suspended by twelve o'clock on the evening of Thursday, 26 JUN 2014, +# and re-established again at the end of the month of Ramadan, at twelve +# o'clock on the evening of Thursday, 31 JUL 2014." This statement has been +# reproduced by other (more accessible) sites[, e.g.,]... +# http://elgornal.net/news/news.aspx?id=4699258 + +# From Paul Eggert (2014-06-04): +# Sarah El Deeb and Lee Keath of AP report that the Egyptian government says +# the change is because of blackouts in Cairo, even though Ahram Online (cited +# above) says DST had no affect on electricity consumption. There is +# no information about when DST will end this fall. See: +# http://abcnews.go.com/International/wireStory/el-sissi-pushes-egyptians-line-23614833 + +# From Steffen Thorsen (2015-04-08): +# Egypt will start DST on midnight after Thursday, April 30, 2015. +# This is based on a law (no 35) from May 15, 2014 saying it starts the last +# Thursday of April.... Clocks will still be turned back for Ramadan, but +# dates not yet announced.... +# http://almogaz.com/news/weird-news/2015/04/05/1947105 ... +# http://www.timeanddate.com/news/time/egypt-starts-dst-2015.html + +# From Ahmed Nazmy (2015-04-20): +# Egypt's ministers cabinet just announced ... that it will cancel DST at +# least for 2015. +# +# From Tim Parenti (2015-04-20): +# http://english.ahram.org.eg/WriterArticles/NewsContentP/1/128195/Egypt/No-daylight-saving-this-summer-Egypts-prime-minist.aspx +# "Egypt's cabinet agreed on Monday not to switch clocks for daylight saving +# time this summer, and carry out studies on the possibility of canceling the +# practice altogether in future years." +# +# From Paul Eggert (2015-04-24): +# Yesterday the office of Egyptian President El-Sisi announced his +# decision to abandon DST permanently. See Ahram Online 2015-04-24. +# http://english.ahram.org.eg/NewsContent/1/64/128509/Egypt/Politics-/Sisi-cancels-daylight-saving-time-in-Egypt.aspx + +# From Steffen Thorsen (2016-04-29): +# Egypt will have DST from July 7 until the end of October.... +# http://english.ahram.org.eg/NewsContentP/1/204655/Egypt/Daylight-savings-time-returning-to-Egypt-on--July.aspx +# From Mina Samuel (2016-07-04): +# Egyptian government took the decision to cancel the DST, + +Rule Egypt 2008 only - Aug lastThu 24:00 0 - +Rule Egypt 2009 only - Aug 20 24:00 0 - +Rule Egypt 2010 only - Aug 10 24:00 0 - +Rule Egypt 2010 only - Sep 9 24:00 1:00 S +Rule Egypt 2010 only - Sep lastThu 24:00 0 - +Rule Egypt 2014 only - May 15 24:00 1:00 S +Rule Egypt 2014 only - Jun 26 24:00 0 - +Rule Egypt 2014 only - Jul 31 24:00 1:00 S +Rule Egypt 2014 only - Sep lastThu 24:00 0 - + +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Africa/Cairo 2:05:09 - LMT 1900 Oct + 2:00 Egypt EE%sT + +# Equatorial Guinea +# See Africa/Lagos. + +# Eritrea +# Ethiopia +# See Africa/Nairobi. + +# Gabon +# See Africa/Lagos. + +# Gambia +# See Africa/Abidjan. + +# Ghana +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +# Whitman says DST was observed from 1931 to "the present"; +# Shanks & Pottenger say 1936 to 1942; +# and September 1 to January 1 is given by: +# Scott Keltie J, Epstein M (eds), The Statesman's Year-Book, +# 57th ed. Macmillan, London (1920), OCLC 609408015, pp xxviii. +# For lack of better info, assume DST was observed from 1920 to 1942. +Rule Ghana 1920 1942 - Sep 1 0:00 0:20 GHST +Rule Ghana 1920 1942 - Dec 31 0:00 0 GMT +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Africa/Accra -0:00:52 - LMT 1918 + 0:00 Ghana %s + +# Guinea +# See Africa/Abidjan. + +# Guinea-Bissau +# +# 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 NAME GMTOFF RULES FORMAT [UNTIL] +Zone Africa/Bissau -1:02:20 - LMT 1912 Jan 1 + -1:00 - WAT 1975 + 0:00 - GMT + +# Kenya +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Africa/Nairobi 2:27:16 - LMT 1928 Jul + 3:00 - EAT 1930 + 2:30 - BEAT 1940 + 2:45 - BEAUT 1960 + 3:00 - EAT +Link Africa/Nairobi Africa/Addis_Ababa # Ethiopia +Link Africa/Nairobi Africa/Asmara # Eritrea +Link Africa/Nairobi Africa/Dar_es_Salaam # Tanzania +Link Africa/Nairobi Africa/Djibouti +Link Africa/Nairobi Africa/Kampala # Uganda +Link Africa/Nairobi Africa/Mogadishu # Somalia +Link Africa/Nairobi Indian/Antananarivo # Madagascar +Link Africa/Nairobi Indian/Comoro +Link Africa/Nairobi Indian/Mayotte + +# Lesotho +# See Africa/Johannesburg. + +# Liberia +# From Paul Eggert (2006-03-22): +# In 1972 Liberia was the last country to switch +# from a UTC offset that was not a multiple of 15 or 20 minutes. +# Howse reports that it was in honor of their president's birthday. +# Shank & Pottenger report the date as May 1, whereas Howse reports Jan; +# go with Shanks & Pottenger. +# For Liberia before 1972, Shanks & Pottenger report -0:44, whereas Howse and +# Whitman each report -0:44:30; go with the more precise figure. +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Africa/Monrovia -0:43:08 - LMT 1882 + -0:43:08 - MMT 1919 Mar # Monrovia Mean Time + -0:44:30 - LRT 1972 May # Liberia Time + 0:00 - GMT + +############################################################################### + +# Libya + +# From Even Scharning (2012-11-10): +# Libya set their time one hour back at 02:00 on Saturday November 10. +# http://www.libyaherald.com/2012/11/04/clocks-to-go-back-an-hour-on-saturday/ +# Here is an official source [in Arabic]: http://ls.ly/fb6Yc +# +# Steffen Thorsen forwarded a translation (2012-11-10) in +# http://mm.icann.org/pipermail/tz/2012-November/018451.html +# +# From Tim Parenti (2012-11-11): +# Treat the 2012-11-10 change as a zone change from UTC+2 to UTC+1. +# The DST rules planned for 2013 and onward roughly mirror those of Europe +# (either two days before them or five days after them, so as to fall on +# lastFri instead of lastSun). + +# From Even Scharning (2013-10-25): +# The scheduled end of DST in Libya on Friday, October 25, 2013 was +# cancelled yesterday.... +# http://www.libyaherald.com/2013/10/24/correction-no-time-change-tomorrow/ +# +# From Paul Eggert (2013-10-25): +# For now, assume they're reverting to the pre-2012 rules of permanent UTC+2. + +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Libya 1951 only - Oct 14 2:00 1:00 S +Rule Libya 1952 only - Jan 1 0:00 0 - +Rule Libya 1953 only - Oct 9 2:00 1:00 S +Rule Libya 1954 only - Jan 1 0:00 0 - +Rule Libya 1955 only - Sep 30 0:00 1:00 S +Rule Libya 1956 only - Jan 1 0:00 0 - +Rule Libya 1982 1984 - Apr 1 0:00 1:00 S +Rule Libya 1982 1985 - Oct 1 0:00 0 - +Rule Libya 1985 only - Apr 6 0:00 1:00 S +Rule Libya 1986 only - Apr 4 0:00 1:00 S +Rule Libya 1986 only - Oct 3 0:00 0 - +Rule Libya 1987 1989 - Apr 1 0:00 1:00 S +Rule Libya 1987 1989 - Oct 1 0:00 0 - +Rule Libya 1997 only - Apr 4 0:00 1:00 S +Rule Libya 1997 only - Oct 4 0:00 0 - +Rule Libya 2013 only - Mar lastFri 1:00 1:00 S +Rule Libya 2013 only - Oct lastFri 2:00 0 - +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Africa/Tripoli 0:52:44 - LMT 1920 + 1:00 Libya CE%sT 1959 + 2:00 - EET 1982 + 1:00 Libya CE%sT 1990 May 4 +# The 1996 and 1997 entries are from Shanks & Pottenger; +# the IATA SSIM data entries contain some obvious errors. + 2:00 - EET 1996 Sep 30 + 1:00 Libya CE%sT 1997 Oct 4 + 2:00 - EET 2012 Nov 10 2:00 + 1:00 Libya CE%sT 2013 Oct 25 2:00 + 2:00 - EET + +# Madagascar +# See Africa/Nairobi. + +# Malawi +# See Africa/Maputo. + +# Mali +# Mauritania +# See Africa/Abidjan. + +# Mauritius + +# From Steffen Thorsen (2008-06-25): +# Mauritius plans to observe DST from 2008-11-01 to 2009-03-31 on a trial +# basis.... +# It seems that Mauritius observed daylight saving time from 1982-10-10 to +# 1983-03-20 as well, but that was not successful.... +# http://www.timeanddate.com/news/time/mauritius-daylight-saving-time.html + +# From Alex Krivenyshev (2008-06-25): +# http://economicdevelopment.gov.mu/portal/site/Mainhomepage/menuitem.a42b24128104d9845dabddd154508a0c/?content_id=0a7cee8b5d69a110VgnVCM1000000a04a8c0RCRD + +# From Arthur David Olson (2008-06-30): +# The www.timeanddate.com article cited by Steffen Thorsen notes that "A +# final decision has yet to be made on the times that daylight saving +# would begin and end on these dates." As a place holder, use midnight. + +# From Paul Eggert (2008-06-30): +# Follow Thorsen on DST in 1982/1983, instead of Shanks & Pottenger. + +# From Steffen Thorsen (2008-07-10): +# According to +# http://www.lexpress.mu/display_article.php?news_id=111216 +# (in French), Mauritius will start and end their DST a few days earlier +# than previously announced (2008-11-01 to 2009-03-31). The new start +# date is 2008-10-26 at 02:00 and the new end date is 2009-03-27 (no time +# given, but it is probably at either 2 or 3 wall clock time). +# +# A little strange though, since the article says that they moved the date +# to align itself with Europe and USA which also change time on that date, +# but that means they have not paid attention to what happened in +# USA/Canada last year (DST ends first Sunday in November). I also wonder +# why that they end on a Friday, instead of aligning with Europe which +# changes two days later. + +# From Alex Krivenyshev (2008-07-11): +# Seems that English language article "The revival of daylight saving +# time: Energy conservation?"- No. 16578 (07/11/2008) was originally +# published on Monday, June 30, 2008... +# +# I guess that article in French "Le gouvernement avance l'introduction +# de l'heure d'été" stating that DST in Mauritius starting on October 26 +# and ending on March 27, 2009 is the most recent one.... +# http://www.worldtimezone.com/dst_news/dst_news_mauritius02.html + +# From Riad M. Hossen Ally (2008-08-03): +# The Government of Mauritius weblink +# http://www.gov.mu/portal/site/pmosite/menuitem.4ca0efdee47462e7440a600248a521ca/?content_id=4728ca68b2a5b110VgnVCM1000000a04a8c0RCRD +# Cabinet Decision of July 18th, 2008 states as follows: +# +# 4. ...Cabinet has agreed to the introduction into the National Assembly +# of the Time Bill which provides for the introduction of summer time in +# Mauritius. The summer time period which will be of one hour ahead of +# the standard time, will be aligned with that in Europe and the United +# States of America. It will start at two o'clock in the morning on the +# last Sunday of October and will end at two o'clock in the morning on +# the last Sunday of March the following year. The summer time for the +# year 2008-2009 will, therefore, be effective as from 26 October 2008 +# and end on 29 March 2009. + +# From Ed Maste (2008-10-07): +# THE TIME BILL (No. XXVII of 2008) Explanatory Memorandum states the +# beginning / ending of summer time is 2 o'clock standard time in the +# morning of the last Sunday of October / last Sunday of March. +# http://www.gov.mu/portal/goc/assemblysite/file/bill2708.pdf + +# From Steffen Thorsen (2009-06-05): +# According to several sources, Mauritius will not continue to observe +# DST the coming summer... +# +# Some sources, in French: +# http://www.defimedia.info/news/946/Rashid-Beebeejaun-:-%C2%AB-L%E2%80%99heure-d%E2%80%99%C3%A9t%C3%A9-ne-sera-pas-appliqu%C3%A9e-cette-ann%C3%A9e-%C2%BB +# http://lexpress.mu/Story/3398~Beebeejaun---Les-objectifs-d-%C3%A9conomie-d-%C3%A9nergie-de-l-heure-d-%C3%A9t%C3%A9-ont-%C3%A9t%C3%A9-atteints- +# +# Our wrap-up: +# http://www.timeanddate.com/news/time/mauritius-dst-will-not-repeat.html + +# From Arthur David Olson (2009-07-11): +# The "mauritius-dst-will-not-repeat" wrapup includes this: +# "The trial ended on March 29, 2009, when the clocks moved back by one hour +# at 2am (or 02:00) local time..." + +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Mauritius 1982 only - Oct 10 0:00 1:00 S +Rule Mauritius 1983 only - Mar 21 0:00 0 - +Rule Mauritius 2008 only - Oct lastSun 2:00 1:00 S +Rule Mauritius 2009 only - Mar lastSun 2:00 0 - +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Indian/Mauritius 3:50:00 - LMT 1907 # Port Louis + 4:00 Mauritius MU%sT # Mauritius Time +# Agalega Is, Rodriguez +# no information; probably like Indian/Mauritius + +# Mayotte +# See Africa/Nairobi. + +# Morocco +# See the 'europe' file for Spanish Morocco (Africa/Ceuta). + +# From Alex Krivenyshev (2008-05-09): +# Here is an article that Morocco plan to introduce Daylight Saving Time between +# 1 June, 2008 and 27 September, 2008. +# +# "... Morocco is to save energy by adjusting its clock during summer so it will +# be one hour ahead of GMT between 1 June and 27 September, according to +# Communication Minister and Government Spokesman, Khalid Naciri...." +# +# http://www.worldtimezone.net/dst_news/dst_news_morocco01.html +# http://en.afrik.com/news11892.html + +# From Alex Krivenyshev (2008-05-09): +# The Morocco time change can be confirmed on Morocco web site Maghreb Arabe +# Presse: +# http://www.map.ma/eng/sections/box3/morocco_shifts_to_da/view +# +# Morocco shifts to daylight time on June 1st through September 27, Govt. +# spokesman. + +# From Patrice Scattolin (2008-05-09): +# According to this article: +# http://www.avmaroc.com/actualite/heure-dete-comment-a127896.html +# (and republished here: <http://www.actu.ma/heure-dete-comment_i127896_0.html>) +# the changes occur at midnight: +# +# Saturday night May 31st at midnight (which in French is to be +# interpreted as the night between Saturday and Sunday) +# Sunday night the 28th at midnight +# +# Seeing that the 28th is Monday, I am guessing that she intends to say +# the midnight of the 28th which is the midnight between Sunday and +# Monday, which jives with other sources that say that it's inclusive +# June 1st to Sept 27th. +# +# The decision was taken by decree *2-08-224 *but I can't find the decree +# published on the web. +# +# It's also confirmed here: +# http://www.maroc.ma/NR/exeres/FACF141F-D910-44B0-B7FA-6E03733425D1.htm +# on a government portal as being between June 1st and Sept 27th (not yet +# posted in English). +# +# The following Google query will generate many relevant hits: +# http://www.google.com/search?hl=en&q=Conseil+de+gouvernement+maroc+heure+avance&btnG=Search + +# From Steffen Thorsen (2008-08-27): +# Morocco will change the clocks back on the midnight between August 31 +# and September 1. They originally planned to observe DST to near the end +# of September: +# +# One article about it (in French): +# http://www.menara.ma/fr/Actualites/Maroc/Societe/ci.retour_a_l_heure_gmt_a_partir_du_dimanche_31_aout_a_minuit_officiel_.default +# +# We have some further details posted here: +# http://www.timeanddate.com/news/time/morocco-ends-dst-early-2008.html + +# From Steffen Thorsen (2009-03-17): +# Morocco will observe DST from 2009-06-01 00:00 to 2009-08-21 00:00 according +# to many sources, such as +# http://news.marweb.com/morocco/entertainment/morocco-daylight-saving.html +# http://www.medi1sat.ma/fr/depeche.aspx?idp=2312 +# (French) +# +# Our summary: +# http://www.timeanddate.com/news/time/morocco-starts-dst-2009.html + +# From Alexander Krivenyshev (2009-03-17): +# Here is a link to official document from Royaume du Maroc Premier Ministre, +# Ministère de la Modernisation des Secteurs Publics +# +# Under Article 1 of Royal Decree No. 455-67 of Act 23 safar 1387 (2 June 1967) +# concerning the amendment of the legal time, the Ministry of Modernization of +# Public Sectors announced that the official time in the Kingdom will be +# advanced 60 minutes from Sunday 31 May 2009 at midnight. +# +# http://www.mmsp.gov.ma/francais/Actualites_fr/PDF_Actualites_Fr/HeureEte_FR.pdf +# http://www.worldtimezone.com/dst_news/dst_news_morocco03.html + +# From Steffen Thorsen (2010-04-13): +# Several news media in Morocco report that the Ministry of Modernization +# of Public Sectors has announced that Morocco will have DST from +# 2010-05-02 to 2010-08-08. +# +# Example: +# http://www.lavieeco.com/actualites/4099-le-maroc-passera-a-l-heure-d-ete-gmt1-le-2-mai.html +# (French) +# Our page: +# http://www.timeanddate.com/news/time/morocco-starts-dst-2010.html + +# From Dan Abitol (2011-03-30): +# ...Rules for Africa/Casablanca are the following (24h format) +# The 3rd April 2011 at 00:00:00, [it] will be 3rd April 01:00:00 +# The 31st July 2011 at 00:59:59, [it] will be 31st July 00:00:00 +# ...Official links of change in morocco +# The change was broadcast on the FM Radio +# I ve called ANRT (telecom regulations in Morocco) at +# +212.537.71.84.00 +# http://www.anrt.net.ma/fr/ +# They said that +# http://www.map.ma/fr/sections/accueil/l_heure_legale_au_ma/view +# is the official publication to look at. +# They said that the decision was already taken. +# +# More articles in the press +# http://www.yabiladi.com/articles/details/5058/secret-l-heure-d-ete-maroc-leve.html +# http://www.lematin.ma/Actualite/Express/Article.asp?id=148923 +# http://www.lavieeco.com/actualite/Le-Maroc-passe-sur-GMT%2B1-a-partir-de-dim + +# From Petr Machata (2011-03-30): +# They have it written in English here: +# http://www.map.ma/eng/sections/home/morocco_to_spring_fo/view +# +# It says there that "Morocco will resume its standard time on July 31, +# 2011 at midnight." Now they don't say whether they mean midnight of +# wall clock time (i.e. 11pm UTC), but that's what I would assume. It has +# also been like that in the past. + +# From Alexander Krivenyshev (2012-03-09): +# According to Infomédiaire web site from Morocco (infomediaire.ma), +# on March 9, 2012, (in French) Heure légale: +# Le Maroc adopte officiellement l'heure d'été +# http://www.infomediaire.ma/news/maroc/heure-l%C3%A9gale-le-maroc-adopte-officiellement-lheure-d%C3%A9t%C3%A9 +# Governing Council adopted draft decree, that Morocco DST starts on +# the last Sunday of March (March 25, 2012) and ends on +# last Sunday of September (September 30, 2012) +# except the month of Ramadan. +# or (brief) +# http://www.worldtimezone.com/dst_news/dst_news_morocco06.html + +# From Arthur David Olson (2012-03-10): +# The infomediaire.ma source indicates that the system is to be in +# effect every year. It gives 03H00 as the "fall back" time of day; +# it lacks a "spring forward" time of day; assume 2:00 XXX. +# Wait on specifying the Ramadan exception for details about +# start date, start time of day, end date, and end time of day XXX. + +# From Christophe Tropamer (2012-03-16): +# Seen Morocco change again: +# http://www.le2uminutes.com/actualite.php +# "...à partir du dernier dimanche d'avril et non fins mars, +# comme annoncé précédemment." + +# From Milamber Space Network (2012-07-17): +# The official return to GMT is announced by the Moroccan government: +# http://www.mmsp.gov.ma/fr/actualites.aspx?id=288 [in French] +# +# Google translation, lightly edited: +# Back to the standard time of the Kingdom (GMT) +# Pursuant to Decree No. 2-12-126 issued on 26 Jumada (I) 1433 (April 18, +# 2012) and in accordance with the order of Mr. President of the +# Government No. 3-47-12 issued on 24 Sha'ban (11 July 2012), the Ministry +# of Public Service and Administration Modernization announces the return +# of the legal time of the Kingdom (GMT) from Friday, July 20, 2012 until +# Monday, August 20, 2012. So the time will be delayed by 60 minutes from +# 3:00 am Friday, July 20, 2012 and will again be advanced by 60 minutes +# August 20, 2012 from 2:00 am. + +# From Paul Eggert (2013-03-06): +# Morocco's daylight-saving transitions due to Ramadan seem to be +# announced a bit in advance. On 2012-07-11 the Moroccan government +# announced that year's Ramadan daylight-saving transitions would be +# 2012-07-20 and 2012-08-20; see +# http://www.mmsp.gov.ma/fr/actualites.aspx?id=288 + +# From Andrew Paprocki (2013-07-02): +# Morocco announced that the year's Ramadan daylight-savings +# transitions would be 2013-07-07 and 2013-08-10; see: +# http://www.maroc.ma/en/news/morocco-suspends-daylight-saving-time-july-7-aug10 + +# From Steffen Thorsen (2013-09-28): +# Morocco extends DST by one month, on very short notice, just 1 day +# before it was going to end. There is a new decree (2.13.781) for +# this, where DST from now on goes from last Sunday of March at 02:00 +# to last Sunday of October at 03:00, similar to EU rules. Official +# source (French): +# http://www.maroc.gov.ma/fr/actualites/lhoraire-dete-gmt1-maintenu-jusquau-27-octobre-2013 +# Another source (specifying the time for start and end in the decree): +# http://www.lemag.ma/Heure-d-ete-au-Maroc-jusqu-au-27-octobre_a75620.html + +# From Sebastien Willemijns (2014-03-18): +# http://www.afriquinfos.com/articles/2014/3/18/maroc-heure-dete-avancez-tous-horloges-247891.asp + +# From Milamber Space Network (2014-06-05): +# The Moroccan government has recently announced that the country will return +# to standard time at 03:00 on Saturday, June 28, 2014 local time.... DST +# will resume again at 02:00 on Saturday, August 2, 2014.... +# http://www.mmsp.gov.ma/fr/actualites.aspx?id=586 + +# From Milamber (2015-06-08): +# (Google Translation) The hour will thus be delayed 60 minutes +# Sunday, June 14 at 3:00, the ministry said in a statement, adding +# that the time will be advanced again 60 minutes Sunday, July 19, +# 2015 at 2:00. The move comes under 2.12.126 Decree of 26 Jumada I +# 1433 (18 April 2012) and the decision of the Head of Government of +# 16 N. 3-29-15 Chaaban 1435 (4 June 2015). +# Source (french): +# http://lnt.ma/le-maroc-reculera-dune-heure-le-dimanche-14-juin/ +# +# From Milamber (2015-06-09): +# http://www.mmsp.gov.ma/fr/actualites.aspx?id=863 +# +# From Michael Deckers (2015-06-09): +# [The gov.ma announcement] would (probably) make the switch on 2015-07-19 go +# from 03:00 to 04:00 rather than from 02:00 to 03:00, as in the patch.... +# I think the patch is correct and the quoted text is wrong; the text in +# <http://lnt.ma/le-maroc-reculera-dune-heure-le-dimanche-14-juin/> agrees +# with the patch. + +# From Paul Eggert (2015-06-08): +# For now, guess that later spring and fall transitions will use 2015's rules, +# and guess that Morocco will switch to standard time at 03:00 the last +# Sunday before Ramadan, and back to DST at 02:00 the first Sunday after +# Ramadan. To implement this, transition dates for 2016 through 2037 were +# determined by running the following program under GNU Emacs 24.3, with the +# results integrated by hand into the table below. +# (let ((islamic-year 1437)) +# (require 'cal-islam) +# (while (< islamic-year 1460) +# (let ((a (calendar-islamic-to-absolute (list 9 1 islamic-year))) +# (b (calendar-islamic-to-absolute (list 10 1 islamic-year))) +# (sunday 0)) +# (while (/= sunday (mod (setq a (1- a)) 7))) +# (while (/= sunday (mod b 7)) +# (setq b (1+ b))) +# (setq a (calendar-gregorian-from-absolute a)) +# (setq b (calendar-gregorian-from-absolute b)) +# (insert +# (format +# (concat "Rule\tMorocco\t%d\tonly\t-\t%s\t%2d\t 3:00\t0\t-\n" +# "Rule\tMorocco\t%d\tonly\t-\t%s\t%2d\t 2:00\t1:00\tS\n") +# (car (cdr (cdr a))) (calendar-month-name (car a) t) (car (cdr a)) +# (car (cdr (cdr b))) (calendar-month-name (car b) t) (car (cdr b))))) +# (setq islamic-year (+ 1 islamic-year)))) + +# RULE NAME FROM TO TYPE IN ON AT SAVE LETTER/S + +Rule Morocco 1939 only - Sep 12 0:00 1:00 S +Rule Morocco 1939 only - Nov 19 0:00 0 - +Rule Morocco 1940 only - Feb 25 0:00 1:00 S +Rule Morocco 1945 only - Nov 18 0:00 0 - +Rule Morocco 1950 only - Jun 11 0:00 1:00 S +Rule Morocco 1950 only - Oct 29 0:00 0 - +Rule Morocco 1967 only - Jun 3 12:00 1:00 S +Rule Morocco 1967 only - Oct 1 0:00 0 - +Rule Morocco 1974 only - Jun 24 0:00 1:00 S +Rule Morocco 1974 only - Sep 1 0:00 0 - +Rule Morocco 1976 1977 - May 1 0:00 1:00 S +Rule Morocco 1976 only - Aug 1 0:00 0 - +Rule Morocco 1977 only - Sep 28 0:00 0 - +Rule Morocco 1978 only - Jun 1 0:00 1:00 S +Rule Morocco 1978 only - Aug 4 0:00 0 - +Rule Morocco 2008 only - Jun 1 0:00 1:00 S +Rule Morocco 2008 only - Sep 1 0:00 0 - +Rule Morocco 2009 only - Jun 1 0:00 1:00 S +Rule Morocco 2009 only - Aug 21 0:00 0 - +Rule Morocco 2010 only - May 2 0:00 1:00 S +Rule Morocco 2010 only - Aug 8 0:00 0 - +Rule Morocco 2011 only - Apr 3 0:00 1:00 S +Rule Morocco 2011 only - Jul 31 0:00 0 - +Rule Morocco 2012 2013 - Apr lastSun 2:00 1:00 S +Rule Morocco 2012 only - Jul 20 3:00 0 - +Rule Morocco 2012 only - Aug 20 2:00 1:00 S +Rule Morocco 2012 only - Sep 30 3:00 0 - +Rule Morocco 2013 only - Jul 7 3:00 0 - +Rule Morocco 2013 only - Aug 10 2:00 1:00 S +Rule Morocco 2013 max - Oct lastSun 3:00 0 - +Rule Morocco 2014 2021 - Mar lastSun 2:00 1:00 S +Rule Morocco 2014 only - Jun 28 3:00 0 - +Rule Morocco 2014 only - Aug 2 2:00 1:00 S +Rule Morocco 2015 only - Jun 14 3:00 0 - +Rule Morocco 2015 only - Jul 19 2:00 1:00 S +Rule Morocco 2016 only - Jun 5 3:00 0 - +Rule Morocco 2016 only - Jul 10 2:00 1:00 S +Rule Morocco 2017 only - May 21 3:00 0 - +Rule Morocco 2017 only - Jul 2 2:00 1:00 S +Rule Morocco 2018 only - May 13 3:00 0 - +Rule Morocco 2018 only - Jun 17 2:00 1:00 S +Rule Morocco 2019 only - May 5 3:00 0 - +Rule Morocco 2019 only - Jun 9 2:00 1:00 S +Rule Morocco 2020 only - Apr 19 3:00 0 - +Rule Morocco 2020 only - May 24 2:00 1:00 S +Rule Morocco 2021 only - Apr 11 3:00 0 - +Rule Morocco 2021 only - May 16 2:00 1:00 S +Rule Morocco 2022 only - May 8 2:00 1:00 S +Rule Morocco 2023 only - Apr 23 2:00 1:00 S +Rule Morocco 2024 only - Apr 14 2:00 1:00 S +Rule Morocco 2025 only - Apr 6 2:00 1:00 S +Rule Morocco 2026 max - Mar lastSun 2:00 1:00 S +Rule Morocco 2036 only - Oct 19 3:00 0 - +Rule Morocco 2037 only - Oct 4 3:00 0 - + +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Africa/Casablanca -0:30:20 - LMT 1913 Oct 26 + 0:00 Morocco WE%sT 1984 Mar 16 + 1:00 - CET 1986 + 0:00 Morocco WE%sT + +# Western Sahara +# +# From Gwillim Law (2013-10-22): +# A correspondent who is usually well informed about time zone matters +# ... says that Western Sahara observes daylight saving time, just as +# Morocco does. +# +# From Paul Eggert (2013-10-23): +# Assume that this has been true since Western Sahara switched to GMT, +# since most of it was then controlled by Morocco. + +Zone Africa/El_Aaiun -0:52:48 - LMT 1934 Jan # El Aaiún + -1:00 - WAT 1976 Apr 14 + 0:00 Morocco WE%sT + +# Mozambique +# +# Shanks gives 1903-03-01 for the transition to CAT. +# Perhaps the 1911-05-26 Portuguese decree +# http://dre.pt/pdf1sdip/1911/05/12500/23132313.pdf +# merely made it official? +# +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Africa/Maputo 2:10:20 - LMT 1903 Mar + 2:00 - CAT +Link Africa/Maputo Africa/Blantyre # Malawi +Link Africa/Maputo Africa/Bujumbura # Burundi +Link Africa/Maputo Africa/Gaborone # Botswana +Link Africa/Maputo Africa/Harare # Zimbabwe +Link Africa/Maputo Africa/Kigali # Rwanda +Link Africa/Maputo Africa/Lubumbashi # E Dem. Rep. of Congo +Link Africa/Maputo Africa/Lusaka # Zambia + +# Namibia +# The 1994-04-03 transition is from Shanks & Pottenger. +# Shanks & Pottenger report no DST after 1998-04; go with IATA. + +# From Petronella Sibeene (2007-03-30): +# http://allafrica.com/stories/200703300178.html +# While the entire country changes its time, Katima Mulilo and other +# settlements in Caprivi unofficially will not because the sun there +# rises and sets earlier compared to other regions. Chief of +# Forecasting Riaan van Zyl explained that the far eastern parts of +# the country are close to 40 minutes earlier in sunrise than the rest +# of the country. +# +# From Paul Eggert (2007-03-31): +# Apparently the Caprivi Strip informally observes Botswana time, but +# we have no details. In the meantime people there can use Africa/Gaborone. + +# RULE NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Namibia 1994 max - Sep Sun>=1 2:00 1:00 S +Rule Namibia 1995 max - Apr Sun>=1 2:00 0 - +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Africa/Windhoek 1:08:24 - LMT 1892 Feb 8 + 1:30 - SWAT 1903 Mar # SW Africa Time + 2:00 - SAST 1942 Sep 20 2:00 + 2:00 1:00 SAST 1943 Mar 21 2:00 + 2:00 - SAST 1990 Mar 21 # independence + 2:00 - CAT 1994 Apr 3 + 1:00 Namibia WA%sT + +# Niger +# See Africa/Lagos. + +# Nigeria +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Africa/Lagos 0:13:36 - LMT 1919 Sep + 1:00 - WAT +Link Africa/Lagos Africa/Bangui # Central African Republic +Link Africa/Lagos Africa/Brazzaville # Rep. of the Congo +Link Africa/Lagos Africa/Douala # Cameroon +Link Africa/Lagos Africa/Kinshasa # Dem. Rep. of the Congo (west) +Link Africa/Lagos Africa/Libreville # Gabon +Link Africa/Lagos Africa/Luanda # Angola +Link Africa/Lagos Africa/Malabo # Equatorial Guinea +Link Africa/Lagos Africa/Niamey # Niger +Link Africa/Lagos Africa/Porto-Novo # Benin + +# Réunion +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Indian/Reunion 3:41:52 - LMT 1911 Jun # Saint-Denis + 4:00 - RET # Réunion Time +# +# Crozet Islands also observes Réunion time; see the 'antarctica' file. +# +# Scattered Islands (Îles Éparses) administered from Réunion are as follows. +# The following information about them is taken from +# Îles Éparses (<http://www.outre-mer.gouv.fr/domtom/ile.htm>, 1997-07-22, +# in French; no longer available as of 1999-08-17). +# We have no info about their time zone histories. +# +# Bassas da India - uninhabited +# Europa Island - inhabited from 1905 to 1910 by two families +# Glorioso Is - inhabited until at least 1958 +# Juan de Nova - uninhabited +# Tromelin - inhabited until at least 1958 + +# Rwanda +# See Africa/Maputo. + +# St Helena +# See Africa/Abidjan. +# The other parts of the St Helena territory are similar: +# Tristan da Cunha: on GMT, say Whitman and the CIA +# Ascension: on GMT, say the USNO (1995-12-21) and the CIA +# Gough (scientific station since 1955; sealers wintered previously): +# on GMT, says the CIA +# Inaccessible, Nightingale: uninhabited + +# São Tomé and Príncipe +# Senegal +# See Africa/Abidjan. + +# Seychelles +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Indian/Mahe 3:41:48 - LMT 1906 Jun # Victoria + 4:00 - SCT # Seychelles Time +# From Paul Eggert (2001-05-30): +# Aldabra, Farquhar, and Desroches, originally dependencies of the +# Seychelles, were transferred to the British Indian Ocean Territory +# in 1965 and returned to Seychelles control in 1976. We don't know +# whether this affected their time zone, so omit this for now. +# Possibly the islands were uninhabited. + +# Sierra Leone +# See Africa/Abidjan. + +# Somalia +# See Africa/Nairobi. + +# South Africa +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule SA 1942 1943 - Sep Sun>=15 2:00 1:00 - +Rule SA 1943 1944 - Mar Sun>=15 2:00 0 - +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Africa/Johannesburg 1:52:00 - LMT 1892 Feb 8 + 1:30 - SAST 1903 Mar + 2:00 SA SAST +Link Africa/Johannesburg Africa/Maseru # Lesotho +Link Africa/Johannesburg Africa/Mbabane # Swaziland +# +# Marion and Prince Edward Is +# scientific station since 1947 +# no information + +# Sudan +# +# From <http://www.sunanews.net/sn13jane.html> +# Sudan News Agency (2000-01-13), +# also reported by Michaël De Beukelaer-Dossche via Steffen Thorsen: +# Clocks will be moved ahead for 60 minutes all over the Sudan as of noon +# Saturday.... This was announced Thursday by Caretaker State Minister for +# Manpower Abdul-Rahman Nur-Eddin. +# +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Sudan 1970 only - May 1 0:00 1:00 S +Rule Sudan 1970 1985 - Oct 15 0:00 0 - +Rule Sudan 1971 only - Apr 30 0:00 1:00 S +Rule Sudan 1972 1985 - Apr lastSun 0:00 1:00 S +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Africa/Khartoum 2:10:08 - LMT 1931 + 2:00 Sudan CA%sT 2000 Jan 15 12:00 + 3:00 - EAT + +# South Sudan +Link Africa/Khartoum Africa/Juba + +# Swaziland +# See Africa/Johannesburg. + +# Tanzania +# See Africa/Nairobi. + +# Togo +# See Africa/Abidjan. + +# Tunisia + +# From Gwillim Law (2005-04-30): +# My correspondent, Risto Nykänen, has alerted me to another adoption of DST, +# this time in Tunisia. According to Yahoo France News +# <http://fr.news.yahoo.com/050426/5/4dumk.html>, in a story attributed to AP +# and dated 2005-04-26, "Tunisia has decided to advance its official time by +# one hour, starting on Sunday, May 1. Henceforth, Tunisian time will be +# UTC+2 instead of UTC+1. The change will take place at 23:00 UTC next +# Saturday." (My translation) +# +# From Oscar van Vlijmen (2005-05-02): +# La Presse, the first national daily newspaper ... +# http://www.lapresse.tn/archives/archives280405/actualites/lheure.html +# ... DST for 2005: on: Sun May 1 0h standard time, off: Fri Sept. 30, +# 1h standard time. +# +# From Atef Loukil (2006-03-28): +# The daylight saving time will be the same each year: +# Beginning : the last Sunday of March at 02:00 +# Ending : the last Sunday of October at 03:00 ... +# http://www.tap.info.tn/en/index.php?option=com_content&task=view&id=1188&Itemid=50 + +# From Steffen Thorsen (2009-03-16): +# According to several news sources, Tunisia will not observe DST this year. +# (Arabic) +# http://www.elbashayer.com/?page=viewn&nid=42546 +# http://www.babnet.net/kiwidetail-15295.asp +# +# We have also confirmed this with the US embassy in Tunisia. +# We have a wrap-up about this on the following page: +# http://www.timeanddate.com/news/time/tunisia-cancels-dst-2009.html + +# From Alexander Krivenyshev (2009-03-17): +# Here is a link to Tunis Afrique Presse News Agency +# +# Standard time to be kept the whole year long (tap.info.tn): +# +# (in English) +# http://www.tap.info.tn/en/index.php?option=com_content&task=view&id=26813&Itemid=157 +# +# (in Arabic) +# http://www.tap.info.tn/ar/index.php?option=com_content&task=view&id=61240&Itemid=1 + +# From Arthur David Olson (2009-03-18): +# The Tunis Afrique Presse News Agency notice contains this: "This measure is +# due to the fact that the fasting month of Ramadan coincides with the period +# concerned by summer time. Therefore, the standard time will be kept +# unchanged the whole year long." So foregoing DST seems to be an exception +# (albeit one that may be repeated in the future). + +# From Alexander Krivenyshev (2010-03-27): +# According to some news reports Tunis confirmed not to use DST in 2010 +# +# (translation): +# "The Tunisian government has decided to abandon DST, which was scheduled on +# Sunday... +# Tunisian authorities had suspended the DST for the first time last year also +# coincided with the month of Ramadan..." +# +# (in Arabic) +# http://www.moheet.com/show_news.aspx?nid=358861&pg=1 +# http://www.almadenahnews.com/newss/news.php?c=118&id=38036 +# http://www.worldtimezone.com/dst_news/dst_news_tunis02.html + +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Tunisia 1939 only - Apr 15 23:00s 1:00 S +Rule Tunisia 1939 only - Nov 18 23:00s 0 - +Rule Tunisia 1940 only - Feb 25 23:00s 1:00 S +Rule Tunisia 1941 only - Oct 6 0:00 0 - +Rule Tunisia 1942 only - Mar 9 0:00 1:00 S +Rule Tunisia 1942 only - Nov 2 3:00 0 - +Rule Tunisia 1943 only - Mar 29 2:00 1:00 S +Rule Tunisia 1943 only - Apr 17 2:00 0 - +Rule Tunisia 1943 only - Apr 25 2:00 1:00 S +Rule Tunisia 1943 only - Oct 4 2:00 0 - +Rule Tunisia 1944 1945 - Apr Mon>=1 2:00 1:00 S +Rule Tunisia 1944 only - Oct 8 0:00 0 - +Rule Tunisia 1945 only - Sep 16 0:00 0 - +Rule Tunisia 1977 only - Apr 30 0:00s 1:00 S +Rule Tunisia 1977 only - Sep 24 0:00s 0 - +Rule Tunisia 1978 only - May 1 0:00s 1:00 S +Rule Tunisia 1978 only - Oct 1 0:00s 0 - +Rule Tunisia 1988 only - Jun 1 0:00s 1:00 S +Rule Tunisia 1988 1990 - Sep lastSun 0:00s 0 - +Rule Tunisia 1989 only - Mar 26 0:00s 1:00 S +Rule Tunisia 1990 only - May 1 0:00s 1:00 S +Rule Tunisia 2005 only - May 1 0:00s 1:00 S +Rule Tunisia 2005 only - Sep 30 1:00s 0 - +Rule Tunisia 2006 2008 - Mar lastSun 2:00s 1:00 S +Rule Tunisia 2006 2008 - Oct lastSun 2:00s 0 - + +# Shanks & Pottenger give 0:09:20 for Paris Mean Time; go with Howse's +# more precise 0:09:21. +# Shanks & Pottenger say the 1911 switch was on Mar 9; go with Howse's Mar 11. +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Africa/Tunis 0:40:44 - LMT 1881 May 12 + 0:09:21 - PMT 1911 Mar 11 # Paris Mean Time + 1:00 Tunisia CE%sT + +# Uganda +# See Africa/Nairobi. + +# Zambia +# Zimbabwe +# See Africa/Maputo. diff --git a/tz/antarctica b/tz/antarctica new file mode 100644 index 0000000..a537832 --- /dev/null +++ b/tz/antarctica @@ -0,0 +1,337 @@ +# This file is in the public domain, so clarified as of +# 2009-05-17 by Arthur David Olson. + +# From Paul Eggert (1999-11-15): +# To keep things manageable, we list only locations occupied year-round; see +# COMNAP - Stations and Bases +# http://www.comnap.aq/comnap/comnap.nsf/P/Stations/ +# and +# Summary of the Peri-Antarctic Islands (1998-07-23) +# http://www.spri.cam.ac.uk/bob/periant.htm +# for information. +# Unless otherwise specified, we have no time zone information. +# +# Except for the French entries, +# I made up all time zone abbreviations mentioned here; corrections welcome! +# FORMAT is '-00' and GMTOFF is 0 for locations while uninhabited. + +# Argentina - year-round bases +# Belgrano II, Confin Coast, -770227-0343737, since 1972-02-05 +# Carlini, Potter Cove, King George Island, -6414-0602320, since 1982-01 +# Esperanza, Hope Bay, -6323-05659, since 1952-12-17 +# Marambio, -6414-05637, since 1969-10-29 +# Orcadas, Laurie I, -6016-04444, since 1904-02-22 +# San Martín, Barry I, -6808-06706, since 1951-03-21 +# (except 1960-03 / 1976-03-21) + +# Australia - territories +# Heard Island, McDonald Islands (uninhabited) +# previously sealers and scientific personnel wintered +# Margaret Turner reports +# http://web.archive.org/web/20021204222245/http://www.dstc.qut.edu.au/DST/marg/daylight.html +# (1999-09-30) that they're UTC+5, with no DST; +# presumably this is when they have visitors. +# +# year-round bases +# Casey, Bailey Peninsula, -6617+11032, since 1969 +# Davis, Vestfold Hills, -6835+07759, since 1957-01-13 +# (except 1964-11 - 1969-02) +# Mawson, Holme Bay, -6736+06253, since 1954-02-13 + +# From Steffen Thorsen (2009-03-11): +# Three Australian stations in Antarctica have changed their time zone: +# Casey moved from UTC+8 to UTC+11 +# Davis moved from UTC+7 to UTC+5 +# Mawson moved from UTC+6 to UTC+5 +# The changes occurred on 2009-10-18 at 02:00 (local times). +# +# Government source: (Australian Antarctic Division) +# http://www.aad.gov.au/default.asp?casid=37079 +# +# We have more background information here: +# http://www.timeanddate.com/news/time/antarctica-new-times.html + +# From Steffen Thorsen (2010-03-10): +# We got these changes from the Australian Antarctic Division: ... +# +# - Casey station reverted to its normal time of UTC+8 on 5 March 2010. +# The change to UTC+11 is being considered as a regular summer thing but +# has not been decided yet. +# +# - Davis station will revert to its normal time of UTC+7 at 10 March 2010 +# 20:00 UTC. +# +# - Mawson station stays on UTC+5. +# +# Background: +# http://www.timeanddate.com/news/time/antartica-time-changes-2010.html + +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Antarctica/Casey 0 - -00 1969 + 8:00 - AWST 2009 Oct 18 2:00 + # Australian Western Std Time + 11:00 - CAST 2010 Mar 5 2:00 # Casey Time + 8:00 - AWST 2011 Oct 28 2:00 + 11:00 - CAST 2012 Feb 21 17:00u + 8:00 - AWST +Zone Antarctica/Davis 0 - -00 1957 Jan 13 + 7:00 - DAVT 1964 Nov # Davis Time + 0 - -00 1969 Feb + 7:00 - DAVT 2009 Oct 18 2:00 + 5:00 - DAVT 2010 Mar 10 20:00u + 7:00 - DAVT 2011 Oct 28 2:00 + 5:00 - DAVT 2012 Feb 21 20:00u + 7:00 - DAVT +Zone Antarctica/Mawson 0 - -00 1954 Feb 13 + 6:00 - MAWT 2009 Oct 18 2:00 # Mawson Time + 5:00 - MAWT +# References: +# Casey Weather (1998-02-26) +# http://www.antdiv.gov.au/aad/exop/sfo/casey/casey_aws.html +# Davis Station, Antarctica (1998-02-26) +# http://www.antdiv.gov.au/aad/exop/sfo/davis/video.html +# Mawson Station, Antarctica (1998-02-25) +# http://www.antdiv.gov.au/aad/exop/sfo/mawson/video.html + +# Belgium - year-round base +# Princess Elisabeth, Queen Maud Land, -713412+0231200, since 2007 + +# Brazil - year-round base +# Ferraz, King George Island, -6205+05824, since 1983/4 + +# Bulgaria - year-round base +# St. Kliment Ohridski, Livingston Island, -623829-0602153, since 1988 + +# Chile - year-round bases and towns +# Escudero, South Shetland Is, -621157-0585735, since 1994 +# Frei Montalva, King George Island, -6214-05848, since 1969-03-07 +# O'Higgins, Antarctic Peninsula, -6319-05704, since 1948-02 +# Prat, -6230-05941 +# Villa Las Estrellas (a town), around the Frei base, since 1984-04-09 +# These locations have always used Santiago time; use TZ='America/Santiago'. + +# China - year-round bases +# Great Wall, King George Island, -6213-05858, since 1985-02-20 +# Zhongshan, Larsemann Hills, Prydz Bay, -6922+07623, since 1989-02-26 + +# France - year-round bases (also see "France & Italy") +# +# From Antoine Leca (1997-01-20): +# Time data entries are from Nicole Pailleau at the IFRTP +# (French Institute for Polar Research and Technology). +# She confirms that French Southern Territories and Terre Adélie bases +# don't observe daylight saving time, even if Terre Adélie supplies came +# from Tasmania. +# +# French Southern Territories with year-round inhabitants +# +# Alfred Faure, Possession Island, Crozet Islands, -462551+0515152, since 1964; +# sealing & whaling stations operated variously 1802/1911+; +# see Indian/Reunion. +# +# Martin-de-Viviès, Amsterdam Island, -374105+0773155, since 1950 +# Port-aux-Français, Kerguelen Islands, -492110+0701303, since 1951; +# whaling & sealing station operated 1908/1914, 1920/1929, and 1951/1956 +# +# St Paul Island - near Amsterdam, uninhabited +# fishing stations operated variously 1819/1931 +# +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Indian/Kerguelen 0 - -00 1950 # Port-aux-Français + 5:00 - TFT # ISO code TF Time +# +# year-round base in the main continent +# Dumont d'Urville, Île des Pétrels, -6640+14001, since 1956-11 +# <http://en.wikipedia.org/wiki/Dumont_d'Urville_Station> (2005-12-05) +# +# Another base at Port-Martin, 50km east, began operation in 1947. +# It was destroyed by fire on 1952-01-14. +# +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Antarctica/DumontDUrville 0 - -00 1947 + 10:00 - PMT 1952 Jan 14 # Port-Martin Time + 0 - -00 1956 Nov + 10:00 - DDUT # Dumont-d'Urville Time + +# France & Italy - year-round base +# Concordia, -750600+1232000, since 2005 + +# Germany - year-round base +# Neumayer III, -704080-0081602, since 2009 + +# India - year-round bases +# Bharati, -692428+0761114, since 2012 +# Maitri, -704558+0114356, since 1989 + +# Italy - year-round base (also see "France & Italy") +# Zuchelli, Terra Nova Bay, -744140+1640647, since 1986 + +# Japan - year-round bases +# Syowa (also known as Showa), -690022+0393524, since 1957 +# +# From Hideyuki Suzuki (1999-02-06): +# In all Japanese stations, +0300 is used as the standard time. +# +# Syowa station, which is the first antarctic station of Japan, +# was established on 1957-01-29. Since Syowa station is still the main +# station of Japan, it's appropriate for the principal location. +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Antarctica/Syowa 0 - -00 1957 Jan 29 + 3:00 - SYOT # Syowa Time +# See: +# NIPR Antarctic Research Activities (1999-08-17) +# http://www.nipr.ac.jp/english/ara01.html + +# S Korea - year-round base +# Jang Bogo, Terra Nova Bay, -743700+1641205 since 2014 +# King Sejong, King George Island, -6213-05847, since 1988 + +# New Zealand - claims +# Balleny Islands (never inhabited) +# Scott Island (never inhabited) +# +# year-round base +# Scott Base, Ross Island, since 1957-01. +# See Pacific/Auckland. + +# Norway - territories +# Bouvet (never inhabited) +# +# claims +# Peter I Island (never inhabited) +# +# year-round base +# Troll, Queen Maud Land, -720041+0023206, since 2005-02-12 +# +# From Paul-Inge Flakstad (2014-03-10): +# I recently had a long dialog about this with the developer of timegenie.com. +# In the absence of specific dates, he decided to choose some likely ones: +# GMT +1 - From March 1 to the last Sunday in March +# GMT +2 - From the last Sunday in March until the last Sunday in October +# GMT +1 - From the last Sunday in October until November 7 +# GMT +0 - From November 7 until March 1 +# The dates for switching to and from UTC+0 will probably not be absolutely +# correct, but they should be quite close to the actual dates. +# +# From Paul Eggert (2014-03-21): +# The CET-switching Troll rules require zic from tzcode 2014b or later, so as +# suggested by Bengt-Inge Larsson comment them out for now, and approximate +# with only UTC and CEST. Uncomment them when 2014b is more prevalent. +# +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +#Rule Troll 2005 max - Mar 1 1:00u 1:00 CET +Rule Troll 2005 max - Mar lastSun 1:00u 2:00 CEST +#Rule Troll 2005 max - Oct lastSun 1:00u 1:00 CET +#Rule Troll 2004 max - Nov 7 1:00u 0:00 UTC +# Remove the following line when uncommenting the above '#Rule' lines. +Rule Troll 2004 max - Oct lastSun 1:00u 0:00 UTC +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Antarctica/Troll 0 - -00 2005 Feb 12 + 0:00 Troll %s + +# Poland - year-round base +# Arctowski, King George Island, -620945-0582745, since 1977 + +# Romania - year-bound base +# Law-Racoviță, Larsemann Hills, -692319+0762251, since 1986 + +# Russia - year-round bases +# Bellingshausen, King George Island, -621159-0585337, since 1968-02-22 +# Mirny, Davis coast, -6633+09301, since 1956-02 +# Molodezhnaya, Alasheyev Bay, -6740+04551, +# year-round from 1962-02 to 1999-07-01 +# Novolazarevskaya, Queen Maud Land, -7046+01150, +# year-round from 1960/61 to 1992 + +# Vostok, since 1957-12-16, temporarily closed 1994-02/1994-11 +# From Craig Mundell (1994-12-15): +# http://quest.arc.nasa.gov/antarctica/QA/computers/Directions,Time,ZIP +# Vostok, which is one of the Russian stations, is set on the same +# time as Moscow, Russia. +# +# From Lee Hotz (2001-03-08): +# I queried the folks at Columbia who spent the summer at Vostok and this is +# what they had to say about time there: +# "in the US Camp (East Camp) we have been on New Zealand (McMurdo) +# time, which is 12 hours ahead of GMT. The Russian Station Vostok was +# 6 hours behind that (although only 2 miles away, i.e. 6 hours ahead +# of GMT). This is a time zone I think two hours east of Moscow. The +# natural time zone is in between the two: 8 hours ahead of GMT." +# +# From Paul Eggert (2001-05-04): +# This seems to be hopelessly confusing, so I asked Lee Hotz about it +# in person. He said that some Antarctic locations set their local +# time so that noon is the warmest part of the day, and that this +# changes during the year and does not necessarily correspond to mean +# solar noon. So the Vostok time might have been whatever the clocks +# happened to be during their visit. So we still don't really know what time +# it is at Vostok. But we'll guess UTC+6. +# +Zone Antarctica/Vostok 0 - -00 1957 Dec 16 + 6:00 - VOST # Vostok time + +# S Africa - year-round bases +# Marion Island, -4653+03752 +# SANAE IV, Vesleskarvet, Queen Maud Land, -714022-0025026, since 1997 + +# Ukraine - year-round base +# Vernadsky (formerly Faraday), Galindez Island, -651445-0641526, since 1954 + +# United Kingdom +# +# British Antarctic Territories (BAT) claims +# South Orkney Islands +# scientific station from 1903 +# whaling station at Signy I 1920/1926 +# South Shetland Islands +# +# year-round bases +# Bird Island, South Georgia, -5400-03803, since 1983 +# Deception Island, -6259-06034, whaling station 1912/1931, +# scientific station 1943/1967, +# previously sealers and a scientific expedition wintered by accident, +# and a garrison was deployed briefly +# Halley, Coates Land, -7535-02604, since 1956-01-06 +# Halley is on a moving ice shelf and is periodically relocated +# so that it is never more than 10km from its nominal location. +# Rothera, Adelaide Island, -6734-6808, since 1976-12-01 +# +# From Paul Eggert (2002-10-22) +# <http://webexhibits.org/daylightsaving/g.html> says Rothera is -03 all year. +# +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Antarctica/Rothera 0 - -00 1976 Dec 1 + -3:00 - ROTT # Rothera time + +# Uruguay - year round base +# Artigas, King George Island, -621104-0585107 + +# USA - year-round bases +# +# Palmer, Anvers Island, since 1965 (moved 2 miles in 1968) +# See 'southamerica' for Antarctica/Palmer, since it uses South American DST. +# +# McMurdo Station, Ross Island, since 1955-12 +# Amundsen-Scott South Pole Station, continuously occupied since 1956-11-20 +# +# From Chris Carrier (1996-06-27): +# Siple, the first commander of the South Pole station, +# stated that he would have liked to have kept GMT at the station, +# but that he found it more convenient to keep GMT+12 +# as supplies for the station were coming from McMurdo Sound, +# which was on GMT+12 because New Zealand was on GMT+12 all year +# at that time (1957). (Source: Siple's book 90 Degrees South.) +# +# From Susan Smith +# http://www.cybertours.com/whs/pole10.html +# (1995-11-13 16:24:56 +1300, no longer available): +# We use the same time as McMurdo does. +# And they use the same time as Christchurch, NZ does.... +# One last quirk about South Pole time. +# All the electric clocks are usually wrong. +# Something about the generators running at 60.1hertz or something +# makes all of the clocks run fast. So every couple of days, +# we have to go around and set them back 5 minutes or so. +# Maybe if we let them run fast all of the time, we'd get to leave here sooner!! +# +# See 'australasia' for Antarctica/McMurdo. diff --git a/tz/asctime.c b/tz/asctime.c new file mode 100644 index 0000000..1a906b6 --- /dev/null +++ b/tz/asctime.c @@ -0,0 +1,128 @@ +/* +** This file is in the public domain, so clarified as of +** 1996-06-05 by Arthur David Olson. +*/ + +/* +** Avoid the temptation to punt entirely to strftime; +** the output of strftime is supposed to be locale specific +** whereas the output of asctime is supposed to be constant. +*/ + +/*LINTLIBRARY*/ + +#include "private.h" +#include "tzfile.h" + +/* +** Some systems only handle "%.2d"; others only handle "%02d"; +** "%02.2d" makes (most) everybody happy. +** At least some versions of gcc warn about the %02.2d; +** we conditionalize below to avoid the warning. +*/ +/* +** All years associated with 32-bit time_t values are exactly four digits long; +** some years associated with 64-bit time_t values are not. +** Vintage programs are coded for years that are always four digits long +** and may assume that the newline always lands in the same place. +** For years that are less than four digits, we pad the output with +** leading zeroes to get the newline in the traditional place. +** The -4 ensures that we get four characters of output even if +** we call a strftime variant that produces fewer characters for some years. +** The ISO C 1999 and POSIX 1003.1-2004 standards prohibit padding the year, +** but many implementations pad anyway; most likely the standards are buggy. +*/ +#ifdef __GNUC__ +#define ASCTIME_FMT "%.3s %.3s%3d %2.2d:%2.2d:%2.2d %-4s\n" +#else /* !defined __GNUC__ */ +#define ASCTIME_FMT "%.3s %.3s%3d %02.2d:%02.2d:%02.2d %-4s\n" +#endif /* !defined __GNUC__ */ +/* +** For years that are more than four digits we put extra spaces before the year +** so that code trying to overwrite the newline won't end up overwriting +** a digit within a year and truncating the year (operating on the assumption +** that no output is better than wrong output). +*/ +#ifdef __GNUC__ +#define ASCTIME_FMT_B "%.3s %.3s%3d %2.2d:%2.2d:%2.2d %s\n" +#else /* !defined __GNUC__ */ +#define ASCTIME_FMT_B "%.3s %.3s%3d %02.2d:%02.2d:%02.2d %s\n" +#endif /* !defined __GNUC__ */ + +#define STD_ASCTIME_BUF_SIZE 26 +/* +** Big enough for something such as +** ??? ???-2147483648 -2147483648:-2147483648:-2147483648 -2147483648\n +** (two three-character abbreviations, five strings denoting integers, +** seven explicit spaces, two explicit colons, a newline, +** and a trailing NUL byte). +** The values above are for systems where an int is 32 bits and are provided +** as an example; the define below calculates the maximum for the system at +** hand. +*/ +#define MAX_ASCTIME_BUF_SIZE (2*3+5*INT_STRLEN_MAXIMUM(int)+7+2+1+1) + +static char buf_asctime[MAX_ASCTIME_BUF_SIZE]; + +/* +** A la ISO/IEC 9945-1, ANSI/IEEE Std 1003.1, 2004 Edition. +*/ + +char * +asctime_r(register const struct tm *timeptr, char *buf) +{ + static const char wday_name[][3] = { + "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" + }; + static const char mon_name[][3] = { + "Jan", "Feb", "Mar", "Apr", "May", "Jun", + "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" + }; + register const char * wn; + register const char * mn; + char year[INT_STRLEN_MAXIMUM(int) + 2]; + char result[MAX_ASCTIME_BUF_SIZE]; + + if (timeptr == NULL) { + errno = EINVAL; + return strcpy(buf, "??? ??? ?? ??:??:?? ????\n"); + } + if (timeptr->tm_wday < 0 || timeptr->tm_wday >= DAYSPERWEEK) + wn = "???"; + else wn = wday_name[timeptr->tm_wday]; + if (timeptr->tm_mon < 0 || timeptr->tm_mon >= MONSPERYEAR) + mn = "???"; + else mn = mon_name[timeptr->tm_mon]; + /* + ** Use strftime's %Y to generate the year, to avoid overflow problems + ** when computing timeptr->tm_year + TM_YEAR_BASE. + ** Assume that strftime is unaffected by other out-of-range members + ** (e.g., timeptr->tm_mday) when processing "%Y". + */ + strftime(year, sizeof year, "%Y", timeptr); + /* + ** We avoid using snprintf since it's not available on all systems. + */ + sprintf(result, + ((strlen(year) <= 4) ? ASCTIME_FMT : ASCTIME_FMT_B), + wn, mn, + timeptr->tm_mday, timeptr->tm_hour, + timeptr->tm_min, timeptr->tm_sec, + year); + if (strlen(result) < STD_ASCTIME_BUF_SIZE || buf == buf_asctime) + return strcpy(buf, result); + else { + errno = EOVERFLOW; + return NULL; + } +} + +/* +** A la ISO/IEC 9945-1, ANSI/IEEE Std 1003.1, 2004 Edition. +*/ + +char * +asctime(register const struct tm *timeptr) +{ + return asctime_r(timeptr, buf_asctime); +} @@ -0,0 +1,3066 @@ +# This file is in the public domain, so clarified as of +# 2009-05-17 by Arthur David Olson. + +# This file is by no means authoritative; if you think you know better, +# go ahead and edit the file (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 (2015-08-08): +# +# 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. +# +# Gwillim Law writes that a good source +# for recent time zone data is the International Air Transport +# Association's Standard Schedules Information Manual (IATA SSIM), +# published semiannually. Law sent in several helpful summaries +# of the IATA's data after 1990. Except where otherwise noted, +# IATA SSIM is the source for entries after 1990. +# +# Another source occasionally used is Edward W. Whitman, World Time Differences, +# Whitman Publishing Co, 2 Niagara Av, Ealing, London (undated), which +# I found in the UCLA library. +# +# For data circa 1899, a common source is: +# Milne J. Civil time. Geogr J. 1899 Feb;13(2):173-94. +# http://www.jstor.org/stable/1774359 +# +# For Russian data circa 1919, a source is: +# Byalokoz EL. New Counting of Time in Russia since July 1, 1919. +# (See the 'europe' file for a fuller citation.) +# +# A reliable and entertaining source about time zones is +# Derek Howse, Greenwich time and longitude, Philip Wilson Publishers (1997). +# +# I invented the abbreviations marked '*' in the following table; +# the rest are from earlier versions of this file, or from other sources. +# Corrections are welcome! +# std dst +# LMT Local Mean Time +# 2:00 EET EEST Eastern European Time +# 2:00 IST IDT Israel +# 3:00 AST ADT Arabia* +# 3:30 IRST IRDT Iran* +# 4:00 GST Gulf* +# 5:30 IST India +# 7:00 ICT Indochina, most times and locations* +# 7:00 WIB west Indonesia (Waktu Indonesia Barat) +# 8:00 WITA central Indonesia (Waktu Indonesia Tengah) +# 8:00 CST China +# 8:00 IDT Indochina, 1943-45, 1947-55, 1960-75 (some locations)* +# 8:00 JWST Western Standard Time (Japan, 1896/1937)* +# 8:30 KST KDT Korea when at +0830* +# 9:00 JCST Central Standard Time (Japan, 1896/1937) +# 9:00 WIT east Indonesia (Waktu Indonesia Timur) +# 9:00 JST JDT Japan +# 9:00 KST KDT Korea when at +09 +# 9:30 ACST Australian Central Standard Time +# +# See the 'europe' file for Russia and Turkey in Asia. + +# From Guy Harris: +# Incorporates data for Singapore from Robert Elz' asia 1.1, as well as +# additional information from Tom Yap, Sun Microsystems Intercontinental +# Technical Support (including a page from the Official Airline Guide - +# Worldwide Edition). The names for time zones are guesses. + +############################################################################### + +# These rules are stolen from the 'europe' file. +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule EUAsia 1981 max - Mar lastSun 1:00u 1:00 S +Rule EUAsia 1979 1995 - Sep lastSun 1:00u 0 - +Rule EUAsia 1996 max - Oct lastSun 1:00u 0 - +Rule E-EurAsia 1981 max - Mar lastSun 0:00 1:00 S +Rule E-EurAsia 1979 1995 - Sep lastSun 0:00 0 - +Rule E-EurAsia 1996 max - Oct lastSun 0:00 0 - +Rule RussiaAsia 1981 1984 - Apr 1 0:00 1:00 S +Rule RussiaAsia 1981 1983 - Oct 1 0:00 0 - +Rule RussiaAsia 1984 1995 - Sep lastSun 2:00s 0 - +Rule RussiaAsia 1985 2011 - Mar lastSun 2:00s 1:00 S +Rule RussiaAsia 1996 2011 - Oct lastSun 2:00s 0 - + +# Afghanistan +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Asia/Kabul 4:36:48 - LMT 1890 + 4:00 - AFT 1945 + 4:30 - AFT + +# Armenia +# From Paul Eggert (2006-03-22): +# Shanks & Pottenger have Yerevan switching to 3:00 (with Russian DST) +# in spring 1991, then to 4:00 with no DST in fall 1995, then +# readopting Russian DST in 1997. Go with Shanks & Pottenger, even +# when they disagree with others. Edgar Der-Danieliantz +# reported (1996-05-04) that Yerevan probably wouldn't use DST +# in 1996, though it did use DST in 1995. IATA SSIM (1991/1998) reports that +# Armenia switched from 3:00 to 4:00 in 1998 and observed DST after 1991, +# but started switching at 3:00s in 1998. + +# From Arthur David Olson (2011-06-15): +# While Russia abandoned DST in 2011, Armenia may choose to +# follow Russia's "old" rules. + +# From Alexander Krivenyshev (2012-02-10): +# According to News Armenia, on Feb 9, 2012, +# http://newsarmenia.ru/society/20120209/42609695.html +# +# The Armenia National Assembly adopted final reading of Amendments to the +# Law "On procedure of calculation time on the territory of the Republic of +# Armenia" according to which Armenia [is] abolishing Daylight Saving Time. +# or +# (brief) +# http://www.worldtimezone.com/dst_news/dst_news_armenia03.html +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Asia/Yerevan 2:58:00 - LMT 1924 May 2 + 3:00 - YERT 1957 Mar # Yerevan Time + 4:00 RussiaAsia YER%sT 1991 Mar 31 2:00s + 3:00 1:00 YERST 1991 Sep 23 # independence + 3:00 RussiaAsia AM%sT 1995 Sep 24 2:00s + 4:00 - AMT 1997 + 4:00 RussiaAsia AM%sT 2012 Feb 9 + 4:00 - AMT + +# Azerbaijan + +# From Rustam Aliyev of the Azerbaijan Internet Forum (2005-10-23): +# According to the resolution of Cabinet of Ministers, 1997 +# From Paul Eggert (2015-09-17): It was Resolution No. 21 (1997-03-17). +# http://code.az/files/daylight_res.pdf + +# From Steffen Thorsen (2016-03-17): +# ... the Azerbaijani Cabinet of Ministers has cancelled switching to +# daylight saving time.... +# http://www.azernews.az/azerbaijan/94137.html +# http://vestnikkavkaza.net/news/Azerbaijani-Cabinet-of-Ministers-cancels-daylight-saving-time.html +# http://en.apa.az/xeber_azerbaijan_abolishes_daylight_savings_ti_240862.html + +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Azer 1997 2015 - Mar lastSun 4:00 1:00 S +Rule Azer 1997 2015 - Oct lastSun 5:00 0 - +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Asia/Baku 3:19:24 - LMT 1924 May 2 + 3:00 - BAKT 1957 Mar # Baku Time + 4:00 RussiaAsia BAK%sT 1991 Mar 31 2:00s + 3:00 1:00 BAKST 1991 Aug 30 # independence + 3:00 RussiaAsia AZ%sT 1992 Sep lastSun 2:00s + 4:00 - AZT 1996 # Azerbaijan Time + 4:00 EUAsia AZ%sT 1997 + 4:00 Azer AZ%sT + +# Bahrain +# See Asia/Qatar. + +# Bangladesh +# From Alexander Krivenyshev (2009-05-13): +# According to newspaper Asian Tribune (May 6, 2009) Bangladesh may introduce +# Daylight Saving Time from June 16 to Sept 30 +# +# Bangladesh to introduce daylight saving time likely from June 16 +# http://www.asiantribune.com/?q=node/17288 +# http://www.worldtimezone.com/dst_news/dst_news_bangladesh02.html +# +# "... Bangladesh government has decided to switch daylight saving time from +# June +# 16 till September 30 in a bid to ensure maximum use of daylight to cope with +# crippling power crisis. " +# +# The switch will remain in effect from June 16 to Sept 30 (2009) but if +# implemented the next year, it will come in force from April 1, 2010 + +# From Steffen Thorsen (2009-06-02): +# They have finally decided now, but changed the start date to midnight between +# the 19th and 20th, and they have not set the end date yet. +# +# Some sources: +# http://in.reuters.com/article/southAsiaNews/idINIndia-40017620090601 +# http://bdnews24.com/details.php?id=85889&cid=2 +# +# Our wrap-up: +# http://www.timeanddate.com/news/time/bangladesh-daylight-saving-2009.html + +# From A. N. M. Kamrus Saadat (2009-06-15): +# Finally we've got the official mail regarding DST start time where DST start +# time is mentioned as Jun 19 2009, 23:00 from BTRC (Bangladesh +# Telecommunication Regulatory Commission). +# +# No DST end date has been announced yet. + +# From Alexander Krivenyshev (2009-09-25): +# Bangladesh won't go back to Standard Time from October 1, 2009, +# instead it will continue DST measure till the cabinet makes a fresh decision. +# +# Following report by same newspaper-"The Daily Star Friday": +# "DST change awaits cabinet decision-Clock won't go back by 1-hr from Oct 1" +# http://www.thedailystar.net/newDesign/news-details.php?nid=107021 +# http://www.worldtimezone.com/dst_news/dst_news_bangladesh04.html + +# From Steffen Thorsen (2009-10-13): +# IANS (Indo-Asian News Service) now reports: +# Bangladesh has decided that the clock advanced by an hour to make +# maximum use of daylight hours as an energy saving measure would +# "continue for an indefinite period." +# +# One of many places where it is published: +# http://www.thaindian.com/newsportal/business/bangladesh-to-continue-indefinitely-with-advanced-time_100259987.html + +# From Alexander Krivenyshev (2009-12-24): +# According to Bangladesh newspaper "The Daily Star," +# Bangladesh will change its clock back to Standard Time on Dec 31, 2009. +# +# Clock goes back 1-hr on Dec 31 night. +# http://www.thedailystar.net/newDesign/news-details.php?nid=119228 +# http://www.worldtimezone.com/dst_news/dst_news_bangladesh05.html +# +# "...The government yesterday decided to put the clock back by one hour +# on December 31 midnight and the new time will continue until March 31, +# 2010 midnight. The decision came at a cabinet meeting at the Prime +# Minister's Office last night..." + +# From Alexander Krivenyshev (2010-03-22): +# According to Bangladesh newspaper "The Daily Star," +# Cabinet cancels Daylight Saving Time +# http://www.thedailystar.net/newDesign/latest_news.php?nid=22817 +# http://www.worldtimezone.com/dst_news/dst_news_bangladesh06.html + +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Dhaka 2009 only - Jun 19 23:00 1:00 S +Rule Dhaka 2009 only - Dec 31 24:00 0 - + +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Asia/Dhaka 6:01:40 - LMT 1890 + 5:53:20 - HMT 1941 Oct # Howrah Mean Time? + 6:30 - BURT 1942 May 15 # Burma Time + 5:30 - IST 1942 Sep + 6:30 - BURT 1951 Sep 30 + 6:00 - DACT 1971 Mar 26 # Dacca Time + 6:00 - BDT 2009 + 6:00 Dhaka BD%sT + +# Bhutan +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Asia/Thimphu 5:58:36 - LMT 1947 Aug 15 # or Thimbu + 5:30 - IST 1987 Oct + 6:00 - BTT # Bhutan Time + +# British Indian Ocean Territory +# Whitman and the 1995 CIA time zone map say 5:00, but the +# 1997 and later maps say 6:00. Assume the switch occurred in 1996. +# We have no information as to when standard time was introduced; +# assume it occurred in 1907, the same year as Mauritius (which +# then contained the Chagos Archipelago). +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Indian/Chagos 4:49:40 - LMT 1907 + 5:00 - IOT 1996 # BIOT Time + 6:00 - IOT + +# Brunei +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Asia/Brunei 7:39:40 - LMT 1926 Mar # Bandar Seri Begawan + 7:30 - BNT 1933 + 8:00 - BNT + +# Burma / Myanmar + +# Milne says 6:24:40 was the meridian of the time ball observatory at Rangoon. + +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Asia/Rangoon 6:24:40 - LMT 1880 # or Yangon + 6:24:40 - RMT 1920 # Rangoon Mean Time? + 6:30 - BURT 1942 May # Burma Time + 9:00 - JST 1945 May 3 + 6:30 - MMT # Myanmar Time + +# Cambodia +# See Asia/Bangkok. + + +# China + +# From Guy Harris: +# People's Republic of China. Yes, they really have only one time zone. + +# From Bob Devine (1988-01-28): +# No they don't. See TIME mag, 1986-02-17 p.52. Even though +# China is across 4 physical time zones, before Feb 1, 1986 only the +# Peking (Beijing) time zone was recognized. Since that date, China +# has two of 'em - Peking's and Ürümqi (named after the capital of +# the Xinjiang Uyghur Autonomous Region). I don't know about DST for it. +# +# . . .I just deleted the DST table and this editor makes it too +# painful to suck in another copy. So, here is what I have for +# DST start/end dates for Peking's time zone (info from AP): +# +# 1986 May 4 - Sept 14 +# 1987 mid-April - ?? + +# From U. S. Naval Observatory (1989-01-19): +# CHINA 8 H AHEAD OF UTC ALL OF CHINA, INCL TAIWAN +# CHINA 9 H AHEAD OF UTC APR 17 - SEP 10 + +# From Paul Eggert (2008-02-11): +# Jim Mann, "A clumsy embrace for another western custom: China on daylight +# time - sort of", Los Angeles Times, 1986-05-05 ... [says] that China began +# observing daylight saving time in 1986. + +# From Paul Eggert (2014-06-30): +# Shanks & Pottenger have China switching to a single time zone in 1980, but +# this doesn't seem to be correct. They also write that China observed summer +# DST from 1986 through 1991, which seems to match the above commentary, so +# go with them for DST rules as follows: +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Shang 1940 only - Jun 3 0:00 1:00 D +Rule Shang 1940 1941 - Oct 1 0:00 0 S +Rule Shang 1941 only - Mar 16 0:00 1:00 D +Rule PRC 1986 only - May 4 0:00 1:00 D +Rule PRC 1986 1991 - Sep Sun>=11 0:00 0 S +Rule PRC 1987 1991 - Apr Sun>=10 0:00 1:00 D + +# From Anthony Fok (2001-12-20): +# BTW, I did some research on-line and found some info regarding these five +# historic timezones from some Taiwan websites. And yes, there are official +# Chinese names for these locales (before 1949). +# +# From Jesper Nørgaard Welen (2006-07-14): +# I have investigated the timezones around 1970 on the +# http://www.astro.com/atlas site [with provinces and county +# boundaries summarized below].... A few other exceptions were two +# counties on the Sichuan side of the Xizang-Sichuan border, +# counties Dege and Baiyu which lies on the Sichuan side and are +# therefore supposed to be GMT+7, Xizang region being GMT+6, but Dege +# county is GMT+8 according to astro.com while Baiyu county is GMT+6 +# (could be true), for the moment I am assuming that those two +# counties are mistakes in the astro.com data. + +# From Paul Eggert (2014-06-30): +# Alois Treindl kindly sent me translations of the following two sources: +# +# (1) +# Guo Qingsheng (National Time-Service Center, CAS, Xi'an 710600, China) +# Beijing Time at the Beginning of the PRC +# China Historical Materials of Science and Technology +# (Zhongguo ke ji shi liao, 中国科技史料), Vol. 24, No. 1 (2003) +# It gives evidence that at the beginning of the PRC, Beijing time was +# officially apparent solar time! However, Guo also says that the +# evidence is dubious, as the relevant institute of astronomy had not +# been taken over by the PRC yet. It's plausible that apparent solar +# time was announced but never implemented, and that people continued +# to use UT+8. As the Shanghai radio station (and I presume the +# observatory) was still under control of French missionaries, it +# could well have ignored any such mandate. +# +# (2) +# Guo Qing-sheng (Shaanxi Astronomical Observatory, CAS, Xi'an 710600, China) +# A Study on the Standard Time Changes for the Past 100 Years in China +# [undated and unknown publication location] +# It says several things: +# * The Qing dynasty used local apparent solar time throughout China. +# * The Republic of China instituted Beijing mean solar time effective +# the official calendar book of 1914. +# * The French Concession in Shanghai set up signal stations in +# French docks in the 1890s, controlled by Xujiahui (Zikawei) +# Observatory and set to local mean time. +# * "From the end of the 19th century" it changed to UT+8. +# * Chinese Customs (by then reduced to a tool of foreign powers) +# eventually standardized on this time for all ports, and it +# became used by railways as well. +# * In 1918 the Central Observatory proposed dividing China into +# five time zones (see below for details). This caught on +# at first only in coastal areas observing UT+8. +# * During WWII all of China was in theory was at UT+7. In practice +# this was ignored in the west, and I presume was ignored in +# Japanese-occupied territory. +# * Japanese-occupied Manchuria was at UT+9, i.e., Japan time. +# * The five-zone plan was resurrected after WWII and officially put into +# place (with some modifications) in March 1948. It's not clear +# how well it was observed in areas under Nationalist control. +# * The People's Liberation Army used UT+8 during the civil war. +# +# An AP article "Shanghai Internat'l Area Little Changed" in the +# Lewiston (ME) Daily Sun (1939-05-29), p 17, said "Even the time is +# different - the occupied districts going by Tokyo time, an hour +# ahead of that prevailing in the rest of Shanghai." Guess that the +# Xujiahui Observatory was under French control and stuck with UT+8. +# +# In earlier versions of this file, China had many separate Zone entries, but +# this was based on what were apparently incorrect data in Shanks & Pottenger. +# This has now been simplified to the two entries Asia/Shanghai and +# Asia/Urumqi, with the others being links for backward compatibility. +# Proposed in 1918 and theoretically in effect until 1949 (although in practice +# mainly observed in coastal areas), the five zones were: +# +# Changbai Time ("Long-white Time", Long-white = Heilongjiang area) UT+8.5 +# Asia/Harbin (currently a link to Asia/Shanghai) +# Heilongjiang (except Mohe county), Jilin +# +# Zhongyuan Time ("Central plain Time") UT+8 +# Asia/Shanghai +# most of China +# This currently represents most other zones as well, +# as apparently these regions have been the same since 1970. +# Milne gives 8:05:43.2 for Xujiahui Observatory time; round to nearest. +# Guo says Shanghai switched to UT+8 "from the end of the 19th century". +# +# Long-shu Time (probably due to Long and Shu being two names of that area) UT+7 +# Asia/Chongqing (currently a link to Asia/Shanghai) +# 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. +# +# Xin-zang Time ("Xinjiang-Tibet Time") UT+6 +# Asia/Urumqi +# This currently represents Kunlun Time as well, +# as apparently the two regions have been the same since 1970. +# The Gansu counties Aksay, Anxi, Dunhuang, Subei; west Qinghai; +# the Guangdong counties Xuwen, Haikang, Suixi, Lianjiang, +# Zhanjiang, Wuchuan, Huazhou, Gaozhou, Maoming, Dianbai, and Xinyi; +# east Tibet, including Lhasa, Chamdo, Shigaise, Jimsar, Shawan and Hutubi; +# east Xinjiang, including Ürümqi, Turpan, Karamay, Korla, Minfeng, Jinghe, +# Wusu, Qiemo, Xinyan, Wulanwusu, Jinghe, Yumin, Tacheng, Tuoli, Emin, +# Shihezi, Changji, Yanqi, Heshuo, Tuokexun, Tulufan, Shanshan, Hami, +# Fukang, Kuitun, Kumukuli, Miquan, Qitai, and Turfan. +# +# Kunlun Time UT+5.5 +# Asia/Kashgar (currently a link to Asia/Urumqi) +# West Tibet, including Pulan, Aheqi, Shufu, Shule; +# West Xinjiang, including Aksu, Atushi, Yining, Hetian, Cele, Luopu, Nileke, +# Zhaosu, Tekesi, Gongliu, Chabuchaer, Huocheng, Bole, Pishan, Suiding, +# and Yarkand. + +# From Luther Ma (2009-10-17): +# Almost all (>99.9%) ethnic Chinese (properly ethnic Han) living in +# Xinjiang use Chinese Standard Time. Some are aware of Xinjiang time, +# but have no need of it. All planes, trains, and schools function on +# what is called "Beijing time." When Han make an appointment in Chinese +# they implicitly use Beijing time. +# +# On the other hand, ethnic Uyghurs, who make up about half the +# population of Xinjiang, typically use "Xinjiang time" which is two +# hours behind Beijing time, or UTC +0600. The government of the Xinjiang +# Uyghur Autonomous Region, (XAUR, or just Xinjiang for short) as well as +# local governments such as the Ürümqi city government use both times in +# publications, referring to what is popularly called Xinjiang time as +# "Ürümqi time." When Uyghurs make an appointment in the Uyghur language +# they almost invariably use Xinjiang time. +# +# (Their ethnic Han compatriots would typically have no clue of its +# widespread use, however, because so extremely few of them are fluent in +# Uyghur, comparable to the number of Anglo-Americans fluent in Navajo.) +# +# (...As with the rest of China there was a brief interval ending in 1990 +# or 1991 when summer time was in use. The confusion was severe, with +# the province not having dual times but four times in use at the same +# time. Some areas remained on standard Xinjiang time or Beijing time and +# others moving their clocks ahead.) + +# From Luther Ma (2009-11-19): +# With the risk of being redundant to previous answers these are the most common +# English "transliterations" (w/o using non-English symbols): +# +# 1. Wulumuqi... +# 2. Kashi... +# 3. Urumqi... +# 4. Kashgar... +# ... +# 5. It seems that Uyghurs in Ürümqi has been using Xinjiang since at least the +# 1960's. I know of one Han, now over 50, who grew up in the surrounding +# countryside and used Xinjiang time as a child. +# +# 6. Likewise for Kashgar and the rest of south Xinjiang I don't know of any +# start date for Xinjiang time. +# +# Without having access to local historical records, nor the ability to legally +# publish them, I would go with October 1, 1949, when Xinjiang became the Uyghur +# Autonomous Region under the PRC. (Before that Uyghurs, of course, would also +# not be using Beijing time, but some local time.) + +# From David Cochrane (2014-03-26): +# Just a confirmation that Ürümqi time was implemented in Ürümqi on 1 Feb 1986: +# http://content.time.com/time/magazine/article/0,9171,960684,00.html + +# From Luther Ma (2014-04-22): +# I have interviewed numerous people of various nationalities and from +# different localities in Xinjiang and can confirm the information in Guo's +# report regarding Xinjiang, as well as the Time article reference by David +# Cochrane. Whether officially recognized or not (and both are officially +# recognized), two separate times have been in use in Xinjiang since at least +# the Cultural Revolution: Xinjiang Time (XJT), aka Ürümqi Time or local time; +# and Beijing Time. There is no confusion in Xinjiang as to which name refers +# to which time. Both are widely used in the province, although in some +# population groups might be use one to the exclusion of the other. The only +# problem is that computers and smart phones list Ürümqi (or Kashgar) as +# having the same time as Beijing. + +# From Paul Eggert (2014-06-30): +# In the early days of the PRC, Tibet was given its own time zone (UT+6) but +# this was withdrawn in 1959 and never reinstated; see Tubten Khétsun, +# Memories of life in Lhasa under Chinese Rule, Columbia U Press, ISBN +# 978-0231142861 (2008), translator's introduction by Matthew Akester, p x. +# As this is before our 1970 cutoff, Tibet doesn't need a separate zone. +# +# Xinjiang Time is well-documented as being officially recognized. E.g., see +# "The Working-Calendar for The Xinjiang Uygur Autonomous Region Government" +# <http://www.sinkiang.gov.cn/service/ourworking/> (2014-04-22). +# Unfortunately, we have no good records of time in Xinjiang before 1986. +# During the 20th century parts of Xinjiang were ruled by the Qing dynasty, +# the Republic of China, various warlords, the First and Second East Turkestan +# Republics, the Soviet Union, the Kuomintang, and the People's Republic of +# China, and tracking down all these organizations' timekeeping rules would be +# quite a trick. Approximate this lost history by a transition from LMT to +# XJT at the start of 1928, the year of accession of the warlord Jin Shuren, +# which happens to be the date given by Shanks & Pottenger (no doubt as a +# guess) as the transition from LMT. Ignore the usage of UT+8 before +# 1986-02-01 under the theory that the transition date to UT+8 is unknown and +# that the sort of users who prefer Asia/Urumqi now typically ignored the +# UT+8 mandate back then. + +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Beijing time, used throughout China; represented by Shanghai. +Zone Asia/Shanghai 8:05:43 - LMT 1901 + 8:00 Shang C%sT 1949 + 8:00 PRC C%sT +# Xinjiang time, used by many in western China; represented by Ürümqi / Ürümchi +# / Wulumuqi. (Please use Asia/Shanghai if you prefer Beijing time.) +Zone Asia/Urumqi 5:50:20 - LMT 1928 + 6:00 - XJT + + +# Hong Kong (Xianggang) + +# Milne gives 7:36:41.7; round this. + +# From Lee Yiu Chung (2009-10-24): +# I found there are some mistakes for the...DST rule for Hong +# Kong. [According] to the DST record from Hong Kong Observatory (actually, +# it is not [an] observatory, but the official meteorological agency of HK, +# and also serves as the official timing agency), there are some missing +# and incorrect rules. Although the exact switch over time is missing, I +# think 3:30 is correct. The official DST record for Hong Kong can be +# obtained from +# http://www.hko.gov.hk/gts/time/Summertime.htm + +# From Arthur David Olson (2009-10-28): +# Here are the dates given at +# http://www.hko.gov.hk/gts/time/Summertime.htm +# as of 2009-10-28: +# Year Period +# 1941 1 Apr to 30 Sep +# 1942 Whole year +# 1943 Whole year +# 1944 Whole year +# 1945 Whole year +# 1946 20 Apr to 1 Dec +# 1947 13 Apr to 30 Dec +# 1948 2 May to 31 Oct +# 1949 3 Apr to 30 Oct +# 1950 2 Apr to 29 Oct +# 1951 1 Apr to 28 Oct +# 1952 6 Apr to 25 Oct +# 1953 5 Apr to 1 Nov +# 1954 21 Mar to 31 Oct +# 1955 20 Mar to 6 Nov +# 1956 18 Mar to 4 Nov +# 1957 24 Mar to 3 Nov +# 1958 23 Mar to 2 Nov +# 1959 22 Mar to 1 Nov +# 1960 20 Mar to 6 Nov +# 1961 19 Mar to 5 Nov +# 1962 18 Mar to 4 Nov +# 1963 24 Mar to 3 Nov +# 1964 22 Mar to 1 Nov +# 1965 18 Apr to 17 Oct +# 1966 17 Apr to 16 Oct +# 1967 16 Apr to 22 Oct +# 1968 21 Apr to 20 Oct +# 1969 20 Apr to 19 Oct +# 1970 19 Apr to 18 Oct +# 1971 18 Apr to 17 Oct +# 1972 16 Apr to 22 Oct +# 1973 22 Apr to 21 Oct +# 1973/74 30 Dec 73 to 20 Oct 74 +# 1975 20 Apr to 19 Oct +# 1976 18 Apr to 17 Oct +# 1977 Nil +# 1978 Nil +# 1979 13 May to 21 Oct +# 1980 to Now Nil +# The page does not give start or end times of day. +# The page does not give a start date for 1942. +# The page does not givw an end date for 1945. +# The Japanese occupation of Hong Kong began on 1941-12-25. +# The Japanese surrender of Hong Kong was signed 1945-09-15. +# For lack of anything better, use start of those days as the transition times. + +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule HK 1941 only - Apr 1 3:30 1:00 S +Rule HK 1941 only - Sep 30 3:30 0 - +Rule HK 1946 only - Apr 20 3:30 1:00 S +Rule HK 1946 only - Dec 1 3:30 0 - +Rule HK 1947 only - Apr 13 3:30 1:00 S +Rule HK 1947 only - Dec 30 3:30 0 - +Rule HK 1948 only - May 2 3:30 1:00 S +Rule HK 1948 1951 - Oct lastSun 3:30 0 - +Rule HK 1952 only - Oct 25 3:30 0 - +Rule HK 1949 1953 - Apr Sun>=1 3:30 1:00 S +Rule HK 1953 only - Nov 1 3:30 0 - +Rule HK 1954 1964 - Mar Sun>=18 3:30 1:00 S +Rule HK 1954 only - Oct 31 3:30 0 - +Rule HK 1955 1964 - Nov Sun>=1 3:30 0 - +Rule HK 1965 1976 - Apr Sun>=16 3:30 1:00 S +Rule HK 1965 1976 - Oct Sun>=16 3:30 0 - +Rule HK 1973 only - Dec 30 3:30 1:00 S +Rule HK 1979 only - May Sun>=8 3:30 1:00 S +Rule HK 1979 only - Oct Sun>=16 3:30 0 - +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Asia/Hong_Kong 7:36:42 - LMT 1904 Oct 30 + 8:00 HK HK%sT 1941 Dec 25 + 9:00 - JST 1945 Sep 15 + 8:00 HK HK%sT + +############################################################################### + +# Taiwan + +# From smallufo (2010-04-03): +# According to Taiwan's CWB [Central Weather Bureau], +# http://www.cwb.gov.tw/V6/astronomy/cdata/summert.htm +# Taipei has DST in 1979 between July 1st and Sep 30. + +# From Yu-Cheng Chuang (2013-07-12): +# On Dec 28, 1895, the Meiji Emperor announced Ordinance No. 167 of +# Meiji Year 28 "The clause about standard time", mentioned that +# Taiwan and Penghu Islands, as well as Yaeyama and Miyako Islands +# (both in Okinawa) adopt the Western Standard Time which is based on +# 120E. The adoption began from Jan 1, 1896. The original text can be +# found on Wikisource: +# http://ja.wikisource.org/wiki/標準時ニ關スル件_(公布時) +# ... This could be the first adoption of time zone in Taiwan, because +# during the Qing Dynasty, it seems that there was no time zone +# declared officially. +# +# Later, in the beginning of World War II, on Sep 25, 1937, the Showa +# Emperor announced Ordinance No. 529 of Showa Year 12 "The clause of +# revision in the ordinance No. 167 of Meiji year 28 about standard +# time", in which abolished the adoption of Western Standard Time in +# western islands (listed above), which means the whole Japan +# territory, including later occupations, adopt Japan Central Time +# (UTC+9). The adoption began on Oct 1, 1937. The original text can +# be found on Wikisource: +# http://ja.wikisource.org/wiki/明治二十八年勅令第百六十七號標準時ニ關スル件中改正ノ件 +# +# That is, the time zone of Taipei switched to UTC+9 on Oct 1, 1937. + +# From Yu-Cheng Chuang (2014-07-02): +# I've found more evidence about when the time zone was switched from UTC+9 +# back to UTC+8 after WW2. I believe it was on Sep 21, 1945. In a document +# during Japanese era [1] in which the officer told the staff to change time +# zone back to Western Standard Time (UTC+8) on Sep 21. And in another +# history page of National Cheng Kung University [2], on Sep 21 there is a +# note "from today, switch back to Western Standard Time". From these two +# materials, I believe that the time zone change happened on Sep 21. And +# today I have found another monthly journal called "The Astronomical Herald" +# from The Astronomical Society of Japan [3] in which it mentioned the fact +# that: +# +# 1. Standard Time of the Country (Japan) was adopted on Jan 1, 1888, using +# the time at 135E (GMT+9) +# +# 2. Standard Time of the Country was renamed to Central Standard Time, on Jan +# 1, 1898, and on the same day, the new territories Taiwan and Penghu islands, +# as well as Yaeyama and Miyako islands, adopted a new time zone called +# Western Standard Time, which is in GMT+8. +# +# 3. Western Standard Time was deprecated on Sep 30, 1937. From then all the +# territories of Japan adopted the same time zone, which is Central Standard +# Time. +# +# [1] Academica Historica, Taiwan: +# http://163.29.208.22:8080/govsaleShowImage/connect_img.php?s=00101738900090036&e=00101738900090037 +# [2] Nat'l Cheng Kung University 70th Anniversary Special Site: +# http://www.ncku.edu.tw/~ncku70/menu/001/01_01.htm +# [3] Yukio Niimi, The Standard Time in Japan (1997), p.475: +# http://www.asj.or.jp/geppou/archive_open/1997/pdf/19971001c.pdf + +# Yu-Cheng Chuang (2014-07-03): +# I finally have found the real official gazette about changing back to +# Western Standard Time on Sep 21 in Taiwan. It's Taiwan Governor-General +# Bulletin No. 386 in Showa 20 years (1945), published on Sep 19, 1945. [1] ... +# [It] abolishes Bulletin No. 207 in Showa 12 years (1937), which is a local +# bulletin in Taiwan for that Ordinance No. 529. It also mentioned that 1am on +# Sep 21, 1945 will be 12am on Sep 21. I think this bulletin is much more +# official than the one I mentioned in my first mail, because it's from the +# top-level government in Taiwan. If you're going to quote any resource, this +# would be a good one. +# [1] Taiwan Governor-General Gazette, No. 1018, Sep 19, 1945: +# http://db2.th.gov.tw/db2/view/viewImg.php?imgcode=0072031018a&num=19&bgn=019&end=019&otherImg=&type=gener + +# From Yu-Cheng Chuang (2014-07-02): +# In 1946, DST in Taiwan was from May 15 and ended on Sep 30. The info from +# Central Weather Bureau website was not correct. +# +# Original Bulletin: +# http://subtpg.tpg.gov.tw/og/image2.asp?f=03502F0AKM1AF +# http://subtpg.tpg.gov.tw/og/image2.asp?f=0350300AKM1B0 (cont.) +# +# In 1947, DST in Taiwan was expanded to Oct 31. There is a backup of that +# telegram announcement from Taiwan Province Government: +# +# http://subtpg.tpg.gov.tw/og/image2.asp?f=0360310AKZ431 +# +# Here is a brief translation: +# +# The Summer Time this year is adopted from midnight Apr 15 until Sep 20 +# midnight. To save (energy?) consumption, we're expanding Summer Time +# adoption till Oct 31 midnight. +# +# The Central Weather Bureau website didn't mention that, however it can +# be found from historical government announcement database. + +# From Paul Eggert (2014-07-03): +# As per Yu-Cheng Chuang, say that Taiwan was at UT+9 from 1937-10-01 +# until 1945-09-21 at 01:00, overriding Shanks & Pottenger. +# Likewise, use Yu-Cheng Chuang's data for DST in Taiwan. + +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Taiwan 1946 only - May 15 0:00 1:00 D +Rule Taiwan 1946 only - Oct 1 0:00 0 S +Rule Taiwan 1947 only - Apr 15 0:00 1:00 D +Rule Taiwan 1947 only - Nov 1 0:00 0 S +Rule Taiwan 1948 1951 - May 1 0:00 1:00 D +Rule Taiwan 1948 1951 - Oct 1 0:00 0 S +Rule Taiwan 1952 only - Mar 1 0:00 1:00 D +Rule Taiwan 1952 1954 - Nov 1 0:00 0 S +Rule Taiwan 1953 1959 - Apr 1 0:00 1:00 D +Rule Taiwan 1955 1961 - Oct 1 0:00 0 S +Rule Taiwan 1960 1961 - Jun 1 0:00 1:00 D +Rule Taiwan 1974 1975 - Apr 1 0:00 1:00 D +Rule Taiwan 1974 1975 - Oct 1 0:00 0 S +Rule Taiwan 1979 only - Jul 1 0:00 1:00 D +Rule Taiwan 1979 only - Oct 1 0:00 0 S + +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Taipei or Taibei or T'ai-pei +Zone Asia/Taipei 8:06:00 - LMT 1896 Jan 1 + 8:00 - JWST 1937 Oct 1 + 9:00 - JST 1945 Sep 21 1:00 + 8:00 Taiwan C%sT + +# Macau (Macao, Aomen) +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Macau 1961 1962 - Mar Sun>=16 3:30 1:00 S +Rule Macau 1961 1964 - Nov Sun>=1 3:30 0 - +Rule Macau 1963 only - Mar Sun>=16 0:00 1:00 S +Rule Macau 1964 only - Mar Sun>=16 3:30 1:00 S +Rule Macau 1965 only - Mar Sun>=16 0:00 1:00 S +Rule Macau 1965 only - Oct 31 0:00 0 - +Rule Macau 1966 1971 - Apr Sun>=16 3:30 1:00 S +Rule Macau 1966 1971 - Oct Sun>=16 3:30 0 - +Rule Macau 1972 1974 - Apr Sun>=15 0:00 1:00 S +Rule Macau 1972 1973 - Oct Sun>=15 0:00 0 - +Rule Macau 1974 1977 - Oct Sun>=15 3:30 0 - +Rule Macau 1975 1977 - Apr Sun>=15 3:30 1:00 S +Rule Macau 1978 1980 - Apr Sun>=15 0:00 1:00 S +Rule Macau 1978 1980 - Oct Sun>=15 0:00 0 - +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Asia/Macau 7:34:20 - LMT 1912 Jan 1 + 8:00 Macau MO%sT 1999 Dec 20 # return to China + 8:00 PRC C%sT + + +############################################################################### + +# Cyprus +# +# Milne says the Eastern Telegraph Company used 2:14:00. Stick with LMT. +# +# 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 - +Rule Cyprus 1976 only - May 15 0:00 1:00 S +Rule Cyprus 1976 only - Oct 11 0:00 0 - +Rule Cyprus 1977 1980 - Apr Sun>=1 0:00 1:00 S +Rule Cyprus 1977 only - Sep 25 0:00 0 - +Rule Cyprus 1978 only - Oct 2 0:00 0 - +Rule Cyprus 1979 1997 - Sep lastSun 0:00 0 - +Rule Cyprus 1981 1998 - Mar lastSun 0:00 1:00 S +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +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. + +# Classically, Cyprus belongs to Asia; e.g. see Herodotus, Histories, I.72. +# However, for various reasons many users expect to find it under Europe. +Link Asia/Nicosia Europe/Nicosia + +# Georgia +# From Paul Eggert (1994-11-19): +# Today's _Economist_ (p 60) reports that Georgia moved its clocks forward +# an hour recently, due to a law proposed by Zurab Murvanidze, +# an MP who went on a hunger strike for 11 days to force discussion about it! +# We have no details, but we'll guess they didn't move the clocks back in fall. +# +# From Mathew Englander, quoting AP (1996-10-23 13:05-04): +# Instead of putting back clocks at the end of October, Georgia +# will stay on daylight savings time this winter to save energy, +# President Eduard Shevardnadze decreed Wednesday. +# +# From the BBC via Joseph S. Myers (2004-06-27): +# +# Georgia moved closer to Western Europe on Sunday... The former Soviet +# republic has changed its time zone back to that of Moscow. As a result it +# is now just four hours ahead of Greenwich Mean Time, rather than five hours +# ahead. The switch was decreed by the pro-Western president of Georgia, +# Mikheil Saakashvili, who said the change was partly prompted by the process +# of integration into Europe. + +# From Teimuraz Abashidze (2005-11-07): +# Government of Georgia ... decided to NOT CHANGE daylight savings time on +# [Oct.] 30, as it was done before during last more than 10 years. +# Currently, we are in fact GMT +4:00, as before 30 October it was GMT +# +3:00.... The problem is, there is NO FORMAL LAW or governmental document +# about it. As far as I can find, I was told, that there is no document, +# because we just DIDN'T ISSUE document about switching to winter time.... +# I don't know what can be done, especially knowing that some years ago our +# DST rules where changed THREE TIMES during one month. + +# Milne 1899 says Tbilisi (Tiflis) time was 2:59:05.7. +# Byalokoz 1919 says Georgia was 2:59:11. +# Go with Byalokoz. + +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Asia/Tbilisi 2:59:11 - LMT 1880 + 2:59:11 - TBMT 1924 May 2 # Tbilisi Mean Time + 3:00 - TBIT 1957 Mar # Tbilisi Time + 4:00 RussiaAsia TBI%sT 1991 Mar 31 2:00s + 3:00 1:00 TBIST 1991 Apr 9 # independence + 3:00 RussiaAsia GE%sT 1992 # Georgia Time + 3:00 E-EurAsia GE%sT 1994 Sep lastSun + 4:00 E-EurAsia GE%sT 1996 Oct lastSun + 4:00 1:00 GEST 1997 Mar lastSun + 4:00 E-EurAsia GE%sT 2004 Jun 27 + 3:00 RussiaAsia GE%sT 2005 Mar lastSun 2:00 + 4:00 - GET + +# East Timor + +# See Indonesia for the 1945 transition. + +# From João Carrascalão, brother of the former governor of East Timor, in +# East Timor may be late for its millennium +# <http://etan.org/et99c/december/26-31/30ETMAY.htm> (1999-12-26/31): +# Portugal tried to change the time forward in 1974 because the sun +# rises too early but the suggestion raised a lot of problems with the +# Timorese and I still don't think it would work today because it +# conflicts with their way of life. + +# From Paul Eggert (2000-12-04): +# We don't have any record of the above attempt. +# Most likely our records are incomplete, but we have no better data. + +# From Manoel de Almeida e Silva, Deputy Spokesman for the UN Secretary-General +# http://www.hri.org/news/world/undh/2000/00-08-16.undh.html +# (2000-08-16): +# The Cabinet of the East Timor Transition Administration decided +# today to advance East Timor's time by one hour. The time change, +# which will be permanent, with no seasonal adjustment, will happen at +# midnight on Saturday, September 16. + +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Asia/Dili 8:22:20 - LMT 1912 Jan 1 + 8:00 - TLT 1942 Feb 21 23:00 # E Timor Time + 9:00 - JST 1945 Sep 23 + 9:00 - TLT 1976 May 3 + 8:00 - WITA 2000 Sep 17 0:00 + 9:00 - TLT + +# India + +# From Ian P. Beacock, in "A brief history of (modern) time", The Atlantic +# http://www.theatlantic.com/technology/archive/2015/12/the-creation-of-modern-time/421419/ +# (2015-12-22): +# In January 1906, several thousand cotton-mill workers rioted on the +# outskirts of Bombay.... They were protesting the proposed abolition of +# local time in favor of Indian Standard Time.... Journalists called this +# dispute the "Battle of the Clocks." It lasted nearly half a century. + +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Asia/Kolkata 5:53:28 - LMT 1880 # Kolkata + 5:53:20 - HMT 1941 Oct # Howrah Mean Time? + 6:30 - BURT 1942 May 15 # Burma Time + 5:30 - IST 1942 Sep + 5:30 1:00 IST 1945 Oct 15 + 5:30 - IST +# The following are like Asia/Kolkata: +# Andaman Is +# Lakshadweep (Laccadive, Minicoy and Amindivi Is) +# Nicobar Is + +# Indonesia +# +# From Paul Eggert (2014-09-06): +# The 1876 Report of the Secretary of the [US] Navy, p 306 says that Batavia +# civil time was 7:07:12.5; round to even for Jakarta. +# +# From Gwillim Law (2001-05-28), overriding Shanks & Pottenger: +# http://www.sumatera-inc.com/go_to_invest/about_indonesia.asp#standtime +# says that Indonesia's time zones changed on 1988-01-01. Looking at some +# time zone maps, I think that must refer to Western Borneo (Kalimantan Barat +# and Kalimantan Tengah) switching from UTC+8 to UTC+7. +# +# From Paul Eggert (2007-03-10): +# Here is another correction to Shanks & Pottenger. +# JohnTWB writes that Japanese forces did not surrender control in +# Indonesia until 1945-09-01 00:00 at the earliest (in Jakarta) and +# other formal surrender ceremonies were September 9, 11, and 13, plus +# September 12 for the regional surrender to Mountbatten in Singapore. +# These would be the earliest possible times for a change. +# Régimes horaires pour le monde entier, by Henri Le Corre, (Éditions +# Traditionnelles, 1987, Paris) says that Java and Madura switched +# from JST to UTC+07:30 on 1945-09-23, and gives 1944-09-01 for Jayapura +# (Hollandia). For now, assume all Indonesian locations other than Jayapura +# switched on 1945-09-23. +# +# From Paul Eggert (2013-08-11): +# Normally the tz database uses English-language abbreviations, but in +# Indonesia it's typical to use Indonesian-language abbreviations even +# when writing in English. For example, see the English-language +# summary published by the Time and Frequency Laboratory of the +# Research Center for Calibration, Instrumentation and Metrology, +# Indonesia, <http://time.kim.lipi.go.id/time-eng.php> (2006-09-29). +# The abbreviations are: +# +# WIB - UTC+7 - Waktu Indonesia Barat (Indonesia western time) +# WITA - UTC+8 - Waktu Indonesia Tengah (Indonesia central time) +# WIT - UTC+9 - Waktu Indonesia Timur (Indonesia eastern time) +# +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Java, Sumatra +Zone Asia/Jakarta 7:07:12 - LMT 1867 Aug 10 +# Shanks & Pottenger say the next transition was at 1924 Jan 1 0:13, +# but this must be a typo. + 7:07:12 - BMT 1923 Dec 31 23:47:12 # Batavia + 7:20 - JAVT 1932 Nov # Java Time + 7:30 - WIB 1942 Mar 23 + 9:00 - JST 1945 Sep 23 + 7:30 - WIB 1948 May + 8:00 - WIB 1950 May + 7:30 - WIB 1964 + 7:00 - WIB +# west and central Borneo +Zone Asia/Pontianak 7:17:20 - LMT 1908 May + 7:17:20 - PMT 1932 Nov # Pontianak MT + 7:30 - WIB 1942 Jan 29 + 9:00 - JST 1945 Sep 23 + 7:30 - WIB 1948 May + 8:00 - WIB 1950 May + 7:30 - WIB 1964 + 8:00 - WITA 1988 Jan 1 + 7:00 - WIB +# Sulawesi, Lesser Sundas, east and south Borneo +Zone Asia/Makassar 7:57:36 - LMT 1920 + 7:57:36 - MMT 1932 Nov # Macassar MT + 8:00 - WITA 1942 Feb 9 + 9:00 - JST 1945 Sep 23 + 8:00 - WITA +# Maluku Islands, West Papua, Papua +Zone Asia/Jayapura 9:22:48 - LMT 1932 Nov + 9:00 - WIT 1944 Sep 1 + 9:30 - ACST 1964 + 9:00 - WIT + +# Iran + +# From Roozbeh Pournader (2003-03-15): +# This is an English translation of what I just found (originally in Persian). +# The Gregorian dates in brackets are mine: +# +# Official Newspaper No. 13548-1370/6/25 [1991-09-16] +# No. 16760/T233 H 1370/6/10 [1991-09-01] +# +# The Rule About Change of the Official Time of the Country +# +# The Board of Ministers, in the meeting dated 1370/5/23 [1991-08-14], +# based on the suggestion number 2221/D dated 1370/4/22 [1991-07-13] +# of the Country's Organization for Official and Employment Affairs, +# and referring to the law for equating the working hours of workers +# and officers in the whole country dated 1359/4/23 [1980-07-14], and +# for synchronizing the official times of the country, agreed that: +# +# The official time of the country will should move forward one hour +# at the 24[:00] hours of the first day of Farvardin and should return +# to its previous state at the 24[:00] hours of the 30th day of +# Shahrivar. +# +# First Deputy to the President - Hassan Habibi +# +# From personal experience, that agrees with what has been followed +# for at least the last 5 years. Before that, for a few years, the +# date used was the first Thursday night of Farvardin and the last +# Thursday night of Shahrivar, but I can't give exact dates.... +# I have also changed the abbreviations to what is considered correct +# here in Iran, IRST for regular time and IRDT for daylight saving time. +# +# From Roozbeh Pournader (2005-04-05): +# The text of the Iranian law, in effect since 1925, clearly mentions +# that the true solar year is the measure, and there is no arithmetic +# leap year calculation involved. There has never been any serious +# plan to change that law.... +# +# From Paul Eggert (2006-03-22): +# Go with Shanks & Pottenger before Sept. 1991, and with Pournader thereafter. +# I used Ed Reingold's cal-persia in GNU Emacs 21.2 to check Persian dates, +# stopping after 2037 when 32-bit time_t's overflow. +# That cal-persia used Birashk's approximation, which disagrees with the solar +# calendar predictions for the year 2025, so I corrected those dates by hand. +# +# From Oscar van Vlijmen (2005-03-30), writing about future +# discrepancies between cal-persia and the Iranian calendar: +# For 2091 solar-longitude-after yields 2091-03-20 08:40:07.7 UT for +# the vernal equinox and that gets so close to 12:00 some local +# Iranian time that the definition of the correct location needs to be +# known exactly, amongst other factors. 2157 is even closer: +# 2157-03-20 08:37:15.5 UT. But the Gregorian year 2025 should give +# no interpretation problem whatsoever. By the way, another instant +# in the near future where there will be a discrepancy between +# arithmetical and astronomical Iranian calendars will be in 2058: +# vernal equinox on 2058-03-20 09:03:05.9 UT. The Java version of +# Reingold's/Dershowitz' calculator gives correctly the Gregorian date +# 2058-03-21 for 1 Farvardin 1437 (astronomical). +# +# From Steffen Thorsen (2006-03-22): +# Several of my users have reported that Iran will not observe DST anymore: +# http://www.irna.ir/en/news/view/line-17/0603193812164948.htm +# +# From Reuters (2007-09-16), with a heads-up from Jesper Nørgaard Welen: +# ... the Guardian Council ... approved a law on Sunday to re-introduce +# daylight saving time ... +# http://uk.reuters.com/article/oilRpt/idUKBLA65048420070916 +# +# From Roozbeh Pournader (2007-11-05): +# This is quoted from Official Gazette of the Islamic Republic of +# Iran, Volume 63, No. 18242, dated Tuesday 1386/6/24 +# [2007-10-16]. I am doing the best translation I can:... +# The official time of the country will be moved forward for one hour +# on the 24 hours of the first day of the month of Farvardin and will +# be changed back to its previous state on the 24 hours of the +# thirtieth day of Shahrivar. +# +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Iran 1978 1980 - Mar 21 0:00 1:00 D +Rule Iran 1978 only - Oct 21 0:00 0 S +Rule Iran 1979 only - Sep 19 0:00 0 S +Rule Iran 1980 only - Sep 23 0:00 0 S +Rule Iran 1991 only - May 3 0:00 1:00 D +Rule Iran 1992 1995 - Mar 22 0:00 1:00 D +Rule Iran 1991 1995 - Sep 22 0:00 0 S +Rule Iran 1996 only - Mar 21 0:00 1:00 D +Rule Iran 1996 only - Sep 21 0:00 0 S +Rule Iran 1997 1999 - Mar 22 0:00 1:00 D +Rule Iran 1997 1999 - Sep 22 0:00 0 S +Rule Iran 2000 only - Mar 21 0:00 1:00 D +Rule Iran 2000 only - Sep 21 0:00 0 S +Rule Iran 2001 2003 - Mar 22 0:00 1:00 D +Rule Iran 2001 2003 - Sep 22 0:00 0 S +Rule Iran 2004 only - Mar 21 0:00 1:00 D +Rule Iran 2004 only - Sep 21 0:00 0 S +Rule Iran 2005 only - Mar 22 0:00 1:00 D +Rule Iran 2005 only - Sep 22 0:00 0 S +Rule Iran 2008 only - Mar 21 0:00 1:00 D +Rule Iran 2008 only - Sep 21 0:00 0 S +Rule Iran 2009 2011 - Mar 22 0:00 1:00 D +Rule Iran 2009 2011 - Sep 22 0:00 0 S +Rule Iran 2012 only - Mar 21 0:00 1:00 D +Rule Iran 2012 only - Sep 21 0:00 0 S +Rule Iran 2013 2015 - Mar 22 0:00 1:00 D +Rule Iran 2013 2015 - Sep 22 0:00 0 S +Rule Iran 2016 only - Mar 21 0:00 1:00 D +Rule Iran 2016 only - Sep 21 0:00 0 S +Rule Iran 2017 2019 - Mar 22 0:00 1:00 D +Rule Iran 2017 2019 - Sep 22 0:00 0 S +Rule Iran 2020 only - Mar 21 0:00 1:00 D +Rule Iran 2020 only - Sep 21 0:00 0 S +Rule Iran 2021 2023 - Mar 22 0:00 1:00 D +Rule Iran 2021 2023 - Sep 22 0:00 0 S +Rule Iran 2024 only - Mar 21 0:00 1:00 D +Rule Iran 2024 only - Sep 21 0:00 0 S +Rule Iran 2025 2027 - Mar 22 0:00 1:00 D +Rule Iran 2025 2027 - Sep 22 0:00 0 S +Rule Iran 2028 2029 - Mar 21 0:00 1:00 D +Rule Iran 2028 2029 - Sep 21 0:00 0 S +Rule Iran 2030 2031 - Mar 22 0:00 1:00 D +Rule Iran 2030 2031 - Sep 22 0:00 0 S +Rule Iran 2032 2033 - Mar 21 0:00 1:00 D +Rule Iran 2032 2033 - Sep 21 0:00 0 S +Rule Iran 2034 2035 - Mar 22 0:00 1:00 D +Rule Iran 2034 2035 - Sep 22 0:00 0 S +# +# The following rules are approximations starting in the year 2038. +# These are the best post-2037 approximations available, given the +# restrictions of a single rule using a Gregorian-based data format. +# At some point this table will need to be extended, though quite +# possibly Iran will change the rules first. +Rule Iran 2036 max - Mar 21 0:00 1:00 D +Rule Iran 2036 max - Sep 21 0:00 0 S + +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Asia/Tehran 3:25:44 - LMT 1916 + 3:25:44 - TMT 1946 # Tehran Mean Time + 3:30 - IRST 1977 Nov + 4:00 Iran IR%sT 1979 + 3:30 Iran IR%sT + + +# Iraq +# +# From Jonathan Lennox (2000-06-12): +# An article in this week's Economist ("Inside the Saddam-free zone", p. 50 in +# the U.S. edition) on the Iraqi Kurds contains a paragraph: +# "The three northern provinces ... switched their clocks this spring and +# are an hour ahead of Baghdad." +# +# But Rives McDow (2000-06-18) quotes a contact in Iraqi-Kurdistan as follows: +# In the past, some Kurdish nationalists, as a protest to the Iraqi +# Government, did not adhere to daylight saving time. They referred +# to daylight saving as Saddam time. But, as of today, the time zone +# in Iraqi-Kurdistan is on standard time with Baghdad, Iraq. +# +# So we'll ignore the Economist's claim. + +# From Steffen Thorsen (2008-03-10): +# The cabinet in Iraq abolished DST last week, according to the following +# news sources (in Arabic): +# http://www.aljeeran.net/wesima_articles/news-20080305-98602.html +# http://www.aswataliraq.info/look/article.tpl?id=2047&IdLanguage=17&IdPublication=4&NrArticle=71743&NrIssue=1&NrSection=10 +# +# We have published a short article in English about the change: +# http://www.timeanddate.com/news/time/iraq-dumps-daylight-saving.html + +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Iraq 1982 only - May 1 0:00 1:00 D +Rule Iraq 1982 1984 - Oct 1 0:00 0 S +Rule Iraq 1983 only - Mar 31 0:00 1:00 D +Rule Iraq 1984 1985 - Apr 1 0:00 1:00 D +Rule Iraq 1985 1990 - Sep lastSun 1:00s 0 S +Rule Iraq 1986 1990 - Mar lastSun 1:00s 1:00 D +# IATA SSIM (1991/1996) says Apr 1 12:01am UTC; guess the ':01' is a typo. +# Shanks & Pottenger say Iraq did not observe DST 1992/1997; ignore this. +# +Rule Iraq 1991 2007 - Apr 1 3:00s 1:00 D +Rule Iraq 1991 2007 - Oct 1 3:00s 0 S +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Asia/Baghdad 2:57:40 - LMT 1890 + 2:57:36 - BMT 1918 # Baghdad Mean Time? + 3:00 - AST 1982 May + 3:00 Iraq A%sT + + +############################################################################### + +# Israel + +# From Ephraim Silverberg (2001-01-11): +# +# I coined "IST/IDT" circa 1988. Until then there were three +# different abbreviations in use: +# +# JST Jerusalem Standard Time [Danny Braniss, Hebrew University] +# IZT Israel Zonal (sic) Time [Prof. Haim Papo, Technion] +# EEST Eastern Europe Standard Time [used by almost everyone else] +# +# Since timezones should be called by country and not capital cities, +# I ruled out JST. As Israel is in Asia Minor and not Eastern Europe, +# EEST was equally unacceptable. Since "zonal" was not compatible with +# any other timezone abbreviation, I felt that 'IST' was the way to go +# and, indeed, it has received almost universal acceptance in timezone +# settings in Israeli computers. +# +# In any case, I am happy to share timezone abbreviations with India, +# high on my favorite-country list (and not only because my wife's +# family is from India). + +# From Shanks & Pottenger: +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Zion 1940 only - Jun 1 0:00 1:00 D +Rule Zion 1942 1944 - Nov 1 0:00 0 S +Rule Zion 1943 only - Apr 1 2:00 1:00 D +Rule Zion 1944 only - Apr 1 0:00 1:00 D +Rule Zion 1945 only - Apr 16 0:00 1:00 D +Rule Zion 1945 only - Nov 1 2:00 0 S +Rule Zion 1946 only - Apr 16 2:00 1:00 D +Rule Zion 1946 only - Nov 1 0:00 0 S +Rule Zion 1948 only - May 23 0:00 2:00 DD +Rule Zion 1948 only - Sep 1 0:00 1:00 D +Rule Zion 1948 1949 - Nov 1 2:00 0 S +Rule Zion 1949 only - May 1 0:00 1:00 D +Rule Zion 1950 only - Apr 16 0:00 1:00 D +Rule Zion 1950 only - Sep 15 3:00 0 S +Rule Zion 1951 only - Apr 1 0:00 1:00 D +Rule Zion 1951 only - Nov 11 3:00 0 S +Rule Zion 1952 only - Apr 20 2:00 1:00 D +Rule Zion 1952 only - Oct 19 3:00 0 S +Rule Zion 1953 only - Apr 12 2:00 1:00 D +Rule Zion 1953 only - Sep 13 3:00 0 S +Rule Zion 1954 only - Jun 13 0:00 1:00 D +Rule Zion 1954 only - Sep 12 0:00 0 S +Rule Zion 1955 only - Jun 11 2:00 1:00 D +Rule Zion 1955 only - Sep 11 0:00 0 S +Rule Zion 1956 only - Jun 3 0:00 1:00 D +Rule Zion 1956 only - Sep 30 3:00 0 S +Rule Zion 1957 only - Apr 29 2:00 1:00 D +Rule Zion 1957 only - Sep 22 0:00 0 S +Rule Zion 1974 only - Jul 7 0:00 1:00 D +Rule Zion 1974 only - Oct 13 0:00 0 S +Rule Zion 1975 only - Apr 20 0:00 1:00 D +Rule Zion 1975 only - Aug 31 0:00 0 S +Rule Zion 1985 only - Apr 14 0:00 1:00 D +Rule Zion 1985 only - Sep 15 0:00 0 S +Rule Zion 1986 only - May 18 0:00 1:00 D +Rule Zion 1986 only - Sep 7 0:00 0 S +Rule Zion 1987 only - Apr 15 0:00 1:00 D +Rule Zion 1987 only - Sep 13 0:00 0 S + +# From Avigdor Finkelstein (2014-03-05): +# I check the Parliament (Knesset) records and there it's stated that the +# [1988] transition should take place on Saturday night, when the Sabbath +# ends and changes to Sunday. +Rule Zion 1988 only - Apr 10 0:00 1:00 D +Rule Zion 1988 only - Sep 4 0:00 0 S + +# From Ephraim Silverberg +# (1997-03-04, 1998-03-16, 1998-12-28, 2000-01-17, 2000-07-25, 2004-12-22, +# and 2005-02-17): + +# According to the Office of the Secretary General of the Ministry of +# Interior, there is NO set rule for Daylight-Savings/Standard time changes. +# One thing is entrenched in law, however: that there must be at least 150 +# days of daylight savings time annually. From 1993-1998, the change to +# daylight savings time was on a Friday morning from midnight IST to +# 1 a.m IDT; up until 1998, the change back to standard time was on a +# Saturday night from midnight daylight savings time to 11 p.m. standard +# time. 1996 is an exception to this rule where the change back to standard +# time took place on Sunday night instead of Saturday night to avoid +# conflicts with the Jewish New Year. In 1999, the change to +# daylight savings time was still on a Friday morning but from +# 2 a.m. IST to 3 a.m. IDT; furthermore, the change back to standard time +# was also on a Friday morning from 2 a.m. IDT to 1 a.m. IST for +# 1999 only. In the year 2000, the change to daylight savings time was +# similar to 1999, but although the change back will be on a Friday, it +# will take place from 1 a.m. IDT to midnight IST. Starting in 2001, all +# changes to/from will take place at 1 a.m. old time, but now there is no +# rule as to what day of the week it will take place in as the start date +# (except in 2003) is the night after the Passover Seder (i.e. the eve +# of the 16th of Nisan in the lunar Hebrew calendar) and the end date +# (except in 2002) is three nights before Yom Kippur [Day of Atonement] +# (the eve of the 7th of Tishrei in the lunar Hebrew calendar). + +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Zion 1989 only - Apr 30 0:00 1:00 D +Rule Zion 1989 only - Sep 3 0:00 0 S +Rule Zion 1990 only - Mar 25 0:00 1:00 D +Rule Zion 1990 only - Aug 26 0:00 0 S +Rule Zion 1991 only - Mar 24 0:00 1:00 D +Rule Zion 1991 only - Sep 1 0:00 0 S +Rule Zion 1992 only - Mar 29 0:00 1:00 D +Rule Zion 1992 only - Sep 6 0:00 0 S +Rule Zion 1993 only - Apr 2 0:00 1:00 D +Rule Zion 1993 only - Sep 5 0:00 0 S + +# The dates for 1994-1995 were obtained from Office of the Spokeswoman for the +# Ministry of Interior, Jerusalem, Israel. The spokeswoman can be reached by +# calling the office directly at 972-2-6701447 or 972-2-6701448. + +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Zion 1994 only - Apr 1 0:00 1:00 D +Rule Zion 1994 only - Aug 28 0:00 0 S +Rule Zion 1995 only - Mar 31 0:00 1:00 D +Rule Zion 1995 only - Sep 3 0:00 0 S + +# The dates for 1996 were determined by the Minister of Interior of the +# time, Haim Ramon. The official announcement regarding 1996-1998 +# (with the dates for 1997-1998 no longer being relevant) can be viewed at: +# +# ftp://ftp.cs.huji.ac.il/pub/tz/announcements/1996-1998.ramon.ps.gz +# +# The dates for 1997-1998 were altered by his successor, Rabbi Eli Suissa. +# +# The official announcements for the years 1997-1999 can be viewed at: +# +# ftp://ftp.cs.huji.ac.il/pub/tz/announcements/YYYY.ps.gz +# +# where YYYY is the relevant year. + +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Zion 1996 only - Mar 15 0:00 1:00 D +Rule Zion 1996 only - Sep 16 0:00 0 S +Rule Zion 1997 only - Mar 21 0:00 1:00 D +Rule Zion 1997 only - Sep 14 0:00 0 S +Rule Zion 1998 only - Mar 20 0:00 1:00 D +Rule Zion 1998 only - Sep 6 0:00 0 S +Rule Zion 1999 only - Apr 2 2:00 1:00 D +Rule Zion 1999 only - Sep 3 2:00 0 S + +# The Knesset Interior Committee has changed the dates for 2000 for +# the third time in just over a year and have set new dates for the +# years 2001-2004 as well. +# +# The official announcement for the start date of 2000 can be viewed at: +# +# ftp://ftp.cs.huji.ac.il/pub/tz/announcements/2000-start.ps.gz +# +# The official announcement for the end date of 2000 and the dates +# for the years 2001-2004 can be viewed at: +# +# ftp://ftp.cs.huji.ac.il/pub/tz/announcements/2000-2004.ps.gz + +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Zion 2000 only - Apr 14 2:00 1:00 D +Rule Zion 2000 only - Oct 6 1:00 0 S +Rule Zion 2001 only - Apr 9 1:00 1:00 D +Rule Zion 2001 only - Sep 24 1:00 0 S +Rule Zion 2002 only - Mar 29 1:00 1:00 D +Rule Zion 2002 only - Oct 7 1:00 0 S +Rule Zion 2003 only - Mar 28 1:00 1:00 D +Rule Zion 2003 only - Oct 3 1:00 0 S +Rule Zion 2004 only - Apr 7 1:00 1:00 D +Rule Zion 2004 only - Sep 22 1:00 0 S + +# The proposed law agreed upon by the Knesset Interior Committee on +# 2005-02-14 is that, for 2005 and beyond, DST starts at 02:00 the +# last Friday before April 2nd (i.e. the last Friday in March or April +# 1st itself if it falls on a Friday) and ends at 02:00 on the Saturday +# night _before_ the fast of Yom Kippur. +# +# Those who can read Hebrew can view the announcement at: +# +# ftp://ftp.cs.huji.ac.il/pub/tz/announcements/2005+beyond.ps + +# From Paul Eggert (2012-10-26): +# I used Ephraim Silverberg's dst-israel.el program +# <ftp://ftp.cs.huji.ac.il/pub/tz/software/dst-israel.el> (2005-02-20) +# along with Ed Reingold's cal-hebrew in GNU Emacs 21.4, +# to generate the transitions from 2005 through 2012. +# (I replaced "lastFri" with "Fri>=26" by hand.) +# The spring transitions all correspond to the following Rule: +# +# Rule Zion 2005 2012 - Mar Fri>=26 2:00 1:00 D +# +# but older zic implementations (e.g., Solaris 8) do not support +# "Fri>=26" to mean April 1 in years like 2005, so for now we list the +# springtime transitions explicitly. + +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Zion 2005 only - Apr 1 2:00 1:00 D +Rule Zion 2005 only - Oct 9 2:00 0 S +Rule Zion 2006 2010 - Mar Fri>=26 2:00 1:00 D +Rule Zion 2006 only - Oct 1 2:00 0 S +Rule Zion 2007 only - Sep 16 2:00 0 S +Rule Zion 2008 only - Oct 5 2:00 0 S +Rule Zion 2009 only - Sep 27 2:00 0 S +Rule Zion 2010 only - Sep 12 2:00 0 S +Rule Zion 2011 only - Apr 1 2:00 1:00 D +Rule Zion 2011 only - Oct 2 2:00 0 S +Rule Zion 2012 only - Mar Fri>=26 2:00 1:00 D +Rule Zion 2012 only - Sep 23 2:00 0 S + +# From Ephraim Silverberg (2013-06-27): +# On June 23, 2013, the Israeli government approved changes to the +# Time Decree Law. The next day, the changes passed the First Reading +# in the Knesset. The law is expected to pass the Second and Third +# (final) Readings by the beginning of September 2013. +# +# As of 2013, DST starts at 02:00 on the Friday before the last Sunday +# in March. DST ends at 02:00 on the last Sunday of October. + +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Zion 2013 max - Mar Fri>=23 2:00 1:00 D +Rule Zion 2013 max - Oct lastSun 2:00 0 S + +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Asia/Jerusalem 2:20:54 - LMT 1880 + 2:20:40 - JMT 1918 # Jerusalem Mean Time? + 2:00 Zion I%sT + + + +############################################################################### + +# Japan + +# '9:00' and 'JST' is from Guy Harris. + +# From Paul Eggert (1995-03-06): +# Today's _Asahi Evening News_ (page 4) reports that Japan had +# daylight saving between 1948 and 1951, but "the system was discontinued +# because the public believed it would lead to longer working hours." + +# From Mayumi Negishi in the 2005-08-10 Japan Times: +# http://www.japantimes.co.jp/cgi-bin/getarticle.pl5?nn20050810f2.htm +# Occupation authorities imposed daylight-saving time on Japan on +# [1948-05-01].... But lack of prior debate and the execution of +# daylight-saving time just three days after the bill was passed generated +# deep hatred of the concept.... The Diet unceremoniously passed a bill to +# dump the unpopular system in October 1951, less than a month after the San +# Francisco Peace Treaty was signed. (A government poll in 1951 showed 53% +# of the Japanese wanted to scrap daylight-saving time, as opposed to 30% who +# wanted to keep it.) + +# From Paul Eggert (2006-03-22): +# Shanks & Pottenger write that DST in Japan during those years was as follows: +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Japan 1948 only - May Sun>=1 2:00 1:00 D +Rule Japan 1948 1951 - Sep Sat>=8 2:00 0 S +Rule Japan 1949 only - Apr Sun>=1 2:00 1:00 D +Rule Japan 1950 1951 - May Sun>=1 2:00 1:00 D +# but the only locations using it (for birth certificates, presumably, since +# their audience is astrologers) were US military bases. For now, assume +# that for most purposes daylight-saving time was observed; otherwise, what +# would have been the point of the 1951 poll? + +# From Hideyuki Suzuki (1998-11-09): +# 'Tokyo' usually stands for the former location of Tokyo Astronomical +# Observatory: 139 degrees 44' 40.90" E (9h 18m 58.727s), +# 35 degrees 39' 16.0" N. +# This data is from 'Rika Nenpyou (Chronological Scientific Tables) 1996' +# edited by National Astronomical Observatory of Japan.... +# JST (Japan Standard Time) has been used since 1888-01-01 00:00 (JST). +# The law is enacted on 1886-07-07. + +# From Hideyuki Suzuki (1998-11-16): +# The ordinance No. 51 (1886) established "standard time" in Japan, +# which stands for the time on 135 degrees E. +# In the ordinance No. 167 (1895), "standard time" was renamed to "central +# standard time". And the same ordinance also established "western standard +# time", which stands for the time on 120 degrees E.... But "western standard +# time" was abolished in the ordinance No. 529 (1937). In the ordinance No. +# 167, there is no mention regarding for what place western standard time is +# standard.... +# +# I wrote "ordinance" above, but I don't know how to translate. +# In Japanese it's "chokurei", which means ordinance from emperor. + +# From Yu-Cheng Chuang (2013-07-12): +# ...the Meiji Emperor announced Ordinance No. 167 of Meiji Year 28 "The clause +# about standard time" ... The adoption began from Jan 1, 1896. +# http://ja.wikisource.org/wiki/標準時ニ關スル件_(公布時) +# +# ...the Showa Emperor announced Ordinance No. 529 of Showa Year 12 ... which +# means the whole Japan territory, including later occupations, adopt Japan +# Central Time (UTC+9). The adoption began on Oct 1, 1937. +# http://ja.wikisource.org/wiki/明治二十八年勅令第百六十七號標準時ニ關スル件中改正ノ件 + +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Asia/Tokyo 9:18:59 - LMT 1887 Dec 31 15:00u + 9:00 - JST 1896 Jan 1 + 9:00 - JCST 1937 Oct 1 + 9:00 Japan J%sT +# Since 1938, all Japanese possessions have been like Asia/Tokyo. + +# Jordan +# +# From <http://star.arabia.com/990701/JO9.html> +# Jordan Week (1999-07-01) via Steffen Thorsen (1999-09-09): +# Clocks in Jordan were forwarded one hour on Wednesday at midnight, +# in accordance with the government's decision to implement summer time +# all year round. +# +# From <http://star.arabia.com/990930/JO9.html> +# Jordan Week (1999-09-30) via Steffen Thorsen (1999-11-09): +# Winter time starts today Thursday, 30 September. Clocks will be turned back +# by one hour. This is the latest government decision and it's final! +# The decision was taken because of the increase in working hours in +# government's departments from six to seven hours. +# +# From Paul Eggert (2005-11-22): +# Starting 2003 transitions are from Steffen Thorsen's web site timeanddate.com. +# +# From Steffen Thorsen (2005-11-23): +# For Jordan I have received multiple independent user reports every year +# about DST end dates, as the end-rule is different every year. +# +# From Steffen Thorsen (2006-10-01), after a heads-up from Hilal Malawi: +# http://www.petranews.gov.jo/nepras/2006/Sep/05/4000.htm +# "Jordan will switch to winter time on Friday, October 27". +# + +# From Steffen Thorsen (2009-04-02): +# This single one might be good enough, (2009-03-24, Arabic): +# http://petra.gov.jo/Artical.aspx?Lng=2&Section=8&Artical=95279 +# +# Google's translation: +# +# > The Council of Ministers decided in 2002 to adopt the principle of timely +# > submission of the summer at 60 minutes as of midnight on the last Thursday +# > of the month of March of each year. +# +# So - this means the midnight between Thursday and Friday since 2002. + +# From Arthur David Olson (2009-04-06): +# We still have Jordan switching to DST on Thursdays in 2000 and 2001. + +# From Steffen Thorsen (2012-10-25): +# Yesterday the government in Jordan announced that they will not +# switch back to standard time this winter, so the will stay on DST +# until about the same time next year (at least). +# http://www.petra.gov.jo/Public_News/Nws_NewsDetails.aspx?NewsID=88950 + +# From Steffen Thorsen (2013-12-11): +# Jordan Times and other sources say that Jordan is going back to +# UTC+2 on 2013-12-19 at midnight: +# http://jordantimes.com/govt-decides-to-switch-back-to-wintertime +# Official, in Arabic: +# http://www.petra.gov.jo/public_news/Nws_NewsDetails.aspx?Menu_ID=&Site_Id=2&lang=1&NewsID=133230&CatID=14 +# ... Our background/permalink about it +# http://www.timeanddate.com/news/time/jordan-reverses-dst-decision.html +# ... +# http://www.petra.gov.jo/Public_News/Nws_NewsDetails.aspx?lang=2&site_id=1&NewsID=133313&Type=P +# ... says midnight for the coming one and 1:00 for the ones in the future +# (and they will use DST again next year, using the normal schedule). + +# From Paul Eggert (2013-12-11): +# As Steffen suggested, consider the past 21-month experiment to be DST. + +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Jordan 1973 only - Jun 6 0:00 1:00 S +Rule Jordan 1973 1975 - Oct 1 0:00 0 - +Rule Jordan 1974 1977 - May 1 0:00 1:00 S +Rule Jordan 1976 only - Nov 1 0:00 0 - +Rule Jordan 1977 only - Oct 1 0:00 0 - +Rule Jordan 1978 only - Apr 30 0:00 1:00 S +Rule Jordan 1978 only - Sep 30 0:00 0 - +Rule Jordan 1985 only - Apr 1 0:00 1:00 S +Rule Jordan 1985 only - Oct 1 0:00 0 - +Rule Jordan 1986 1988 - Apr Fri>=1 0:00 1:00 S +Rule Jordan 1986 1990 - Oct Fri>=1 0:00 0 - +Rule Jordan 1989 only - May 8 0:00 1:00 S +Rule Jordan 1990 only - Apr 27 0:00 1:00 S +Rule Jordan 1991 only - Apr 17 0:00 1:00 S +Rule Jordan 1991 only - Sep 27 0:00 0 - +Rule Jordan 1992 only - Apr 10 0:00 1:00 S +Rule Jordan 1992 1993 - Oct Fri>=1 0:00 0 - +Rule Jordan 1993 1998 - Apr Fri>=1 0:00 1:00 S +Rule Jordan 1994 only - Sep Fri>=15 0:00 0 - +Rule Jordan 1995 1998 - Sep Fri>=15 0:00s 0 - +Rule Jordan 1999 only - Jul 1 0:00s 1:00 S +Rule Jordan 1999 2002 - Sep lastFri 0:00s 0 - +Rule Jordan 2000 2001 - Mar lastThu 0:00s 1:00 S +Rule Jordan 2002 2012 - Mar lastThu 24:00 1:00 S +Rule Jordan 2003 only - Oct 24 0:00s 0 - +Rule Jordan 2004 only - Oct 15 0:00s 0 - +Rule Jordan 2005 only - Sep lastFri 0:00s 0 - +Rule Jordan 2006 2011 - Oct lastFri 0:00s 0 - +Rule Jordan 2013 only - Dec 20 0:00 0 - +Rule Jordan 2014 max - Mar lastThu 24:00 1:00 S +Rule Jordan 2014 max - Oct lastFri 0:00s 0 - +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Asia/Amman 2:23:44 - LMT 1931 + 2:00 Jordan EE%sT + + +# Kazakhstan + +# From Kazakhstan Embassy's News Bulletin No. 11 +# <http://www.kazsociety.org.uk/news/2005/03/30.htm> (2005-03-21): +# The Government of Kazakhstan passed a resolution March 15 abolishing +# daylight saving time citing lack of economic benefits and health +# complications coupled with a decrease in productivity. +# +# From Branislav Kojic (in Astana) via Gwillim Law (2005-06-28): +# ... what happened was that the former Kazakhstan Eastern time zone +# was "blended" with the Central zone. Therefore, Kazakhstan now has +# two time zones, and difference between them is one hour. The zone +# closer to UTC is the former Western zone (probably still called the +# same), encompassing four provinces in the west: Aqtobe, Atyrau, +# Mangghystau, and West Kazakhstan. The other zone encompasses +# everything else.... I guess that would make Kazakhstan time zones +# de jure UTC+5 and UTC+6 respectively. + +# From Stepan Golosunov (2016-03-27) ([*] means see later comments below): +# Review of the linked documents from http://adilet.zan.kz/ +# produced the following data for post-1991 Kazakhstan: +# +# 0. Act of the Cabinet of Ministers of the USSR +# from 1991-02-04 No. 20 +# http://pravo.gov.ru/proxy/ips/?docbody=&nd=102010545 +# removed the extra hour ("decree time") on the territory of the USSR +# starting with the last Sunday of March 1991. +# It also allowed (but not mandated) Kazakh SSR, Kirghiz SSR, Tajik SSR, +# Turkmen SSR and Uzbek SSR to not have "summer" time. +# +# The 1992-01-13 act also refers to the act of the Cabinet of Ministers +# of the Kazakh SSR from 1991-03-20 No. 170 "About the act of the Cabinet +# of Ministers of the USSR from 1991-02-04 No. 20" but I didn't found its +# text. +# +# According to Izvestia newspaper No. 68 (23334) from 1991-03-20 +# (page 6; available at http://libinfo.org/newsr/newsr2574.djvu via +# http://libinfo.org/index.php?id=58564) on 1991-03-31 at 2:00 during +# transition to "summer" time: +# Republic of Georgia, Latvian SSR, Lithuanian SSR, SSR Moldova, +# Estonian SSR; Komi ASSR; Kaliningrad oblast; Nenets autonomous okrug +# were to move clocks 1 hour forward. +# Kazakh SSR (excluding Uralsk oblast); Republic of Kyrgyzstan, Tajik +# SSR; Andijan, Jizzakh, Namangan, Sirdarya, Tashkent, Fergana oblasts +# of the Uzbek SSR were to move clocks 1 hour backwards. +# Other territories were to not move clocks. +# When the "summer" time would end on 1991-09-29, clocks were to be +# moved 1 hour backwards on the territory of the USSR excluding +# Kazakhstan, Kirghizia, Uzbekistan, Turkmenia, Tajikistan. +# +# Apparently there were last minute changes. Apparently Kazakh act No. 170 +# was one of such changes. +# +# https://ru.wikipedia.org/wiki/Декретное время +# claims that Sovetskaya Rossiya newspaper on 1991-03-29 published that +# Nenets autonomous okrug, Komi and Kazakhstan (excluding Uralsk oblast) +# were to not move clocks and Uralsk oblast was to move clocks +# forward; on 1991-09-29 Kazakhstan was to move clocks backwards. +# (Probably there were changes even after that publication. There is an +# article claiming that Kaliningrad oblast decided on 1991-03-29 to not +# move clocks.) +# +# This implies that on 1991-03-31 Asia/Oral remained on +04/+05 while +# the rest of Kazakhstan switched from +06/+07 to +05/06 or from +05/06 +# to +04/+05. It's unclear how Kzyl-Orda oblast moved into the fifth +# time belt. (By switching from +04/+05 to +05/+06 on 1991-09-29?) ... +# +# 1. Act of the Cabinet of Ministers of the Republic of Kazakhstan +# from 1992-01-13 No. 28 +# http://adilet.zan.kz/rus/docs/P920000028_ +# (text includes modification from the 1996 act) +# introduced new rules for calculation of time, mirroring Russian +# 1992-01-08 act. It specified that time would be calculated +# according to time belts plus extra hour ("decree time"), moved clocks +# on the whole territory of Kazakhstan 1 hour forward on 1992-01-19 at +# 2:00, specified DST rules. It acknowledged that Kazakhstan was +# located in the fourth and the fifth time belts and specified the +# border between them to be located east of Kustanay and Aktyubinsk +# oblasts (notably including Turgai and Kzyl-Orda oblasts into the fifth +# time belt). +# +# This means switch on 1992-01-19 at 2:00 from +04/+05 to +05/+06 for +# Asia/Aqtau, Asia/Aqtobe, Asia/Oral, Atyrau and Kustanay oblasts; from +# +05/+06 to +06/+07 for Asia/Almaty and Asia/Qyzylorda (and Arkalyk) [*].... +# +# 2. Act of the Cabinet of Ministers of the Republic of Kazakhstan +# from 1992-03-27 No. 284 +# http://adilet.zan.kz/rus/docs/P920000284_ +# cancels extra hour ("decree time") for Uralsk and Kzyl-Orda oblasts +# since the last Sunday of March 1992, while keeping them in the fourth +# and the fifth time belts respectively. +# +# 3. Order of the Prime Minister of the Republic of Kazakhstan +# from 1994-09-23 No. 384 +# http://adilet.zan.kz/rus/docs/R940000384_ +# cancels the extra hour ("decree time") on the territory of Mangystau +# oblast since the last Sunday of September 1994 (saying that time on +# the territory would correspond to the third time belt as a +# result).... +# +# 4. Act of the Government of the Republic of Kazakhstan +# from 1996-05-08 No. 575 +# http://adilet.zan.kz/rus/docs/P960000575_ +# amends the 1992-01-13 act to end summer time in October instead +# of September, mirroring identical Russian change from 1996-04-23 act. +# +# 5. Act of the Government of the Republic of Kazakhstan +# from 1999-03-26 No. 305 +# http://adilet.zan.kz/rus/docs/P990000305_ +# cancels the extra hour ("decree time") for Atyrau oblast since the +# last Sunday of March 1999 while retaining the oblast in the fourth +# time belt. +# +# This means change from +05/+06 to +04/+05. +# +# There is no zone for Atyrau currently (listed under Asia/Aqtau in +# zone1970.tab).[*] +# +# 6. Act of the Government of the Republic of Kazakhstan +# from 2000-11-23 No. 1749 +# http://adilet.zan.kz/rus/archive/docs/P000001749_/23.11.2000 +# replaces the previous five documents. +# +# The only changes I noticed are in definition of the border between the +# fourth and the fifth time belts. They account for changes in spelling +# and administrative division (splitting of Turgai oblast in 1997 +# probably changed time in territories incorporated into Kostanay oblast +# (including Arkalyk) from +06/+07 to +05/+06) and move Kyzylorda oblast +# from being in the fifth time belt and not using decree time into the +# fourth time belt (no change in practice).[*] +# +# 7. Act of the Government of the Republic of Kazakhstan +# from 2003-12-29 No. 1342 +# http://adilet.zan.kz/rus/docs/P030001342_ +# modified the 2000-11-23 act. No relevant changes, apparently. +# +# 8. Act of the Government of the Republic of Kazakhstan +# from 2004-07-20 No. 775 +# http://adilet.zan.kz/rus/archive/docs/P040000775_/20.07.2004 +# modified the 2000-11-23 act to move Kostanay and Kyzylorda oblasts into +# the fifth time belt and add Aktobe oblast to the list of regions not +# using extra hour ("decree time"), leaving Kazakhstan with only 2 time +# zones (+04/+05 and +06/+07). The changes were to be implemented +# during DST transitions in 2004 and 2005 but the acts got radically +# amended before implementation happened. +# +# 9. Act of the Government of the Republic of Kazakhstan +# from 2004-09-15 No. 1059 +# http://adilet.zan.kz/rus/docs/P040001059_ +# modified the 2000-11-23 act to remove exceptions from the "decree time" +# (leaving Kazakhstan in +05/+06 and +06/+07 zones), amended the +# 2004-07-20 act to implement changes for Atyrau, West Kazakhstan, +# Kostanay, Kyzylorda and Mangystau oblasts by not moving clocks +# during the 2014 transition to "winter" time. +# +# This means transition from +04/+05 to +05/+06 for Atyrau oblast (no +# zone currently), Asia/Oral, Asia/Aqtau and transition from +05/+06 to +# +06/+07 for Kostanay oblast (Kostanay and Arkalyk, no zones currently) +# and Asia/Qyzylorda on 2004-10-31 at 3:00....[*] +# +# 10. Act of the Government of the Republic of Kazakhstan +# from 2005-03-15 No. 231 +# http://adilet.zan.kz/rus/docs/P050000231_ +# removes DST provisions from the 2000-11-23 act, removes most of the +# (already implemented) provisions from the 2004-07-20 and 2004-09-15 +# acts, comes into effect 10 days after official publication. +# The only practical effect seems to be the abolition of the summer +# time. +# +# Unamended version of the act of the Government of the Russian Federation +# No. 23 from 1992-01-08 [See 'europe' file for details]. +# Kazakh 1992-01-13 act appears to provide the same rules and 1992-03-27 +# act was to be enacted on the last Sunday of March 1992. + +# From Paul Eggert (2016-04-15): +# The tables below should reflect Stepan Golosunov's remarks above, +# except for the items marked "[*]" which I haven't gotten to yet. +# It looks like we will need new zones Asia/Atyrau and Asia/Qostanay +# to handle changes from 1992 through 2004 that we did not previously +# know about. + +# +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# +# Almaty (formerly Alma-Ata), representing most locations in Kazakhstan +# This includes KZ-AKM, KZ-ALA, KZ-ALM, KZ-AST, KZ-BAY, KZ-VOS, KZ-ZHA, +# KZ-KAR, KZ-SEV, KZ-PAV, and KZ-YUZ. +Zone Asia/Almaty 5:07:48 - LMT 1924 May 2 # or Alma-Ata + 5:00 - +05 1930 Jun 21 + 6:00 RussiaAsia +06/+07 1991 Mar 31 2:00s + 5:00 RussiaAsia +05/+06 1992 Jan 19 2:00s + 6:00 RussiaAsia +06/+07 2004 Oct 31 2:00s + 6:00 - +06 +# Qyzylorda (aka Kyzylorda, Kizilorda, Kzyl-Orda, etc.) (KZ-KZY) +Zone Asia/Qyzylorda 4:21:52 - LMT 1924 May 2 + 4:00 - +04 1930 Jun 21 + 5:00 - +05 1981 Apr 1 + 5:00 1:00 +06 1981 Oct 1 + 6:00 - +06 1982 Apr 1 + 5:00 RussiaAsia +05/+06 1991 Mar 31 2:00s + 4:00 RussiaAsia +04/+05 1991 Sep 29 2:00s + 5:00 RussiaAsia +05/+06 1992 Jan 19 2:00s + 6:00 RussiaAsia +06/+07 1992 Mar 29 2:00s + 5:00 RussiaAsia +05/+06 2004 Oct 31 2:00s + 6:00 - +06 +# Aqtobe (aka Aktobe, formerly Aktyubinsk) (KZ-AKT) +Zone Asia/Aqtobe 3:48:40 - LMT 1924 May 2 + 4:00 - +04 1930 Jun 21 + 5:00 - +05 1981 Apr 1 + 5:00 1:00 +06 1981 Oct 1 + 6:00 - +06 1982 Apr 1 + 5:00 RussiaAsia +05/+06 1991 Mar 31 2:00s + 4:00 RussiaAsia +04/+05 1992 Jan 19 2:00s + 5:00 RussiaAsia +05/+06 2004 Oct 31 2:00s + 5:00 - +05 +# Qostanay (KZ-KUS) + +# Mangghystau (KZ-MAN) +# Aqtau was not founded until 1963, but it represents an inhabited region, +# so include time stamps before 1963. +Zone Asia/Aqtau 3:21:04 - LMT 1924 May 2 + 4:00 - +04 1930 Jun 21 + 5:00 - +05 1963 + 5:00 - +05 1981 Oct 1 + 6:00 - +06 1982 Apr 1 + 5:00 RussiaAsia +05/+06 1991 Mar 31 2:00s + 4:00 RussiaAsia +04/+05 1992 Jan 19 2:00s + 5:00 RussiaAsia +05/+06 1994 Sep 25 2:00s + 4:00 RussiaAsia +04/+05 2004 Oct 31 2:00s + 5:00 - +05 + +# West Kazakhstan (KZ-ZAP) +# From Paul Eggert (2016-03-18): +# The 1989 transition is from USSR act No. 227 (1989-03-14). +Zone Asia/Oral 3:25:24 - LMT 1924 May 2 # or Ural'sk + 4:00 - +04 1930 Jun 21 + 5:00 - +05 1981 Apr 1 + 5:00 1:00 +06 1981 Oct 1 + 6:00 - +06 1982 Apr 1 + 5:00 RussiaAsia +05/+06 1989 Mar 26 2:00s + 4:00 RussiaAsia +04/+05 1992 Jan 19 2:00s + 5:00 RussiaAsia +05/+06 1992 Mar 29 2:00s + 4:00 RussiaAsia +04/+05 2004 Oct 31 2:00s + 5:00 - +05 + +# Kyrgyzstan (Kirgizstan) +# Transitions through 1991 are from Shanks & Pottenger. + +# From Paul Eggert (2005-08-15): +# According to an article dated today in the Kyrgyzstan Development Gateway +# http://eng.gateway.kg/cgi-bin/page.pl?id=1&story_name=doc9979.shtml +# Kyrgyzstan is canceling the daylight saving time system. I take the article +# to mean that they will leave their clocks at 6 hours ahead of UTC. +# From Malik Abdugaliev (2005-09-21): +# Our government cancels daylight saving time 6th of August 2005. +# From 2005-08-12 our GMT-offset is +6, w/o any daylight saving. + +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Kyrgyz 1992 1996 - Apr Sun>=7 0:00s 1:00 S +Rule Kyrgyz 1992 1996 - Sep lastSun 0:00 0 - +Rule Kyrgyz 1997 2005 - Mar lastSun 2:30 1:00 S +Rule Kyrgyz 1997 2004 - Oct lastSun 2:30 0 - +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Asia/Bishkek 4:58:24 - LMT 1924 May 2 + 5:00 - FRUT 1930 Jun 21 # Frunze Time + 6:00 RussiaAsia FRU%sT 1991 Mar 31 2:00s + 5:00 1:00 FRUST 1991 Aug 31 2:00 # independence + 5:00 Kyrgyz KG%sT 2005 Aug 12 # Kyrgyzstan Time + 6:00 - KGT + +############################################################################### + +# Korea (North and South) + +# From Annie I. Bang (2006-07-10): +# http://www.koreaherald.com/view.php?ud=200607100012 +# Korea ran a daylight saving program from 1949-61 but stopped it +# during the 1950-53 Korean War. The system was temporarily enforced +# between 1987 and 1988 ... + +# From Sanghyuk Jung (2014-10-29): +# http://mm.icann.org/pipermail/tz/2014-October/021830.html +# According to the Korean Wikipedia +# http://ko.wikipedia.org/wiki/한국_표준시 +# [oldid=12896437 2014-09-04 08:03 UTC] +# DST in Republic of Korea was as follows.... And I checked old +# newspapers in Korean, all articles correspond with data in Wikipedia. +# For example, the article in 1948 (Korean Language) proved that DST +# started at June 1 in that year. For another example, the article in +# 1988 said that DST started at 2:00 AM in that year. + +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule ROK 1948 only - Jun 1 0:00 1:00 D +Rule ROK 1948 only - Sep 13 0:00 0 S +Rule ROK 1949 only - Apr 3 0:00 1:00 D +Rule ROK 1949 1951 - Sep Sun>=8 0:00 0 S +Rule ROK 1950 only - Apr 1 0:00 1:00 D +Rule ROK 1951 only - May 6 0:00 1:00 D +Rule ROK 1955 only - May 5 0:00 1:00 D +Rule ROK 1955 only - Sep 9 0:00 0 S +Rule ROK 1956 only - May 20 0:00 1:00 D +Rule ROK 1956 only - Sep 30 0:00 0 S +Rule ROK 1957 1960 - May Sun>=1 0:00 1:00 D +Rule ROK 1957 1960 - Sep Sun>=18 0:00 0 S +Rule ROK 1987 1988 - May Sun>=8 2:00 1:00 D +Rule ROK 1987 1988 - Oct Sun>=8 3:00 0 S + +# From Paul Eggert (2014-10-30): +# The Korean Wikipedia entry gives the following sources for UT offsets: +# +# 1908: Official Journal Article No. 3994 (Edict No. 5) +# 1912: Governor-General of Korea Official Gazette Issue No. 367 +# (Announcement No. 338) +# 1954: Presidential Decree No. 876 (1954-03-17) +# 1961: Law No. 676 (1961-08-07) +# 1987: Law No. 3919 (1986-12-31) +# +# The Wikipedia entry also has confusing information about a change +# to UT+9 in April 1910, but then what would be the point of the later change +# to UT+9 on 1912-01-01? Omit the 1910 change for now. +# +# I guessed that time zone abbreviations through 1945 followed the same +# rules as discussed under Taiwan, with nominal switches from JST to KST +# when the respective cities were taken over by the Allies after WWII. +# +# For Pyongyang we have no information; guess no changes since World War II. + +# From Steffen Thorsen (2015-08-07): +# According to many news sources, North Korea is going to change to +# the 8:30 time zone on August 15, one example: +# http://www.bbc.com/news/world-asia-33815049 +# +# From Paul Eggert (2015-08-15): +# Bells rang out midnight (00:00) Friday as part of the celebrations. See: +# Talmadge E. North Korea celebrates new time zone, 'Pyongyang Time' +# http://news.yahoo.com/north-korea-celebrates-time-zone-pyongyang-time-164038128.html +# There is no common English-language abbreviation for this time zone. +# Use KST, as that's what we already use for 1954-1961 in ROK. + +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Asia/Seoul 8:27:52 - LMT 1908 Apr 1 + 8:30 - KST 1912 Jan 1 + 9:00 - JCST 1937 Oct 1 + 9:00 - JST 1945 Sep 8 + 9:00 - KST 1954 Mar 21 + 8:30 ROK K%sT 1961 Aug 10 + 9:00 ROK K%sT +Zone Asia/Pyongyang 8:23:00 - LMT 1908 Apr 1 + 8:30 - KST 1912 Jan 1 + 9:00 - JCST 1937 Oct 1 + 9:00 - JST 1945 Aug 24 + 9:00 - KST 2015 Aug 15 00:00 + 8:30 - KST + +############################################################################### + +# Kuwait +# See Asia/Riyadh. + +# Laos +# See Asia/Bangkok. + + +# Lebanon +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Lebanon 1920 only - Mar 28 0:00 1:00 S +Rule Lebanon 1920 only - Oct 25 0:00 0 - +Rule Lebanon 1921 only - Apr 3 0:00 1:00 S +Rule Lebanon 1921 only - Oct 3 0:00 0 - +Rule Lebanon 1922 only - Mar 26 0:00 1:00 S +Rule Lebanon 1922 only - Oct 8 0:00 0 - +Rule Lebanon 1923 only - Apr 22 0:00 1:00 S +Rule Lebanon 1923 only - Sep 16 0:00 0 - +Rule Lebanon 1957 1961 - May 1 0:00 1:00 S +Rule Lebanon 1957 1961 - Oct 1 0:00 0 - +Rule Lebanon 1972 only - Jun 22 0:00 1:00 S +Rule Lebanon 1972 1977 - Oct 1 0:00 0 - +Rule Lebanon 1973 1977 - May 1 0:00 1:00 S +Rule Lebanon 1978 only - Apr 30 0:00 1:00 S +Rule Lebanon 1978 only - Sep 30 0:00 0 - +Rule Lebanon 1984 1987 - May 1 0:00 1:00 S +Rule Lebanon 1984 1991 - Oct 16 0:00 0 - +Rule Lebanon 1988 only - Jun 1 0:00 1:00 S +Rule Lebanon 1989 only - May 10 0:00 1:00 S +Rule Lebanon 1990 1992 - May 1 0:00 1:00 S +Rule Lebanon 1992 only - Oct 4 0:00 0 - +Rule Lebanon 1993 max - Mar lastSun 0:00 1:00 S +Rule Lebanon 1993 1998 - Sep lastSun 0:00 0 - +Rule Lebanon 1999 max - Oct lastSun 0:00 0 - +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Asia/Beirut 2:22:00 - LMT 1880 + 2:00 Lebanon EE%sT + +# Malaysia +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule NBorneo 1935 1941 - Sep 14 0:00 0:20 TS # one-Third Summer +Rule NBorneo 1935 1941 - Dec 14 0:00 0 - +# +# peninsular Malaysia +# taken from Mok Ly Yng (2003-10-30) +# http://www.math.nus.edu.sg/aslaksen/teaching/timezone.html +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Asia/Kuala_Lumpur 6:46:46 - LMT 1901 Jan 1 + 6:55:25 - SMT 1905 Jun 1 # Singapore M.T. + 7:00 - MALT 1933 Jan 1 # Malaya Time + 7:00 0:20 MALST 1936 Jan 1 + 7:20 - MALT 1941 Sep 1 + 7:30 - MALT 1942 Feb 16 + 9:00 - JST 1945 Sep 12 + 7:30 - MALT 1982 Jan 1 + 8:00 - MYT # Malaysia Time +# Sabah & Sarawak +# From Paul Eggert (2014-08-12): +# The data entries here are mostly from Shanks & Pottenger, but the 1942, 1945 +# and 1982 transition dates are from Mok Ly Yng. +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Asia/Kuching 7:21:20 - LMT 1926 Mar + 7:30 - BORT 1933 # Borneo Time + 8:00 NBorneo BOR%sT 1942 Feb 16 + 9:00 - JST 1945 Sep 12 + 8:00 - BORT 1982 Jan 1 + 8:00 - MYT + +# Maldives +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Indian/Maldives 4:54:00 - LMT 1880 # Male + 4:54:00 - MMT 1960 # Male Mean Time + 5:00 - MVT # Maldives Time + +# Mongolia + +# Shanks & Pottenger say that Mongolia has three time zones, but +# The USNO (1995-12-21) and the CIA map Standard Time Zones of the World +# (2005-03) both say that it has just one. + +# From Oscar van Vlijmen (1999-12-11): +# General Information Mongolia +# <http://www.mongoliatourism.gov.mn/general.htm> (1999-09) +# "Time: Mongolia has two time zones. Three westernmost provinces of +# Bayan-Ölgii, Uvs, and Hovd are one hour earlier than the capital city, and +# the rest of the country follows the Ulaanbaatar time, which is UTC/GMT plus +# eight hours." + +# From Rives McDow (1999-12-13): +# Mongolia discontinued the use of daylight savings time in 1999; 1998 +# being the last year it was implemented. The dates of implementation I am +# unsure of, but most probably it was similar to Russia, except for the time +# of implementation may have been different.... +# Some maps in the past have indicated that there was an additional time +# zone in the eastern part of Mongolia, including the provinces of Dornod, +# Sükhbaatar, and possibly Khentii. + +# From Paul Eggert (1999-12-15): +# Naming and spelling is tricky in Mongolia. +# We'll use Hovd (also spelled Chovd and Khovd) to represent the west zone; +# the capital of the Hovd province is sometimes called Hovd, sometimes Dund-Us, +# and sometimes Jirgalanta (with variant spellings), but the name Hovd +# is good enough for our purposes. + +# From Rives McDow (2001-05-13): +# In addition to Mongolia starting daylight savings as reported earlier +# (adopted DST on 2001-04-27 02:00 local time, ending 2001-09-28), +# there are three time zones. +# +# Provinces [at 7:00]: Bayan-Ölgii, Uvs, Khovd, Zavkhan, Govi-Altai +# Provinces [at 8:00]: Khövsgöl, Bulgan, Arkhangai, Khentii, Töv, +# Bayankhongor, Övörkhangai, Dundgovi, Dornogovi, Ömnögovi +# Provinces [at 9:00]: Dornod, Sükhbaatar +# +# [The province of Selenge is omitted from the above lists.] + +# From Ganbold Ts., Ulaanbaatar (2004-04-17): +# Daylight saving occurs at 02:00 local time last Saturday of March. +# It will change back to normal at 02:00 local time last Saturday of +# September.... As I remember this rule was changed in 2001. +# +# From Paul Eggert (2004-04-17): +# For now, assume Rives McDow's informant got confused about Friday vs +# Saturday, and that his 2001 dates should have 1 added to them. + +# From Paul Eggert (2005-07-26): +# We have wildly conflicting information about Mongolia's time zones. +# Bill Bonnet (2005-05-19) reports that the US Embassy in Ulaanbaatar says +# there is only one time zone and that DST is observed, citing Microsoft +# Windows XP as the source. Risto Nykänen (2005-05-16) reports that +# travelmongolia.org says there are two time zones (UTC+7, UTC+8) with no DST. +# Oscar van Vlijmen (2005-05-20) reports that the Mongolian Embassy in +# Washington, DC says there are two time zones, with DST observed. +# He also found +# http://ubpost.mongolnews.mn/index.php?subaction=showcomments&id=1111634894&archive=&start_from=&ucat=1& +# which also says that there is DST, and which has a comment by "Toddius" +# (2005-03-31 06:05 +0700) saying "Mongolia actually has 3.5 time zones. +# The West (OLGII) is +7 GMT, most of the country is ULAT is +8 GMT +# and some Eastern provinces are +9 GMT but Sükhbaatar Aimag is SUHK +8.5 GMT. +# The SUKH timezone is new this year, it is one of the few things the +# parliament passed during the tumultuous winter session." +# For now, let's ignore this information, until we have more confirmation. + +# From Ganbold Ts. (2007-02-26): +# Parliament of Mongolia has just changed the daylight-saving rule in February. +# They decided not to adopt daylight-saving time.... +# http://www.mongolnews.mn/index.php?module=unuudur&sec=view&id=15742 + +# From Deborah Goldsmith (2008-03-30): +# We received a bug report claiming that the tz database UTC offset for +# Asia/Choibalsan (GMT+09:00) is incorrect, and that it should be GMT +# +08:00 instead. Different sources appear to disagree with the tz +# database on this, e.g.: +# +# http://www.timeanddate.com/worldclock/city.html?n=1026 +# http://www.worldtimeserver.com/current_time_in_MN.aspx +# +# both say GMT+08:00. + +# From Steffen Thorsen (2008-03-31): +# eznis airways, which operates several domestic flights, has a flight +# schedule here: +# http://www.eznis.com/Container.jsp?id=112 +# (click the English flag for English) +# +# There it appears that flights between Choibalsan and Ulaanbaatar arrive +# about 1:35 - 1:50 hours later in local clock time, no matter the +# direction, while Ulaanbaatar-Khovd takes 2 hours in the Eastern +# direction and 3:35 back, which indicates that Ulaanbaatar and Khovd are +# in different time zones (like we know about), while Choibalsan and +# Ulaanbaatar are in the same time zone (correction needed). + +# From Arthur David Olson (2008-05-19): +# Assume that Choibalsan is indeed offset by 8:00. +# XXX--in the absence of better information, assume that transition +# was at the start of 2008-03-31 (the day of Steffen Thorsen's report); +# this is almost surely wrong. + +# From Ganbold Tsagaankhuu (2015-03-10): +# It seems like yesterday Mongolian Government meeting has concluded to use +# daylight saving time in Mongolia.... Starting at 2:00AM of last Saturday of +# March 2015, daylight saving time starts. And 00:00AM of last Saturday of +# September daylight saving time ends. Source: +# http://zasag.mn/news/view/8969 + +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Mongol 1983 1984 - Apr 1 0:00 1:00 S +Rule Mongol 1983 only - Oct 1 0:00 0 - +# Shanks & Pottenger and IATA SSIM say 1990s switches occurred at 00:00, +# but McDow says the 2001 switches occurred at 02:00. Also, IATA SSIM +# (1996-09) says 1996-10-25. Go with Shanks & Pottenger through 1998. +# +# Shanks & Pottenger say that the Sept. 1984 through Sept. 1990 switches +# in Choibalsan (more precisely, in Dornod and Sükhbaatar) took place +# at 02:00 standard time, not at 00:00 local time as in the rest of +# the country. That would be odd, and possibly is a result of their +# correction of 02:00 (in the previous edition) not being done correctly +# in the latest edition; so ignore it for now. + +Rule Mongol 1985 1998 - Mar lastSun 0:00 1:00 S +Rule Mongol 1984 1998 - Sep lastSun 0:00 0 - +# IATA SSIM (1999-09) says Mongolia no longer observes DST. +Rule Mongol 2001 only - Apr lastSat 2:00 1:00 S +Rule Mongol 2001 2006 - Sep lastSat 2:00 0 - +Rule Mongol 2002 2006 - Mar lastSat 2:00 1:00 S +Rule Mongol 2015 max - Mar lastSat 2:00 1:00 S +Rule Mongol 2015 max - Sep lastSat 0:00 0 - + +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Hovd, a.k.a. Chovd, Dund-Us, Dzhargalant, Khovd, Jirgalanta +Zone Asia/Hovd 6:06:36 - LMT 1905 Aug + 6:00 - HOVT 1978 # Hovd Time + 7:00 Mongol HOV%sT +# Ulaanbaatar, a.k.a. Ulan Bataar, Ulan Bator, Urga +Zone Asia/Ulaanbaatar 7:07:32 - LMT 1905 Aug + 7:00 - ULAT 1978 # Ulaanbaatar Time + 8:00 Mongol ULA%sT +# Choibalsan, a.k.a. Bajan Tümen, Bajan Tumen, Chojbalsan, +# Choybalsan, Sanbejse, Tchoibalsan +Zone Asia/Choibalsan 7:38:00 - LMT 1905 Aug + 7:00 - ULAT 1978 + 8:00 - ULAT 1983 Apr + 9:00 Mongol CHO%sT 2008 Mar 31 # Choibalsan Time + 8:00 Mongol CHO%sT + +# Nepal +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Asia/Kathmandu 5:41:16 - LMT 1920 + 5:30 - IST 1986 + 5:45 - NPT # Nepal Time + +# Oman +# See Asia/Dubai. + +# Pakistan + +# From Rives McDow (2002-03-13): +# I have been advised that Pakistan has decided to adopt dst on a +# TRIAL basis for one year, starting 00:01 local time on April 7, 2002 +# and ending at 00:01 local time October 6, 2002. This is what I was +# told, but I believe that the actual time of change may be 00:00; the +# 00:01 was to make it clear which day it was on. + +# From Paul Eggert (2002-03-15): +# Jesper Nørgaard found this URL: +# http://www.pak.gov.pk/public/news/app/app06_dec.htm +# (dated 2001-12-06) which says that the Cabinet adopted a scheme "to +# advance the clocks by one hour on the night between the first +# Saturday and Sunday of April and revert to the original position on +# 15th October each year". This agrees with McDow's 04-07 at 00:00, +# but disagrees about the October transition, and makes it sound like +# it's not on a trial basis. Also, the "between the first Saturday +# and Sunday of April" phrase, if taken literally, means that the +# transition takes place at 00:00 on the first Sunday on or after 04-02. + +# From Paul Eggert (2003-02-09): +# DAWN <http://www.dawn.com/2002/10/06/top13.htm> reported on 2002-10-05 +# that 2002 DST ended that day at midnight. Go with McDow for now. + +# From Steffen Thorsen (2003-03-14): +# According to http://www.dawn.com/2003/03/07/top15.htm +# there will be no DST in Pakistan this year: +# +# ISLAMABAD, March 6: Information and Media Development Minister Sheikh +# Rashid Ahmed on Thursday said the cabinet had reversed a previous +# decision to advance clocks by one hour in summer and put them back by +# one hour in winter with the aim of saving light hours and energy. +# +# The minister told a news conference that the experiment had rather +# shown 8 per cent higher consumption of electricity. + +# From Alex Krivenyshev (2008-05-15): +# +# Here is an article that Pakistan plan to introduce Daylight Saving Time +# on June 1, 2008 for 3 months. +# +# "... The federal cabinet on Wednesday announced a new conservation plan to +# help reduce load shedding by approving the closure of commercial centres at +# 9pm and moving clocks forward by one hour for the next three months. ...." +# +# http://www.worldtimezone.net/dst_news/dst_news_pakistan01.html +# http://www.dailytimes.com.pk/default.asp?page=2008%5C05%5C15%5Cstory_15-5-2008_pg1_4 + +# From Arthur David Olson (2008-05-19): +# XXX--midnight transitions is a guess; 2008 only is a guess. + +# From Alexander Krivenyshev (2008-08-28): +# Pakistan government has decided to keep the watches one-hour advanced +# for another 2 months - plan to return to Standard Time on October 31 +# instead of August 31. +# +# http://www.worldtimezone.com/dst_news/dst_news_pakistan02.html +# http://dailymailnews.com/200808/28/news/dmbrn03.html + +# From Alexander Krivenyshev (2009-04-08): +# Based on previous media reports that "... proposed plan to +# advance clocks by one hour from May 1 will cause disturbance +# to the working schedules rather than bringing discipline in +# official working." +# http://www.thenews.com.pk/daily_detail.asp?id=171280 +# +# recent news that instead of May 2009 - Pakistan plan to +# introduce DST from April 15, 2009 +# +# FYI: Associated Press Of Pakistan +# April 08, 2009 +# Cabinet okays proposal to advance clocks by one hour from April 15 +# http://www.app.com.pk/en_/index.php?option=com_content&task=view&id=73043&Itemid=1 +# http://www.worldtimezone.com/dst_news/dst_news_pakistan05.html +# +# .... +# The Federal Cabinet on Wednesday approved the proposal to +# advance clocks in the country by one hour from April 15 to +# conserve energy" + +# From Steffen Thorsen (2009-09-17): +# "The News International," Pakistan reports that: "The Federal +# Government has decided to restore the previous time by moving the +# clocks backward by one hour from October 1. A formal announcement to +# this effect will be made after the Prime Minister grants approval in +# this regard." +# http://www.thenews.com.pk/updates.asp?id=87168 + +# From Alexander Krivenyshev (2009-09-28): +# According to Associated Press Of Pakistan, it is confirmed that +# Pakistan clocks across the country would be turned back by an hour from +# October 1, 2009. +# +# "Clocks to go back one hour from 1 Oct" +# http://www.app.com.pk/en_/index.php?option=com_content&task=view&id=86715&Itemid=2 +# http://www.worldtimezone.com/dst_news/dst_news_pakistan07.htm +# +# From Steffen Thorsen (2009-09-29): +# Now they seem to have changed their mind, November 1 is the new date: +# http://www.thenews.com.pk/top_story_detail.asp?Id=24742 +# "The country's clocks will be reversed by one hour on November 1. +# Officials of Federal Ministry for Interior told this to Geo News on +# Monday." +# +# And more importantly, it seems that these dates will be kept every year: +# "It has now been decided that clocks will be wound forward by one hour +# on April 15 and reversed by an hour on November 1 every year without +# obtaining prior approval, the officials added." +# +# We have confirmed this year's end date with both with the Ministry of +# Water and Power and the Pakistan Electric Power Company: +# http://www.timeanddate.com/news/time/pakistan-ends-dst09.html + +# From Christoph Göhre (2009-10-01): +# [T]he German Consulate General in Karachi reported me today that Pakistan +# will go back to standard time on 1st of November. + +# From Steffen Thorsen (2010-03-26): +# Steffen Thorsen wrote: +# > On Thursday (2010-03-25) it was announced that DST would start in +# > Pakistan on 2010-04-01. +# > +# > Then today, the president said that they might have to revert the +# > decision if it is not supported by the parliament. So at the time +# > being, it seems unclear if DST will be actually observed or not - but +# > April 1 could be a more likely date than April 15. +# Now, it seems that the decision to not observe DST in final: +# +# "Govt Withdraws Plan To Advance Clocks" +# http://www.apakistannews.com/govt-withdraws-plan-to-advance-clocks-172041 +# +# "People laud PM's announcement to end DST" +# http://www.app.com.pk/en_/index.php?option=com_content&task=view&id=99374&Itemid=2 + +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Pakistan 2002 only - Apr Sun>=2 0:00 1:00 S +Rule Pakistan 2002 only - Oct Sun>=2 0:00 0 - +Rule Pakistan 2008 only - Jun 1 0:00 1:00 S +Rule Pakistan 2008 2009 - Nov 1 0:00 0 - +Rule Pakistan 2009 only - Apr 15 0:00 1:00 S + +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Asia/Karachi 4:28:12 - LMT 1907 + 5:30 - IST 1942 Sep + 5:30 1:00 IST 1945 Oct 15 + 5:30 - IST 1951 Sep 30 + 5:00 - KART 1971 Mar 26 # Karachi Time + 5:00 Pakistan PK%sT # Pakistan Time + +# Palestine + +# From Amos Shapir (1998-02-15): +# +# From 1917 until 1948-05-15, all of Palestine, including the parts now +# known as the Gaza Strip and the West Bank, was under British rule. +# Therefore the rules given for Israel for that period, apply there too... +# +# The Gaza Strip was under Egyptian rule between 1948-05-15 until 1967-06-05 +# (except a short occupation by Israel from 1956-11 till 1957-03, but no +# time zone was affected then). It was never formally annexed to Egypt, +# though. +# +# The rest of Palestine was under Jordanian rule at that time, formally +# annexed in 1950 as the West Bank (and the word "Trans" was dropped from +# the country's previous name of "the Hashemite Kingdom of the +# Trans-Jordan"). So the rules for Jordan for that time apply. Major +# towns in that area are Nablus (Shchem), El-Halil (Hebron), Ramallah, and +# East Jerusalem. +# +# Both areas were occupied by Israel in June 1967, but not annexed (except +# for East Jerusalem). They were on Israel time since then; there might +# have been a Military Governor's order about time zones, but I'm not aware +# of any (such orders may have been issued semi-annually whenever summer +# time was in effect, but maybe the legal aspect of time was just neglected). +# +# The Palestinian Authority was established in 1993, and got hold of most +# towns in the West Bank and Gaza by 1995. I know that in order to +# demonstrate...independence, they have been switching to +# summer time and back on a different schedule than Israel's, but I don't +# know when this was started, or what algorithm is used (most likely the +# Jordanian one). +# +# To summarize, the table should probably look something like that: +# +# Area \ when | 1918-1947 | 1948-1967 | 1967-1995 | 1996- +# ------------+-----------+-----------+-----------+----------- +# Israel | Zion | Zion | Zion | Zion +# West bank | Zion | Jordan | Zion | Jordan +# Gaza | Zion | Egypt | Zion | Jordan +# +# I guess more info may be available from the PA's web page (if/when they +# have one). + +# From Paul Eggert (2006-03-22): +# Shanks & Pottenger write that Gaza did not observe DST until 1957, but go +# with Shapir and assume that it observed DST from 1940 through 1947, +# and that it used Jordanian rules starting in 1996. +# We don't yet need a separate entry for the West Bank, since +# the only differences between it and Gaza that we know about +# occurred before our cutoff date of 1970. +# However, as we get more information, we may need to add entries +# for parts of the West Bank as they transitioned from Israel's rules +# to Palestine's rules. + +# From IINS News Service - Israel - 1998-03-23 10:38:07 Israel time, +# forwarded by Ephraim Silverberg: +# +# Despite the fact that Israel changed over to daylight savings time +# last week, the PLO Authority (PA) has decided not to turn its clocks +# one-hour forward at this time. As a sign of independence from Israeli rule, +# the PA has decided to implement DST in April. + +# From Paul Eggert (1999-09-20): +# Daoud Kuttab writes in Holiday havoc +# http://www.jpost.com/com/Archive/22.Apr.1999/Opinion/Article-2.html +# (Jerusalem Post, 1999-04-22) that +# the Palestinian National Authority changed to DST on 1999-04-15. +# I vaguely recall that they switch back in October (sorry, forgot the source). +# For now, let's assume that the spring switch was at 24:00, +# and that they switch at 0:00 on the 3rd Fridays of April and October. + +# From Paul Eggert (2005-11-22): +# Starting 2004 transitions are from Steffen Thorsen's web site timeanddate.com. + +# From Steffen Thorsen (2005-11-23): +# A user from Gaza reported that Gaza made the change early because of +# the Ramadan. Next year Ramadan will be even earlier, so I think +# there is a good chance next year's end date will be around two weeks +# earlier - the same goes for Jordan. + +# From Steffen Thorsen (2006-08-17): +# I was informed by a user in Bethlehem that in Bethlehem it started the +# same day as Israel, and after checking with other users in the area, I +# was informed that they started DST one day after Israel. I was not +# able to find any authoritative sources at the time, nor details if +# Gaza changed as well, but presumed Gaza to follow the same rules as +# the West Bank. + +# From Steffen Thorsen (2006-09-26): +# according to the Palestine News Network (2006-09-19): +# http://english.pnn.ps/index.php?option=com_content&task=view&id=596&Itemid=5 +# > The Council of Ministers announced that this year its winter schedule +# > will begin early, as of midnight Thursday. It is also time to turn +# > back the clocks for winter. Friday will begin an hour late this week. +# I guess it is likely that next year's date will be moved as well, +# because of the Ramadan. + +# From Jesper Nørgaard Welen (2007-09-18): +# According to Steffen Thorsen's web site the Gaza Strip and the rest of the +# Palestinian territories left DST early on 13.th. of September at 2:00. + +# From Paul Eggert (2007-09-20): +# My understanding is that Gaza and the West Bank disagree even over when +# the weekend is (Thursday+Friday versus Friday+Saturday), so I'd be a bit +# surprised if they agreed about DST. But for now, assume they agree. +# For lack of better information, predict that future changes will be +# the 2nd Thursday of September at 02:00. + +# From Alexander Krivenyshev (2008-08-28): +# Here is an article, that Mideast running on different clocks at Ramadan. +# +# Gaza Strip (as Egypt) ended DST at midnight Thursday (Aug 28, 2008), while +# the West Bank will end Daylight Saving Time at midnight Sunday (Aug 31, 2008). +# +# http://www.guardian.co.uk/world/feedarticle/7759001 +# http://www.abcnews.go.com/International/wireStory?id=5676087 +# http://www.worldtimezone.com/dst_news/dst_news_gazastrip01.html + +# From Alexander Krivenyshev (2009-03-26): +# According to the Palestine News Network (arabic.pnn.ps), Palestinian +# government decided to start Daylight Time on Thursday night March +# 26 and continue until the night of 27 September 2009. +# +# (in Arabic) +# http://arabic.pnn.ps/index.php?option=com_content&task=view&id=50850 +# +# (English translation) +# http://www.worldtimezone.com/dst_news/dst_news_westbank01.html + +# From Steffen Thorsen (2009-08-31): +# Palestine's Council of Ministers announced that they will revert back to +# winter time on Friday, 2009-09-04. +# +# One news source: +# http://www.safa.ps/ara/?action=showdetail&seid=4158 +# (Palestinian press agency, Arabic), +# Google translate: "Decided that the Palestinian government in Ramallah +# headed by Salam Fayyad, the start of work in time for the winter of +# 2009, starting on Friday approved the fourth delay Sept. clock sixty +# minutes per hour as of Friday morning." +# +# We are not sure if Gaza will do the same, last year they had a different +# end date, we will keep this page updated: +# http://www.timeanddate.com/news/time/westbank-gaza-dst-2009.html + +# From Alexander Krivenyshev (2009-09-02): +# Seems that Gaza Strip will go back to Winter Time same date as West Bank. +# +# According to Palestinian Ministry Of Interior, West Bank and Gaza Strip plan +# to change time back to Standard time on September 4, 2009. +# +# "Winter time unite the West Bank and Gaza" +# (from Palestinian National Authority): +# http://www.moi.gov.ps/en/?page=633167343250594025&nid=11505 +# http://www.worldtimezone.com/dst_news/dst_news_gazastrip02.html + +# From Alexander Krivenyshev (2010-03-19): +# According to Voice of Palestine DST will last for 191 days, from March +# 26, 2010 till "the last Sunday before the tenth day of Tishri +# (October), each year" (October 03, 2010?) +# +# http://palvoice.org/forums/showthread.php?t=245697 +# (in Arabic) +# http://www.worldtimezone.com/dst_news/dst_news_westbank03.html + +# From Steffen Thorsen (2010-03-24): +# ...Ma'an News Agency reports that Hamas cabinet has decided it will +# start one day later, at 12:01am. Not sure if they really mean 12:01am or +# noon though: +# +# http://www.maannews.net/eng/ViewDetails.aspx?ID=271178 +# (Ma'an News Agency) +# "At 12:01am Friday, clocks in Israel and the West Bank will change to +# 1:01am, while Gaza clocks will change at 12:01am Saturday morning." + +# From Steffen Thorsen (2010-08-11): +# According to several sources, including +# http://www.maannews.net/eng/ViewDetails.aspx?ID=306795 +# the clocks were set back one hour at 2010-08-11 00:00:00 local time in +# Gaza and the West Bank. +# Some more background info: +# http://www.timeanddate.com/news/time/westbank-gaza-end-dst-2010.html + +# From Steffen Thorsen (2011-08-26): +# Gaza and the West Bank did go back to standard time in the beginning of +# August, and will now enter daylight saving time again on 2011-08-30 +# 00:00 (so two periods of DST in 2011). The pause was because of +# Ramadan. +# +# http://www.maannews.net/eng/ViewDetails.aspx?ID=416217 +# Additional info: +# http://www.timeanddate.com/news/time/palestine-dst-2011.html + +# From Alexander Krivenyshev (2011-08-27): +# According to the article in The Jerusalem Post: +# "...Earlier this month, the Palestinian government in the West Bank decided to +# move to standard time for 30 days, during Ramadan. The Palestinians in the +# Gaza Strip accepted the change and also moved their clocks one hour back. +# The Hamas government said on Saturday that it won't observe summertime after +# the Muslim feast of Id al-Fitr, which begins on Tuesday..." +# ... +# http://www.jpost.com/MiddleEast/Article.aspx?id=235650 +# http://www.worldtimezone.com/dst_news/dst_news_gazastrip05.html +# The rules for Egypt are stolen from the 'africa' file. + +# From Steffen Thorsen (2011-09-30): +# West Bank did end Daylight Saving Time this morning/midnight (2011-09-30 +# 00:00). +# So West Bank and Gaza now have the same time again. +# +# Many sources, including: +# http://www.maannews.net/eng/ViewDetails.aspx?ID=424808 + +# From Steffen Thorsen (2012-03-26): +# Palestinian news sources tell that both Gaza and West Bank will start DST +# on Friday (Thursday midnight, 2012-03-29 24:00). +# Some of many sources in Arabic: +# http://www.samanews.com/index.php?act=Show&id=122638 +# +# http://safa.ps/details/news/74352/%D8%A8%D8%AF%D8%A1-%D8%A7%D9%84%D8%AA%D9%88%D9%82%D9%8A%D8%AA-%D8%A7%D9%84%D8%B5%D9%8A%D9%81%D9%8A-%D8%A8%D8%A7%D9%84%D8%B6%D9%81%D8%A9-%D9%88%D8%BA%D8%B2%D8%A9-%D9%84%D9%8A%D9%84%D8%A9-%D8%A7%D9%84%D8%AC%D9%85%D8%B9%D8%A9.html +# +# Our brief summary: +# http://www.timeanddate.com/news/time/gaza-west-bank-dst-2012.html + +# From Steffen Thorsen (2013-03-26): +# The following news sources tells that Palestine will "start daylight saving +# time from midnight on Friday, March 29, 2013" (translated). +# [These are in Arabic and are for Gaza and for Ramallah, respectively.] +# http://www.samanews.com/index.php?act=Show&id=154120 +# http://safa.ps/details/news/99844/%D8%B1%D8%A7%D9%85-%D8%A7%D9%84%D9%84%D9%87-%D8%A8%D8%AF%D8%A1-%D8%A7%D9%84%D8%AA%D9%88%D9%82%D9%8A%D8%AA-%D8%A7%D9%84%D8%B5%D9%8A%D9%81%D9%8A-29-%D8%A7%D9%84%D8%AC%D8%A7%D8%B1%D9%8A.html + +# From Steffen Thorsen (2013-09-24): +# The Gaza and West Bank are ending DST Thursday at midnight +# (2013-09-27 00:00:00) (one hour earlier than last year...). +# This source in English, says "that winter time will go into effect +# at midnight on Thursday in the West Bank and Gaza Strip": +# http://english.wafa.ps/index.php?action=detail&id=23246 +# official source...: +# http://www.palestinecabinet.gov.ps/ar/Views/ViewDetails.aspx?pid=1252 + +# From Steffen Thorsen (2015-03-03): +# Sources such as http://www.alquds.com/news/article/view/id/548257 +# and http://www.raya.ps/ar/news/890705.html say Palestine areas will +# start DST on 2015-03-28 00:00 which is one day later than expected. +# +# From Paul Eggert (2015-03-03): +# http://www.timeanddate.com/time/change/west-bank/ramallah?year=2014 +# says that the fall 2014 transition was Oct 23 at 24:00. +# For future dates, guess the last Friday in March at 24:00 through +# the first Friday on or after October 21 at 00:00. This is consistent with +# the predictions in today's editions of the following URLs: +# http://www.timeanddate.com/time/change/gaza-strip/gaza +# http://www.timeanddate.com/time/change/west-bank/hebron + +# From Hannah Kreitem (2016-03-09): +# http://www.palestinecabinet.gov.ps/WebSite/ar/ViewDetails?ID=31728 +# [Google translation]: "The Council also decided to start daylight +# saving in Palestine as of one o'clock on Saturday morning, +# 2016-03-26, to provide the clock 60 minutes ahead." +# +# From Paul Eggert (2016-03-12): +# Predict spring transitions on March's last Saturday at 01:00 from now on. +# Leave fall predictions alone for now. + +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule EgyptAsia 1957 only - May 10 0:00 1:00 S +Rule EgyptAsia 1957 1958 - Oct 1 0:00 0 - +Rule EgyptAsia 1958 only - May 1 0:00 1:00 S +Rule EgyptAsia 1959 1967 - May 1 1:00 1:00 S +Rule EgyptAsia 1959 1965 - Sep 30 3:00 0 - +Rule EgyptAsia 1966 only - Oct 1 3:00 0 - + +Rule Palestine 1999 2005 - Apr Fri>=15 0:00 1:00 S +Rule Palestine 1999 2003 - Oct Fri>=15 0:00 0 - +Rule Palestine 2004 only - Oct 1 1:00 0 - +Rule Palestine 2005 only - Oct 4 2:00 0 - +Rule Palestine 2006 2007 - Apr 1 0:00 1:00 S +Rule Palestine 2006 only - Sep 22 0:00 0 - +Rule Palestine 2007 only - Sep Thu>=8 2:00 0 - +Rule Palestine 2008 2009 - Mar lastFri 0:00 1:00 S +Rule Palestine 2008 only - Sep 1 0:00 0 - +Rule Palestine 2009 only - Sep Fri>=1 1:00 0 - +Rule Palestine 2010 only - Mar 26 0:00 1:00 S +Rule Palestine 2010 only - Aug 11 0:00 0 - +Rule Palestine 2011 only - Apr 1 0:01 1:00 S +Rule Palestine 2011 only - Aug 1 0:00 0 - +Rule Palestine 2011 only - Aug 30 0:00 1:00 S +Rule Palestine 2011 only - Sep 30 0:00 0 - +Rule Palestine 2012 2014 - Mar lastThu 24:00 1:00 S +Rule Palestine 2012 only - Sep 21 1:00 0 - +Rule Palestine 2013 only - Sep Fri>=21 0:00 0 - +Rule Palestine 2014 max - Oct Fri>=21 0:00 0 - +Rule Palestine 2015 only - Mar lastFri 24:00 1:00 S +Rule Palestine 2016 max - Mar lastSat 1:00 1:00 S + +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Asia/Gaza 2:17:52 - LMT 1900 Oct + 2:00 Zion EET 1948 May 15 + 2:00 EgyptAsia EE%sT 1967 Jun 5 + 2:00 Zion I%sT 1996 + 2:00 Jordan EE%sT 1999 + 2:00 Palestine EE%sT 2008 Aug 29 0:00 + 2:00 - EET 2008 Sep + 2:00 Palestine EE%sT 2010 + 2:00 - EET 2010 Mar 27 0:01 + 2:00 Palestine EE%sT 2011 Aug 1 + 2:00 - EET 2012 + 2:00 Palestine EE%sT + +Zone Asia/Hebron 2:20:23 - LMT 1900 Oct + 2:00 Zion EET 1948 May 15 + 2:00 EgyptAsia EE%sT 1967 Jun 5 + 2:00 Zion I%sT 1996 + 2:00 Jordan EE%sT 1999 + 2:00 Palestine EE%sT + +# Paracel Is +# no information + +# Philippines +# On 1844-08-16, Narciso Clavería, governor-general of the +# Philippines, issued a proclamation announcing that 1844-12-30 was to +# be immediately followed by 1845-01-01; see R.H. van Gent's +# History of the International Date Line +# http://www.staff.science.uu.nl/~gent0113/idl/idl_philippines.htm +# The rest of the data entries are from Shanks & Pottenger. + +# From Jesper Nørgaard Welen (2006-04-26): +# ... claims that Philippines had DST last time in 1990: +# http://story.philippinetimes.com/p.x/ct/9/id/145be20cc6b121c0/cid/3e5bbccc730d258c/ +# [a story dated 2006-04-25 by Cris Larano of Dow Jones Newswires, +# but no details] + +# From Paul Eggert (2014-08-14): +# The following source says DST may be instituted November-January and again +# March-June, but this is not definite. It also says DST was last proclaimed +# during the Ramos administration (1992-1998); but again, no details. +# Carcamo D. PNoy urged to declare use of daylight saving time. +# Philippine Star 2014-08-05 +# http://www.philstar.com/headlines/2014/08/05/1354152/pnoy-urged-declare-use-daylight-saving-time + +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Phil 1936 only - Nov 1 0:00 1:00 S +Rule Phil 1937 only - Feb 1 0:00 0 - +Rule Phil 1954 only - Apr 12 0:00 1:00 S +Rule Phil 1954 only - Jul 1 0:00 0 - +Rule Phil 1978 only - Mar 22 0:00 1:00 S +Rule Phil 1978 only - Sep 21 0:00 0 - +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Asia/Manila -15:56:00 - LMT 1844 Dec 31 + 8:04:00 - LMT 1899 May 11 + 8:00 Phil PH%sT 1942 May + 9:00 - JST 1944 Nov + 8:00 Phil PH%sT + +# Qatar +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Asia/Qatar 3:26:08 - LMT 1920 # Al Dawhah / Doha + 4:00 - GST 1972 Jun + 3:00 - AST +Link Asia/Qatar Asia/Bahrain + +# Saudi Arabia +# +# From Paul Eggert (2014-07-15): +# Time in Saudi Arabia and other countries in the Arabian peninsula was not +# standardized until relatively recently; we don't know when, and possibly it +# has never been made official. Richard P Hunt, in "Islam city yielding to +# modern times", New York Times (1961-04-09), p 20, wrote that only airlines +# observed standard time, and that people in Jeddah mostly observed quasi-solar +# time, doing so by setting their watches at sunrise to 6 o'clock (or to 12 +# o'clock for "Arab" time). +# +# The TZ database cannot represent quasi-solar time; airline time is the best +# we can do. The 1946 foreign air news digest of the U.S. Civil Aeronautics +# Board (OCLC 42299995) reported that the "... Arabian Government, inaugurated +# a weekly Dhahran-Cairo service, via the Saudi Arabian cities of Riyadh and +# Jidda, on March 14, 1947". Shanks & Pottenger guessed 1950; go with the +# earlier date. +# +# Shanks & Pottenger also state that until 1968-05-01 Saudi Arabia had two +# time zones; the other zone, at UTC+4, was in the far eastern part of +# the country. Ignore this, as it's before our 1970 cutoff. +# +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Asia/Riyadh 3:06:52 - LMT 1947 Mar 14 + 3:00 - AST +Link Asia/Riyadh Asia/Aden # Yemen +Link Asia/Riyadh Asia/Kuwait + +# Singapore +# taken from Mok Ly Yng (2003-10-30) +# http://www.math.nus.edu.sg/aslaksen/teaching/timezone.html +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Asia/Singapore 6:55:25 - LMT 1901 Jan 1 + 6:55:25 - SMT 1905 Jun 1 # Singapore M.T. + 7:00 - MALT 1933 Jan 1 # Malaya Time + 7:00 0:20 MALST 1936 Jan 1 + 7:20 - MALT 1941 Sep 1 + 7:30 - MALT 1942 Feb 16 + 9:00 - JST 1945 Sep 12 + 7:30 - MALT 1965 Aug 9 # independence + 7:30 - SGT 1982 Jan 1 # Singapore Time + 8:00 - SGT + +# Spratly Is +# no information + +# Sri Lanka + +# From Paul Eggert (2013-02-21): +# Milne says "Madras mean time use from May 1, 1898. Prior to this Colombo +# mean time, 5h. 4m. 21.9s. F., was used." But 5:04:21.9 differs considerably +# from Colombo's meridian 5:19:24, so for now ignore Milne and stick with +# Shanks and Pottenger. + +# From Paul Eggert (1996-09-03): +# "Sri Lanka advances clock by an hour to avoid blackout" +# (<http://www.virtual-pc.com/lankaweb/news/items/240596-2.html>, 1996-05-24, +# no longer available as of 1999-08-17) +# reported "the country's standard time will be put forward by one hour at +# midnight Friday (1830 GMT) 'in the light of the present power crisis'." +# +# From Dharmasiri Senanayake, Sri Lanka Media Minister (1996-10-24), as quoted +# by Shamindra in Daily News - Hot News Section +# <news:54rka5$m5h@mtinsc01-mgt.ops.worldnet.att.net> (1996-10-26): +# With effect from 12.30 a.m. on 26th October 1996 +# Sri Lanka will be six (06) hours ahead of GMT. + +# From Jesper Nørgaard Welen (2006-04-14), quoting Sri Lanka News Online +# <http://news.sinhalaya.com/wmview.php?ArtID=11002> (2006-04-13): +# 0030 hrs on April 15, 2006 (midnight of April 14, 2006 +30 minutes) +# at present, become 2400 hours of April 14, 2006 (midnight of April 14, 2006). + +# From Peter Apps and Ranga Sirila of Reuters (2006-04-12) in: +# http://today.reuters.co.uk/news/newsArticle.aspx?type=scienceNews&storyID=2006-04-12T172228Z_01_COL295762_RTRIDST_0_SCIENCE-SRILANKA-TIME-DC.XML +# [The Tamil Tigers] never accepted the original 1996 time change and simply +# kept their clocks set five and a half hours ahead of Greenwich Mean +# Time (GMT), in line with neighbor India. +# From Paul Eggert (2006-04-18): +# People who live in regions under Tamil control can use [TZ='Asia/Kolkata'], +# as that zone has agreed with the Tamil areas since our cutoff date of 1970. + +# From K Sethu (2006-04-25): +# I think the abbreviation LKT originated from the world of computers at +# the time of or subsequent to the time zone changes by SL Government +# twice in 1996 and probably SL Government or its standardization +# agencies never declared an abbreviation as a national standard. +# +# I recollect before the recent change the government announcements +# mentioning it as simply changing Sri Lanka Standard Time or Sri Lanka +# Time and no mention was made about the abbreviation. +# +# If we look at Sri Lanka Department of Government's "Official News +# Website of Sri Lanka" ... http://www.news.lk/ we can see that they +# use SLT as abbreviation in time stamp at the beginning of each news +# item.... +# +# Within Sri Lanka I think LKT is well known among computer users and +# administrators. In my opinion SLT may not be a good choice because the +# nation's largest telcom / internet operator Sri Lanka Telcom is well +# known by that abbreviation - simply as SLT (there IP domains are +# slt.lk and sltnet.lk). +# +# But if indeed our government has adopted SLT as standard abbreviation +# (that we have not known so far) then it is better that it be used for +# all computers. + +# From Paul Eggert (2006-04-25): +# One possibility is that we wait for a bit for the dust to settle down +# and then see what people actually say in practice. + +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Asia/Colombo 5:19:24 - LMT 1880 + 5:19:32 - MMT 1906 # Moratuwa Mean Time + 5:30 - IST 1942 Jan 5 + 5:30 0:30 IHST 1942 Sep + 5:30 1:00 IST 1945 Oct 16 2:00 + 5:30 - IST 1996 May 25 0:00 + 6:30 - LKT 1996 Oct 26 0:30 + 6:00 - LKT 2006 Apr 15 0:30 + 5:30 - IST + +# Syria +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Syria 1920 1923 - Apr Sun>=15 2:00 1:00 S +Rule Syria 1920 1923 - Oct Sun>=1 2:00 0 - +Rule Syria 1962 only - Apr 29 2:00 1:00 S +Rule Syria 1962 only - Oct 1 2:00 0 - +Rule Syria 1963 1965 - May 1 2:00 1:00 S +Rule Syria 1963 only - Sep 30 2:00 0 - +Rule Syria 1964 only - Oct 1 2:00 0 - +Rule Syria 1965 only - Sep 30 2:00 0 - +Rule Syria 1966 only - Apr 24 2:00 1:00 S +Rule Syria 1966 1976 - Oct 1 2:00 0 - +Rule Syria 1967 1978 - May 1 2:00 1:00 S +Rule Syria 1977 1978 - Sep 1 2:00 0 - +Rule Syria 1983 1984 - Apr 9 2:00 1:00 S +Rule Syria 1983 1984 - Oct 1 2:00 0 - +Rule Syria 1986 only - Feb 16 2:00 1:00 S +Rule Syria 1986 only - Oct 9 2:00 0 - +Rule Syria 1987 only - Mar 1 2:00 1:00 S +Rule Syria 1987 1988 - Oct 31 2:00 0 - +Rule Syria 1988 only - Mar 15 2:00 1:00 S +Rule Syria 1989 only - Mar 31 2:00 1:00 S +Rule Syria 1989 only - Oct 1 2:00 0 - +Rule Syria 1990 only - Apr 1 2:00 1:00 S +Rule Syria 1990 only - Sep 30 2:00 0 - +Rule Syria 1991 only - Apr 1 0:00 1:00 S +Rule Syria 1991 1992 - Oct 1 0:00 0 - +Rule Syria 1992 only - Apr 8 0:00 1:00 S +Rule Syria 1993 only - Mar 26 0:00 1:00 S +Rule Syria 1993 only - Sep 25 0:00 0 - +# IATA SSIM (1998-02) says 1998-04-02; +# (1998-09) says 1999-03-29 and 1999-09-29; (1999-02) says 1999-04-02, +# 2000-04-02, and 2001-04-02; (1999-09) says 2000-03-31 and 2001-03-31; +# (2006) says 2006-03-31 and 2006-09-22; +# for now ignore all these claims and go with Shanks & Pottenger, +# except for the 2006-09-22 claim (which seems right for Ramadan). +Rule Syria 1994 1996 - Apr 1 0:00 1:00 S +Rule Syria 1994 2005 - Oct 1 0:00 0 - +Rule Syria 1997 1998 - Mar lastMon 0:00 1:00 S +Rule Syria 1999 2006 - Apr 1 0:00 1:00 S +# From Stephen Colebourne (2006-09-18): +# According to IATA data, Syria will change DST on 21st September [21:00 UTC] +# this year [only].... This is probably related to Ramadan, like Egypt. +Rule Syria 2006 only - Sep 22 0:00 0 - +# From Paul Eggert (2007-03-29): +# Today the AP reported "Syria will switch to summertime at midnight Thursday." +# http://www.iht.com/articles/ap/2007/03/29/africa/ME-GEN-Syria-Time-Change.php +Rule Syria 2007 only - Mar lastFri 0:00 1:00 S +# From Jesper Nørgaard (2007-10-27): +# The sister center ICARDA of my work CIMMYT is confirming that Syria DST will +# not take place 1st November at 0:00 o'clock but 1st November at 24:00 or +# rather Midnight between Thursday and Friday. This does make more sense than +# having it between Wednesday and Thursday (two workdays in Syria) since the +# weekend in Syria is not Saturday and Sunday, but Friday and Saturday. So now +# it is implemented at midnight of the last workday before weekend... +# +# From Steffen Thorsen (2007-10-27): +# Jesper Nørgaard Welen wrote: +# +# > "Winter local time in Syria will be observed at midnight of Thursday 1 +# > November 2007, and the clock will be put back 1 hour." +# +# I found confirmation on this in this gov.sy-article (Arabic): +# http://wehda.alwehda.gov.sy/_print_veiw.asp?FileName=12521710520070926111247 +# +# which using Google's translate tools says: +# Council of Ministers also approved the commencement of work on +# identifying the winter time as of Friday, 2/11/2007 where the 60th +# minute delay at midnight Thursday 1/11/2007. +Rule Syria 2007 only - Nov Fri>=1 0:00 0 - + +# From Stephen Colebourne (2008-03-17): +# For everyone's info, I saw an IATA time zone change for [Syria] for +# this month (March 2008) in the last day or so.... +# Country Time Standard --- DST Start --- --- DST End --- DST +# Name Zone Variation Time Date Time Date +# Variation +# Syrian Arab +# Republic SY +0200 2200 03APR08 2100 30SEP08 +0300 +# 2200 02APR09 2100 30SEP09 +0300 +# 2200 01APR10 2100 30SEP10 +0300 + +# From Arthur David Olson (2008-03-17): +# Here's a link to English-language coverage by the Syrian Arab News +# Agency (SANA)... +# http://www.sana.sy/eng/21/2008/03/11/165173.htm +# ...which reads (in part) "The Cabinet approved the suggestion of the +# Ministry of Electricity to begin daylight savings time on Friday April +# 4th, advancing clocks one hour ahead on midnight of Thursday April 3rd." +# Since Syria is two hours east of UTC, the 2200 and 2100 transition times +# shown above match up with midnight in Syria. + +# From Arthur David Olson (2008-03-18): +# My best guess at a Syrian rule is "the Friday nearest April 1"; +# coding that involves either using a "Mar Fri>=29" construct that old time zone +# compilers can't handle or having multiple Rules (a la Israel). +# For now, use "Apr Fri>=1", and go with IATA on a uniform Sep 30 end. + +# From Steffen Thorsen (2008-10-07): +# Syria has now officially decided to end DST on 2008-11-01 this year, +# according to the following article in the Syrian Arab News Agency (SANA). +# +# The article is in Arabic, and seems to tell that they will go back to +# winter time on 2008-11-01 at 00:00 local daylight time (delaying/setting +# clocks back 60 minutes). +# +# http://sana.sy/ara/2/2008/10/07/195459.htm + +# From Steffen Thorsen (2009-03-19): +# Syria will start DST on 2009-03-27 00:00 this year according to many sources, +# two examples: +# +# http://www.sana.sy/eng/21/2009/03/17/217563.htm +# (English, Syrian Arab News # Agency) +# http://thawra.alwehda.gov.sy/_View_news2.asp?FileName=94459258720090318012209 +# (Arabic, gov-site) +# +# We have not found any sources saying anything about when DST ends this year. +# +# Our summary +# http://www.timeanddate.com/news/time/syria-dst-starts-march-27-2009.html + +# From Steffen Thorsen (2009-10-27): +# The Syrian Arab News Network on 2009-09-29 reported that Syria will +# revert back to winter (standard) time on midnight between Thursday +# 2009-10-29 and Friday 2009-10-30: +# http://www.sana.sy/ara/2/2009/09/29/247012.htm (Arabic) + +# From Arthur David Olson (2009-10-28): +# We'll see if future DST switching times turn out to be end of the last +# Thursday of the month or the start of the last Friday of the month or +# something else. For now, use the start of the last Friday. + +# From Steffen Thorsen (2010-03-17): +# The "Syrian News Station" reported on 2010-03-16 that the Council of +# Ministers has decided that Syria will start DST on midnight Thursday +# 2010-04-01: (midnight between Thursday and Friday): +# http://sns.sy/sns/?path=news/read/11421 (Arabic) + +# From Steffen Thorsen (2012-03-26): +# Today, Syria's government announced that they will start DST early on Friday +# (00:00). This is a bit earlier than the past two years. +# +# From Syrian Arab News Agency, in Arabic: +# http://www.sana.sy/ara/2/2012/03/26/408215.htm +# +# Our brief summary: +# http://www.timeanddate.com/news/time/syria-dst-2012.html + +# From Arthur David Olson (2012-03-27): +# Assume last Friday in March going forward XXX. + +Rule Syria 2008 only - Apr Fri>=1 0:00 1:00 S +Rule Syria 2008 only - Nov 1 0:00 0 - +Rule Syria 2009 only - Mar lastFri 0:00 1:00 S +Rule Syria 2010 2011 - Apr Fri>=1 0:00 1:00 S +Rule Syria 2012 max - Mar lastFri 0:00 1:00 S +Rule Syria 2009 max - Oct lastFri 0:00 0 - + +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Asia/Damascus 2:25:12 - LMT 1920 # Dimashq + 2:00 Syria EE%sT + +# Tajikistan +# From Shanks & Pottenger. +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Asia/Dushanbe 4:35:12 - LMT 1924 May 2 + 5:00 - DUST 1930 Jun 21 # Dushanbe Time + 6:00 RussiaAsia DUS%sT 1991 Mar 31 2:00s + 5:00 1:00 DUSST 1991 Sep 9 2:00s + 5:00 - TJT # Tajikistan Time + +# Thailand +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Asia/Bangkok 6:42:04 - LMT 1880 + 6:42:04 - BMT 1920 Apr # Bangkok Mean Time + 7:00 - ICT +Link Asia/Bangkok Asia/Phnom_Penh # Cambodia +Link Asia/Bangkok Asia/Vientiane # Laos + +# Turkmenistan +# From Shanks & Pottenger. +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Asia/Ashgabat 3:53:32 - LMT 1924 May 2 # or Ashkhabad + 4:00 - ASHT 1930 Jun 21 # Ashkhabad Time + 5:00 RussiaAsia ASH%sT 1991 Mar 31 2:00 + 4:00 RussiaAsia ASH%sT 1991 Oct 27 # independence + 4:00 RussiaAsia TM%sT 1992 Jan 19 2:00 + 5:00 - TMT + +# United Arab Emirates +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Asia/Dubai 3:41:12 - LMT 1920 + 4:00 - GST +Link Asia/Dubai Asia/Muscat # Oman + +# Uzbekistan +# Byalokoz 1919 says Uzbekistan was 4:27:53. +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Asia/Samarkand 4:27:53 - LMT 1924 May 2 + 4:00 - SAMT 1930 Jun 21 # Samarkand Time + 5:00 - SAMT 1981 Apr 1 + 5:00 1:00 SAMST 1981 Oct 1 + 6:00 - TAST 1982 Apr 1 # Tashkent Time + 5:00 RussiaAsia SAM%sT 1991 Sep 1 # independence + 5:00 RussiaAsia UZ%sT 1992 + 5:00 - UZT +# Milne says Tashkent was 4:37:10.8; round to nearest. +Zone Asia/Tashkent 4:37:11 - LMT 1924 May 2 + 5:00 - TAST 1930 Jun 21 # Tashkent Time + 6:00 RussiaAsia TAS%sT 1991 Mar 31 2:00 + 5:00 RussiaAsia TAS%sT 1991 Sep 1 # independence + 5:00 RussiaAsia UZ%sT 1992 + 5:00 - UZT + +# Vietnam + +# From Paul Eggert (2014-10-04): +# Milne gives 7:16:56 for the meridian of Saigon in 1899, as being +# used in Lower Laos, Cambodia, and Annam. But this is quite a ways +# from Saigon's location. For now, ignore this and stick with Shanks +# and Pottenger for LMT before 1906. + +# From Arthur David Olson (2008-03-18): +# The English-language name of Vietnam's most populous city is "Ho Chi Minh +# City"; use Ho_Chi_Minh below to avoid a name of more than 14 characters. + +# From Paul Eggert (2014-10-21) after a heads-up from Trần Ngọc Quân: +# Trần Tiến Bình's authoritative book "Lịch Việt Nam: thế kỷ XX-XXI (1901-2100)" +# (Nhà xuất bản Văn Hoá - Thông Tin, Hanoi, 2005), pp 49-50, +# is quoted verbatim in: +# http://www.thoigian.com.vn/?mPage=P80D01 +# is translated by Brian Inglis in: +# http://mm.icann.org/pipermail/tz/2014-October/021654.html +# and is the basis for the information below. +# +# The 1906 transition was effective July 1 and standardized Indochina to +# Phù Liễn Observatory, legally 104 deg. 17'17" east of Paris. +# It's unclear whether this meant legal Paris Mean Time (00:09:21) or +# the Paris Meridian (2 deg. 20'14.03" E); the former yields 07:06:30.1333... +# and the latter 07:06:29.333... so either way it rounds to 07:06:30, +# which is used below even though the modern-day Phù Liễn Observatory +# is closer to 07:06:31. Abbreviate Phù Liễn Mean Time as PLMT. +# +# The following transitions occurred in Indochina in general (before 1954) +# and in South Vietnam in particular (after 1954): +# To 07:00 on 1911-05-01. +# To 08:00 on 1942-12-31 at 23:00. +# To 09:00 in 1945-03-14 at 23:00. +# To 07:00 on 1945-09-02 in Vietnam. +# To 08:00 on 1947-04-01 in French-controlled Indochina. +# To 07:00 on 1955-07-01 in South Vietnam. +# To 08:00 on 1959-12-31 at 23:00 in South Vietnam. +# To 07:00 on 1975-06-13 in South Vietnam. +# +# Trần cites the following sources; it's unclear which supplied the info above. +# +# Hoàng Xuân Hãn: "Lịch và lịch Việt Nam". Tập san Khoa học Xã hội, +# No. 9, Paris, February 1982. +# +# Lê Thành Lân: "Lịch và niên biểu lịch sử hai mươi thế kỷ (0001-2010)", +# NXB Thống kê, Hanoi, 2000. +# +# Lê Thành Lân: "Lịch hai thế kỷ (1802-2010) và các lịch vĩnh cửu", +# NXB Thuận Hoá, Huế, 1995. + +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Asia/Ho_Chi_Minh 7:06: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 1955 Jul 1 + 7:00 - ICT 1959 Dec 31 23:00 + 8:00 - IDT 1975 Jun 13 + 7:00 - ICT + +# Yemen +# See Asia/Riyadh. diff --git a/tz/australasia b/tz/australasia new file mode 100644 index 0000000..0b33f67 --- /dev/null +++ b/tz/australasia @@ -0,0 +1,1773 @@ +# This file is in the public domain, so clarified as of +# 2009-05-17 by Arthur David Olson. + +# This file also includes Pacific islands. + +# Notes are at the end of this file + +############################################################################### + +# Australia + +# Please see the notes below for the controversy about "EST" versus "AEST" etc. + +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Aus 1917 only - Jan 1 0:01 1:00 D +Rule Aus 1917 only - Mar 25 2:00 0 S +Rule Aus 1942 only - Jan 1 2:00 1:00 D +Rule Aus 1942 only - Mar 29 2:00 0 S +Rule Aus 1942 only - Sep 27 2:00 1:00 D +Rule Aus 1943 1944 - Mar lastSun 2:00 0 S +Rule Aus 1943 only - Oct 3 2:00 1:00 D +# Go with Whitman and the Australian National Standards Commission, which +# says W Australia didn't use DST in 1943/1944. Ignore Whitman's claim that +# 1944/1945 was just like 1943/1944. + +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Northern Territory +Zone Australia/Darwin 8:43:20 - LMT 1895 Feb + 9:00 - ACST 1899 May + 9:30 Aus AC%sT +# Western Australia +# +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule AW 1974 only - Oct lastSun 2:00s 1:00 D +Rule AW 1975 only - Mar Sun>=1 2:00s 0 S +Rule AW 1983 only - Oct lastSun 2:00s 1:00 D +Rule AW 1984 only - Mar Sun>=1 2:00s 0 S +Rule AW 1991 only - Nov 17 2:00s 1:00 D +Rule AW 1992 only - Mar Sun>=1 2:00s 0 S +Rule AW 2006 only - Dec 3 2:00s 1:00 D +Rule AW 2007 2009 - Mar lastSun 2:00s 0 S +Rule AW 2007 2008 - Oct lastSun 2:00s 1:00 D +Zone Australia/Perth 7:43:24 - LMT 1895 Dec + 8:00 Aus AW%sT 1943 Jul + 8:00 AW AW%sT +Zone Australia/Eucla 8:35:28 - LMT 1895 Dec + 8:45 Aus ACW%sT 1943 Jul + 8:45 AW ACW%sT + +# Queensland +# +# From Alex Livingston (1996-11-01): +# I have heard or read more than once that some resort islands off the coast +# of Queensland chose to keep observing daylight-saving time even after +# Queensland ceased to. +# +# From Paul Eggert (1996-11-22): +# IATA SSIM (1993-02/1994-09) say that the Holiday Islands (Hayman, Lindeman, +# Hamilton) observed DST for two years after the rest of Queensland stopped. +# Hamilton is the largest, but there is also a Hamilton in Victoria, +# so use Lindeman. +# +# From J William Piggott (2016-02-20): +# There is no location named Holiday Islands in Queensland Australia; holiday +# islands is a colloquial term used globally. Hayman and Lindeman are at the +# north and south extremes of the Whitsunday Islands archipelago, and +# Hamilton is in between; it is reasonable to believe that this time zone +# applies to all of the Whitsundays. +# http://www.australia.gov.au/about-australia/australian-story/austn-islands +# +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule AQ 1971 only - Oct lastSun 2:00s 1:00 D +Rule AQ 1972 only - Feb lastSun 2:00s 0 S +Rule AQ 1989 1991 - Oct lastSun 2:00s 1:00 D +Rule AQ 1990 1992 - Mar Sun>=1 2:00s 0 S +Rule Holiday 1992 1993 - Oct lastSun 2:00s 1:00 D +Rule Holiday 1993 1994 - Mar Sun>=1 2:00s 0 S +Zone Australia/Brisbane 10:12:08 - LMT 1895 + 10:00 Aus AE%sT 1971 + 10:00 AQ AE%sT +Zone Australia/Lindeman 9:55:56 - LMT 1895 + 10:00 Aus AE%sT 1971 + 10:00 AQ AE%sT 1992 Jul + 10:00 Holiday AE%sT + +# South Australia +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule AS 1971 1985 - Oct lastSun 2:00s 1:00 D +Rule AS 1986 only - Oct 19 2:00s 1:00 D +Rule AS 1987 2007 - Oct lastSun 2:00s 1:00 D +Rule AS 1972 only - Feb 27 2:00s 0 S +Rule AS 1973 1985 - Mar Sun>=1 2:00s 0 S +Rule AS 1986 1990 - Mar Sun>=15 2:00s 0 S +Rule AS 1991 only - Mar 3 2:00s 0 S +Rule AS 1992 only - Mar 22 2:00s 0 S +Rule AS 1993 only - Mar 7 2:00s 0 S +Rule AS 1994 only - Mar 20 2:00s 0 S +Rule AS 1995 2005 - Mar lastSun 2:00s 0 S +Rule AS 2006 only - Apr 2 2:00s 0 S +Rule AS 2007 only - Mar lastSun 2:00s 0 S +Rule AS 2008 max - Apr Sun>=1 2:00s 0 S +Rule AS 2008 max - Oct Sun>=1 2:00s 1:00 D +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Australia/Adelaide 9:14:20 - LMT 1895 Feb + 9:00 - ACST 1899 May + 9:30 Aus AC%sT 1971 + 9:30 AS AC%sT + +# Tasmania +# +# From Paul Eggert (2005-08-16): +# http://www.bom.gov.au/climate/averages/tables/dst_times.shtml +# says King Island didn't observe DST from WWII until late 1971. +# +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule AT 1967 only - Oct Sun>=1 2:00s 1:00 D +Rule AT 1968 only - Mar lastSun 2:00s 0 S +Rule AT 1968 1985 - Oct lastSun 2:00s 1:00 D +Rule AT 1969 1971 - Mar Sun>=8 2:00s 0 S +Rule AT 1972 only - Feb lastSun 2:00s 0 S +Rule AT 1973 1981 - Mar Sun>=1 2:00s 0 S +Rule AT 1982 1983 - Mar lastSun 2:00s 0 S +Rule AT 1984 1986 - Mar Sun>=1 2:00s 0 S +Rule AT 1986 only - Oct Sun>=15 2:00s 1:00 D +Rule AT 1987 1990 - Mar Sun>=15 2:00s 0 S +Rule AT 1987 only - Oct Sun>=22 2:00s 1:00 D +Rule AT 1988 1990 - Oct lastSun 2:00s 1:00 D +Rule AT 1991 1999 - Oct Sun>=1 2:00s 1:00 D +Rule AT 1991 2005 - Mar lastSun 2:00s 0 S +Rule AT 2000 only - Aug lastSun 2:00s 1:00 D +Rule AT 2001 max - Oct Sun>=1 2:00s 1:00 D +Rule AT 2006 only - Apr Sun>=1 2:00s 0 S +Rule AT 2007 only - Mar lastSun 2:00s 0 S +Rule AT 2008 max - Apr Sun>=1 2:00s 0 S +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Australia/Hobart 9:49:16 - LMT 1895 Sep + 10:00 - AEST 1916 Oct 1 2:00 + 10:00 1:00 AEDT 1917 Feb + 10:00 Aus AE%sT 1967 + 10:00 AT AE%sT +Zone Australia/Currie 9:35:28 - LMT 1895 Sep + 10:00 - AEST 1916 Oct 1 2:00 + 10:00 1:00 AEDT 1917 Feb + 10:00 Aus AE%sT 1971 Jul + 10:00 AT AE%sT + +# Victoria +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule AV 1971 1985 - Oct lastSun 2:00s 1:00 D +Rule AV 1972 only - Feb lastSun 2:00s 0 S +Rule AV 1973 1985 - Mar Sun>=1 2:00s 0 S +Rule AV 1986 1990 - Mar Sun>=15 2:00s 0 S +Rule AV 1986 1987 - Oct Sun>=15 2:00s 1:00 D +Rule AV 1988 1999 - Oct lastSun 2:00s 1:00 D +Rule AV 1991 1994 - Mar Sun>=1 2:00s 0 S +Rule AV 1995 2005 - Mar lastSun 2:00s 0 S +Rule AV 2000 only - Aug lastSun 2:00s 1:00 D +Rule AV 2001 2007 - Oct lastSun 2:00s 1:00 D +Rule AV 2006 only - Apr Sun>=1 2:00s 0 S +Rule AV 2007 only - Mar lastSun 2:00s 0 S +Rule AV 2008 max - Apr Sun>=1 2:00s 0 S +Rule AV 2008 max - Oct Sun>=1 2:00s 1:00 D +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Australia/Melbourne 9:39:52 - LMT 1895 Feb + 10:00 Aus AE%sT 1971 + 10:00 AV AE%sT + +# New South Wales +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule AN 1971 1985 - Oct lastSun 2:00s 1:00 D +Rule AN 1972 only - Feb 27 2:00s 0 S +Rule AN 1973 1981 - Mar Sun>=1 2:00s 0 S +Rule AN 1982 only - Apr Sun>=1 2:00s 0 S +Rule AN 1983 1985 - Mar Sun>=1 2:00s 0 S +Rule AN 1986 1989 - Mar Sun>=15 2:00s 0 S +Rule AN 1986 only - Oct 19 2:00s 1:00 D +Rule AN 1987 1999 - Oct lastSun 2:00s 1:00 D +Rule AN 1990 1995 - Mar Sun>=1 2:00s 0 S +Rule AN 1996 2005 - Mar lastSun 2:00s 0 S +Rule AN 2000 only - Aug lastSun 2:00s 1:00 D +Rule AN 2001 2007 - Oct lastSun 2:00s 1:00 D +Rule AN 2006 only - Apr Sun>=1 2:00s 0 S +Rule AN 2007 only - Mar lastSun 2:00s 0 S +Rule AN 2008 max - Apr Sun>=1 2:00s 0 S +Rule AN 2008 max - Oct Sun>=1 2:00s 1:00 D +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Australia/Sydney 10:04:52 - LMT 1895 Feb + 10:00 Aus AE%sT 1971 + 10:00 AN AE%sT +Zone Australia/Broken_Hill 9:25:48 - LMT 1895 Feb + 10:00 - AEST 1896 Aug 23 + 9:00 - ACST 1899 May + 9:30 Aus AC%sT 1971 + 9:30 AN AC%sT 2000 + 9:30 AS AC%sT + +# Lord Howe Island +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule LH 1981 1984 - Oct lastSun 2:00 1:00 D +Rule LH 1982 1985 - Mar Sun>=1 2:00 0 S +Rule LH 1985 only - Oct lastSun 2:00 0:30 D +Rule LH 1986 1989 - Mar Sun>=15 2:00 0 S +Rule LH 1986 only - Oct 19 2:00 0:30 D +Rule LH 1987 1999 - Oct lastSun 2:00 0:30 D +Rule LH 1990 1995 - Mar Sun>=1 2:00 0 S +Rule LH 1996 2005 - Mar lastSun 2:00 0 S +Rule LH 2000 only - Aug lastSun 2:00 0:30 D +Rule LH 2001 2007 - Oct lastSun 2:00 0:30 D +Rule LH 2006 only - Apr Sun>=1 2:00 0 S +Rule LH 2007 only - Mar lastSun 2:00 0 S +Rule LH 2008 max - Apr Sun>=1 2:00 0 S +Rule LH 2008 max - Oct Sun>=1 2:00 0:30 D +Zone Australia/Lord_Howe 10:36:20 - LMT 1895 Feb + 10:00 - AEST 1981 Mar + 10:30 LH LH%sT + +# Australian miscellany +# +# Ashmore Is, Cartier +# no indigenous inhabitants; only seasonal caretakers +# no times are set +# +# Coral Sea Is +# no indigenous inhabitants; only meteorologists +# no times are set +# +# Macquarie +# Permanent occupation (scientific station) 1911-1915 and since 25 March 1948; +# sealing and penguin oil station operated Nov 1899 to Apr 1919. See the +# Tasmania Parks & Wildlife Service history of sealing at Macquarie Island +# http://www.parks.tas.gov.au/index.aspx?base=1828 +# http://www.parks.tas.gov.au/index.aspx?base=1831 +# Guess that it was like Australia/Hobart while inhabited before 2010. +# +# From Steffen Thorsen (2010-03-10): +# We got these changes from the Australian Antarctic Division: +# - Macquarie Island will stay on UTC+11 for winter and therefore not +# switch back from daylight savings time when other parts of Australia do +# on 4 April. +# +# From Arthur David Olson (2013-05-23): +# The 1919 transition is overspecified below so pre-2013 zics +# will produce a binary file with an [A]EST-type as the first 32-bit type; +# this is required for correct handling of times before 1916 by +# pre-2013 versions of localtime. +Zone Antarctica/Macquarie 0 - -00 1899 Nov + 10:00 - AEST 1916 Oct 1 2:00 + 10:00 1:00 AEDT 1917 Feb + 10:00 Aus AE%sT 1919 Apr 1 0:00s + 0 - -00 1948 Mar 25 + 10:00 Aus AE%sT 1967 + 10:00 AT AE%sT 2010 Apr 4 3:00 + 11:00 - MIST # Macquarie I Standard Time + +# Christmas +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Indian/Christmas 7:02:52 - LMT 1895 Feb + 7:00 - CXT # Christmas Island Time + +# Cocos (Keeling) Is +# These islands were ruled by the Ross family from about 1830 to 1978. +# We don't know when standard time was introduced; for now, we guess 1900. +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Indian/Cocos 6:27:40 - LMT 1900 + 6:30 - CCT # Cocos Islands Time + + +# Fiji + +# Milne gives 11:55:44 for Suva. + +# From Alexander Krivenyshev (2009-11-10): +# According to Fiji Broadcasting Corporation, Fiji plans to re-introduce DST +# from November 29th 2009 to April 25th 2010. +# +# "Daylight savings to commence this month" +# http://www.radiofiji.com.fj/fullstory.php?id=23719 +# http://www.worldtimezone.com/dst_news/dst_news_fiji01.html + +# From Steffen Thorsen (2009-11-10): +# The Fiji Government has posted some more details about the approved +# amendments: +# http://www.fiji.gov.fj/publish/page_16198.shtml + +# From Steffen Thorsen (2010-03-03): +# The Cabinet in Fiji has decided to end DST about a month early, on +# 2010-03-28 at 03:00. +# The plan is to observe DST again, from 2010-10-24 to sometime in March +# 2011 (last Sunday a good guess?). +# +# Official source: +# http://www.fiji.gov.fj/index.php?option=com_content&view=article&id=1096:3310-cabinet-approves-change-in-daylight-savings-dates&catid=49:cabinet-releases&Itemid=166 +# +# A bit more background info here: +# http://www.timeanddate.com/news/time/fiji-dst-ends-march-2010.html + +# From Alexander Krivenyshev (2010-10-24): +# According to Radio Fiji and Fiji Times online, Fiji will end DST 3 +# weeks earlier than expected - on March 6, 2011, not March 27, 2011... +# Here is confirmation from Government of the Republic of the Fiji Islands, +# Ministry of Information (fiji.gov.fj) web site: +# http://www.fiji.gov.fj/index.php?option=com_content&view=article&id=2608:daylight-savings&catid=71:press-releases&Itemid=155 +# http://www.worldtimezone.com/dst_news/dst_news_fiji04.html + +# From Steffen Thorsen (2011-10-03): +# Now the dates have been confirmed, and at least our start date +# assumption was correct (end date was one week wrong). +# +# http://www.fiji.gov.fj/index.php?option=com_content&view=article&id=4966:daylight-saving-starts-in-fiji&catid=71:press-releases&Itemid=155 +# which says +# Members of the public are reminded to change their time to one hour in +# advance at 2am to 3am on October 23, 2011 and one hour back at 3am to +# 2am on February 26 next year. + +# From Ken Rylander (2011-10-24) +# Another change to the Fiji DST end date. In the TZ database the end date for +# Fiji DST 2012, is currently Feb 26. This has been changed to Jan 22. +# +# http://www.fiji.gov.fj/index.php?option=com_content&view=article&id=5017:amendments-to-daylight-savings&catid=71:press-releases&Itemid=155 +# states: +# +# The end of daylight saving scheduled initially for the 26th of February 2012 +# has been brought forward to the 22nd of January 2012. +# The commencement of daylight saving will remain unchanged and start +# on the 23rd of October, 2011. + +# From the Fiji Government Online Portal (2012-08-21) via Steffen Thorsen: +# The Minister for Labour, Industrial Relations and Employment Mr Jone Usamate +# today confirmed that Fiji will start daylight savings at 2 am on Sunday 21st +# October 2012 and end at 3 am on Sunday 20th January 2013. +# http://www.fiji.gov.fj/index.php?option=com_content&view=article&id=6702&catid=71&Itemid=155 + +# From the Fijian Government Media Center (2013-08-30) via David Wheeler: +# Fiji will start daylight savings on Sunday 27th October, 2013 ... +# move clocks forward by one hour from 2am +# http://www.fiji.gov.fj/Media-Center/Press-Releases/DAYLIGHT-SAVING-STARTS-ON-SUNDAY,-27th-OCTOBER-201.aspx + +# From Steffen Thorsen (2013-01-10): +# Fiji will end DST on 2014-01-19 02:00: +# http://www.fiji.gov.fj/Media-Center/Press-Releases/DAYLIGHT-SAVINGS-TO-END-THIS-MONTH-%281%29.aspx + +# From Ken Rylander (2014-10-20): +# DST will start Nov. 2 this year. +# http://www.fiji.gov.fj/Media-Center/Press-Releases/DAYLIGHT-SAVING-STARTS-ON-SUNDAY,-NOVEMBER-2ND.aspx + +# From a government order dated 2015-08-26 and published as Legal Notice No. 77 +# in the Government of Fiji Gazette Supplement No. 24 (2015-08-28), +# via Ken Rylander (2015-09-02): +# the daylight saving period is 1 hour in advance of the standard time +# commencing at 2.00 am on Sunday 1st November, 2015 and ending at +# 3.00 am on Sunday 17th January, 2016. + +# From Paul Eggert (2015-09-01): +# For now, guess DST from 02:00 the first Sunday in November to +# 03:00 the third Sunday in January. Although ad hoc, it matches +# transitions since late 2014 and seems more likely to match future +# practice than guessing no DST. + +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Fiji 1998 1999 - Nov Sun>=1 2:00 1:00 S +Rule Fiji 1999 2000 - Feb lastSun 3:00 0 - +Rule Fiji 2009 only - Nov 29 2:00 1:00 S +Rule Fiji 2010 only - Mar lastSun 3:00 0 - +Rule Fiji 2010 2013 - Oct Sun>=21 2:00 1:00 S +Rule Fiji 2011 only - Mar Sun>=1 3:00 0 - +Rule Fiji 2012 2013 - Jan Sun>=18 3:00 0 - +Rule Fiji 2014 only - Jan Sun>=18 2:00 0 - +Rule Fiji 2014 max - Nov Sun>=1 2:00 1:00 S +Rule Fiji 2015 max - Jan Sun>=15 3:00 0 - +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Pacific/Fiji 11:55:44 - LMT 1915 Oct 26 # Suva + 12:00 Fiji FJ%sT # Fiji Time + +# French Polynesia +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Pacific/Gambier -8:59:48 - LMT 1912 Oct # Rikitea + -9:00 - GAMT # Gambier Time +Zone Pacific/Marquesas -9:18:00 - LMT 1912 Oct + -9:30 - MART # Marquesas Time +Zone Pacific/Tahiti -9:58:16 - LMT 1912 Oct # Papeete + -10:00 - TAHT # Tahiti Time +# Clipperton (near North America) is administered from French Polynesia; +# it is uninhabited. + +# Guam +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Pacific/Guam -14:21:00 - LMT 1844 Dec 31 + 9:39:00 - LMT 1901 # Agana + 10:00 - GST 2000 Dec 23 # Guam + 10:00 - ChST # Chamorro Standard Time +Link Pacific/Guam Pacific/Saipan # N Mariana Is + +# Kiribati +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Pacific/Tarawa 11:32:04 - LMT 1901 # Bairiki + 12:00 - GILT # Gilbert Is Time +Zone Pacific/Enderbury -11:24:20 - LMT 1901 + -12:00 - PHOT 1979 Oct # Phoenix Is Time + -11:00 - PHOT 1995 + 13:00 - PHOT +Zone Pacific/Kiritimati -10:29:20 - LMT 1901 + -10:40 - LINT 1979 Oct # Line Is Time + -10:00 - LINT 1995 + 14:00 - LINT + +# N Mariana Is +# See Pacific/Guam. + +# Marshall Is +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Pacific/Majuro 11:24:48 - LMT 1901 + 11:00 - MHT 1969 Oct # Marshall Islands Time + 12:00 - MHT +Zone Pacific/Kwajalein 11:09:20 - LMT 1901 + 11:00 - MHT 1969 Oct + -12:00 - KWAT 1993 Aug 20 # Kwajalein Time + 12:00 - MHT + +# Micronesia +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Pacific/Chuuk 10:07:08 - LMT 1901 + 10:00 - CHUT # Chuuk Time +Zone Pacific/Pohnpei 10:32:52 - LMT 1901 # Kolonia + 11:00 - PONT # Pohnpei Time +Zone Pacific/Kosrae 10:51:56 - LMT 1901 + 11:00 - KOST 1969 Oct # Kosrae Time + 12:00 - KOST 1999 + 11:00 - KOST + +# Nauru +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Pacific/Nauru 11:07:40 - LMT 1921 Jan 15 # Uaobe + 11:30 - NRT 1942 Mar 15 # Nauru Time + 9:00 - JST 1944 Aug 15 + 11:30 - NRT 1979 May + 12:00 - NRT + +# New Caledonia +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule NC 1977 1978 - Dec Sun>=1 0:00 1:00 S +Rule NC 1978 1979 - Feb 27 0:00 0 - +Rule NC 1996 only - Dec 1 2:00s 1:00 S +# Shanks & Pottenger say the following was at 2:00; go with IATA. +Rule NC 1997 only - Mar 2 2:00s 0 - +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Pacific/Noumea 11:05:48 - LMT 1912 Jan 13 # Nouméa + 11:00 NC NC%sT + + +############################################################################### + +# New Zealand + +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule NZ 1927 only - Nov 6 2:00 1:00 S +Rule NZ 1928 only - Mar 4 2:00 0 M +Rule NZ 1928 1933 - Oct Sun>=8 2:00 0:30 S +Rule NZ 1929 1933 - Mar Sun>=15 2:00 0 M +Rule NZ 1934 1940 - Apr lastSun 2:00 0 M +Rule NZ 1934 1940 - Sep lastSun 2:00 0:30 S +Rule NZ 1946 only - Jan 1 0:00 0 S +# Since 1957 Chatham has been 45 minutes ahead of NZ, but there's no +# convenient single notation for the date and time of this transition +# so we must duplicate the Rule lines. +Rule NZ 1974 only - Nov Sun>=1 2:00s 1:00 D +Rule Chatham 1974 only - Nov Sun>=1 2:45s 1:00 D +Rule NZ 1975 only - Feb lastSun 2:00s 0 S +Rule Chatham 1975 only - Feb lastSun 2:45s 0 S +Rule NZ 1975 1988 - Oct lastSun 2:00s 1:00 D +Rule Chatham 1975 1988 - Oct lastSun 2:45s 1:00 D +Rule NZ 1976 1989 - Mar Sun>=1 2:00s 0 S +Rule Chatham 1976 1989 - Mar Sun>=1 2:45s 0 S +Rule NZ 1989 only - Oct Sun>=8 2:00s 1:00 D +Rule Chatham 1989 only - Oct Sun>=8 2:45s 1:00 D +Rule NZ 1990 2006 - Oct Sun>=1 2:00s 1:00 D +Rule Chatham 1990 2006 - Oct Sun>=1 2:45s 1:00 D +Rule NZ 1990 2007 - Mar Sun>=15 2:00s 0 S +Rule Chatham 1990 2007 - Mar Sun>=15 2:45s 0 S +Rule NZ 2007 max - Sep lastSun 2:00s 1:00 D +Rule Chatham 2007 max - Sep lastSun 2:45s 1:00 D +Rule NZ 2008 max - Apr Sun>=1 2:00s 0 S +Rule Chatham 2008 max - Apr Sun>=1 2:45s 0 S +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Pacific/Auckland 11:39:04 - LMT 1868 Nov 2 + 11:30 NZ NZ%sT 1946 Jan 1 + 12:00 NZ NZ%sT +Zone Pacific/Chatham 12:13:48 - LMT 1868 Nov 2 + 12:15 - CHAST 1946 Jan 1 + 12:45 Chatham CHA%sT + +Link Pacific/Auckland Antarctica/McMurdo + +# Auckland Is +# uninhabited; Māori and Moriori, colonial settlers, pastoralists, sealers, +# and scientific personnel have wintered + +# Campbell I +# minor whaling stations operated 1909/1914 +# scientific station operated 1941/1995; +# previously whalers, sealers, pastoralists, and scientific personnel wintered +# was probably like Pacific/Auckland + +# Cook Is +# From Shanks & Pottenger: +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Cook 1978 only - Nov 12 0:00 0:30 HS +Rule Cook 1979 1991 - Mar Sun>=1 0:00 0 - +Rule Cook 1979 1990 - Oct lastSun 0:00 0:30 HS +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Pacific/Rarotonga -10:39:04 - LMT 1901 # Avarua + -10:30 - CKT 1978 Nov 12 # Cook Is Time + -10:00 Cook CK%sT + +############################################################################### + + +# Niue +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Pacific/Niue -11:19:40 - LMT 1901 # Alofi + -11:20 - NUT 1951 # Niue Time + -11:30 - NUT 1978 Oct 1 + -11:00 - NUT + +# Norfolk +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Pacific/Norfolk 11:11:52 - LMT 1901 # Kingston + 11:12 - NMT 1951 # Norfolk Mean Time + 11:30 - NFT 1974 Oct 27 02:00 # Norfolk T. + 11:30 1:00 NFST 1975 Mar 2 02:00 + 11:30 - NFT 2015 Oct 4 02:00 + 11:00 - NFT + +# Palau (Belau) +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Pacific/Palau 8:57:56 - LMT 1901 # Koror + 9:00 - PWT # Palau Time + +# Papua New Guinea +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Pacific/Port_Moresby 9:48:40 - LMT 1880 + 9:48:32 - PMMT 1895 # Port Moresby Mean Time + 10:00 - PGT # Papua New Guinea Time +# +# From Paul Eggert (2014-10-13): +# Base the Bougainville entry on the Arawa-Kieta region, which appears to have +# the most people even though it was devastated in the Bougainville Civil War. +# +# Although Shanks gives 1942-03-15 / 1943-11-01 for JST, these dates +# are apparently rough guesswork from the starts of military campaigns. +# The World War II entries below are instead based on Arawa-Kieta. +# The Japanese occupied Kieta in July 1942, +# according to the Pacific War Online Encyclopedia +# http://pwencycl.kgbudge.com/B/o/Bougainville.htm +# and seem to have controlled it until their 1945-08-21 surrender. +# +# The Autonomous Region of Bougainville plans to switch from UTC+10 to UTC+11 +# on 2014-12-28 at 02:00. They call UTC+11 "Bougainville Standard Time"; +# abbreviate this as BST. See: +# http://www.bougainville24.com/bougainville-issues/bougainville-gets-own-timezone/ +# +Zone Pacific/Bougainville 10:22:16 - LMT 1880 + 9:48:32 - PMMT 1895 + 10:00 - PGT 1942 Jul + 9:00 - JST 1945 Aug 21 + 10:00 - PGT 2014 Dec 28 2:00 + 11:00 - BST + +# Pitcairn +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Pacific/Pitcairn -8:40:20 - LMT 1901 # Adamstown + -8:30 - PNT 1998 Apr 27 0:00 + -8:00 - PST # Pitcairn Standard Time + +# American Samoa +Zone Pacific/Pago_Pago 12:37:12 - LMT 1879 Jul 5 + -11:22:48 - LMT 1911 + -11:00 - NST 1967 Apr # N=Nome + -11:00 - BST 1983 Nov 30 # B=Bering + -11:00 - SST # S=Samoa +Link Pacific/Pago_Pago Pacific/Midway # in US minor outlying islands + +# Samoa (formerly and also known as Western Samoa) + +# From Steffen Thorsen (2009-10-16): +# We have been in contact with the government of Samoa again, and received +# the following info: +# +# "Cabinet has now approved Daylight Saving to be effected next year +# commencing from the last Sunday of September 2010 and conclude first +# Sunday of April 2011." +# +# Background info: +# http://www.timeanddate.com/news/time/samoa-dst-plan-2009.html +# +# Samoa's Daylight Saving Time Act 2009 is available here, but does not +# contain any dates: +# http://www.parliament.gov.ws/documents/acts/Daylight%20Saving%20Act%20%202009%20%28English%29%20-%20Final%207-7-091.pdf + +# From Laupue Raymond Hughes (2010-10-07): +# Please see +# http://www.mcil.gov.ws +# the Ministry of Commerce, Industry and Labour (sideframe) "Last Sunday +# September 2010 (26/09/10) - adjust clocks forward from 12:00 midnight +# to 01:00am and First Sunday April 2011 (03/04/11) - adjust clocks +# backwards from 1:00am to 12:00am" + +# From Laupue Raymond Hughes (2011-03-07): +# [http://www.mcil.gov.ws/ftcd/daylight_saving_2011.pdf] +# +# ... when the standard time strikes the hour of four o'clock (4.00am +# or 0400 Hours) on the 2nd April 2011, then all instruments used to +# measure standard time are to be adjusted/changed to three o'clock +# (3:00am or 0300Hrs). + +# From David Zülke (2011-05-09): +# Subject: Samoa to move timezone from east to west of international date line +# +# http://www.morningstar.co.uk/uk/markets/newsfeeditem.aspx?id=138501958347963 + +# From Paul Eggert (2014-06-27): +# The International Date Line Act 2011 +# http://www.parliament.gov.ws/images/ACTS/International_Date_Line_Act__2011_-_Eng.pdf +# changed Samoa from UTC-11 to UTC+13, effective "12 o'clock midnight, on +# Thursday 29th December 2011". The International Date Line was adjusted +# accordingly. + +# From Laupue Raymond Hughes (2011-09-02): +# http://www.mcil.gov.ws/mcil_publications.html +# +# here is the official website publication for Samoa DST and dateline change +# +# DST +# Year End Time Start Time +# 2011 - - - - - - 24 September 3:00am to 4:00am +# 2012 01 April 4:00am to 3:00am - - - - - - +# +# Dateline Change skip Friday 30th Dec 2011 +# Thursday 29th December 2011 23:59:59 Hours +# Saturday 31st December 2011 00:00:00 Hours +# +# From Nicholas Pereira (2012-09-10): +# Daylight Saving Time commences on Sunday 30th September 2012 and +# ends on Sunday 7th of April 2013.... +# http://www.mcil.gov.ws/mcil_publications.html +# +# From Paul Eggert (2014-07-08): +# That web page currently lists transitions for 2012/3 and 2013/4. +# Assume the pattern instituted in 2012 will continue indefinitely. + +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule WS 2010 only - Sep lastSun 0:00 1 D +Rule WS 2011 only - Apr Sat>=1 4:00 0 S +Rule WS 2011 only - Sep lastSat 3:00 1 D +Rule WS 2012 max - Apr Sun>=1 4:00 0 S +Rule WS 2012 max - Sep lastSun 3:00 1 D +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Pacific/Apia 12:33:04 - LMT 1879 Jul 5 + -11:26:56 - LMT 1911 + -11:30 - WSST 1950 + -11:00 WS S%sT 2011 Dec 29 24:00 # S=Samoa + 13:00 WS WS%sT + +# Solomon Is +# excludes Bougainville, for which see Papua New Guinea +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Pacific/Guadalcanal 10:39:48 - LMT 1912 Oct # Honiara + 11:00 - SBT # Solomon Is Time + +# Tokelau Is +# +# From Gwillim Law (2011-12-29) +# A correspondent informed me that Tokelau, like Samoa, will be skipping +# December 31 this year ... +# +# From Steffen Thorsen (2012-07-25) +# ... we double checked by calling hotels and offices based in Tokelau asking +# about the time there, and they all told a time that agrees with UTC+13.... +# Shanks says UTC-10 from 1901 [but] ... there is a good chance the change +# actually was to UTC-11 back then. +# +# From Paul Eggert (2012-07-25) +# A Google Books snippet of Appendix to the Journals of the House of +# Representatives of New Zealand, Session 1948, +# <http://books.google.com/books?id=ZaVCAQAAIAAJ>, page 65, says Tokelau +# was "11 hours slow on G.M.T." Go with Thorsen and assume Shanks & Pottenger +# are off by an hour starting in 1901. + +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Pacific/Fakaofo -11:24:56 - LMT 1901 + -11:00 - TKT 2011 Dec 30 # Tokelau Time + 13:00 - TKT + +# Tonga +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +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 - +# 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 + +# Tuvalu +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Pacific/Funafuti 11:56:52 - LMT 1901 + 12:00 - TVT # Tuvalu Time + + +# US minor outlying islands + +# Howland, Baker +# Howland was mined for guano by American companies 1857-1878 and British +# 1886-1891; Baker was similar but exact dates are not known. +# Inhabited by civilians 1935-1942; U.S. military bases 1943-1944; +# uninhabited thereafter. +# Howland observed Hawaii Standard Time (UT-10:30) in 1937; +# see page 206 of Elgen M. Long and Marie K. Long, +# Amelia Earhart: the Mystery Solved, Simon & Schuster (2000). +# So most likely Howland and Baker observed Hawaii Time from 1935 +# until they were abandoned after the war. + +# Jarvis +# Mined for guano by American companies 1857-1879 and British 1883?-1891?. +# Inhabited by civilians 1935-1942; IGY scientific base 1957-1958; +# uninhabited thereafter. +# no information; was probably like Pacific/Kiritimati + +# Johnston +# +# From Paul Eggert (2014-03-11): +# Sometimes Johnston kept Hawaii time, and sometimes it was an hour behind. +# Details are uncertain. We have no data for Johnston after 1970, so +# treat it like Hawaii for now. +# +# In his memoirs of June 6th to October 4, 1945 +# <http://www.315bw.org/Herb_Bach.htm> (2005), Herbert C. Bach writes, +# "We started our letdown to Kwajalein Atoll and landed there at 5:00 AM +# Johnston time, 1:30 AM Kwajalein time." This was in June 1945, and +# confirms that Johnston kept the same time as Honolulu in summer 1945. +# +# From Lyle McElhaney (2014-03-11): +# [W]hen JI was being used for that [atomic bomb] testing, the time being used +# was not Hawaiian time but rather the same time being used on the ships, +# which had a GMT offset of -11 hours. This apparently applied to at least the +# time from Operation Newsreel (Hardtack I/Teak shot, 1958-08-01) to the last +# Operation Fishbowl shot (Tightrope, 1962-11-04).... [See] Herman Hoerlin, +# "The United States High-Altitude Test Experience: A Review Emphasizing the +# Impact on the Environment", Los Alamos LA-6405, Oct 1976. +# http://www.fas.org/sgp/othergov/doe/lanl/docs1/00322994.pdf +# See the table on page 4 where he lists GMT and local times for the tests; a +# footnote for the JI tests reads that local time is "JI time = Hawaii Time +# Minus One Hour". +# +# See 'northamerica' for Pacific/Johnston. + +# Kingman +# uninhabited + +# Midway +# See Pacific/Pago_Pago. + +# Palmyra +# uninhabited since World War II; was probably like Pacific/Kiritimati + +# Wake +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Pacific/Wake 11:06:28 - LMT 1901 + 12:00 - WAKT # Wake Time + + +# Vanuatu +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Vanuatu 1983 only - Sep 25 0:00 1:00 S +Rule Vanuatu 1984 1991 - Mar Sun>=23 0:00 0 - +Rule Vanuatu 1984 only - Oct 23 0:00 1:00 S +Rule Vanuatu 1985 1991 - Sep Sun>=23 0:00 1:00 S +Rule Vanuatu 1992 1993 - Jan Sun>=23 0:00 0 - +Rule Vanuatu 1992 only - Oct Sun>=23 0:00 1:00 S +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Pacific/Efate 11:13:16 - LMT 1912 Jan 13 # Vila + 11:00 Vanuatu VU%sT # Vanuatu Time + +# Wallis and Futuna +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Pacific/Wallis 12:15:20 - LMT 1901 + 12:00 - WFT # Wallis & Futuna Time + +############################################################################### + +# NOTES + +# This file is by no means authoritative; if you think you know better, +# go ahead and edit the file (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): +# +# 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. +# +# Gwillim Law writes that a good source +# for recent time zone data is the International Air Transport +# Association's Standard Schedules Information Manual (IATA SSIM), +# published semiannually. Law sent in several helpful summaries +# of the IATA's data after 1990. Except where otherwise noted, +# IATA SSIM is the source for entries after 1990. +# +# Another source occasionally used is Edward W. Whitman, World Time Differences, +# Whitman Publishing Co, 2 Niagara Av, Ealing, London (undated), which +# I found in the UCLA library. +# +# For data circa 1899, a common source is: +# Milne J. Civil time. Geogr J. 1899 Feb;13(2):173-94. +# http://www.jstor.org/stable/1774359 +# +# A reliable and entertaining source about time zones is +# Derek Howse, Greenwich time and longitude, Philip Wilson Publishers (1997). +# +# I invented the abbreviations marked '*' in the following table; +# the rest are from earlier versions of this file, or from other sources. +# Corrections are welcome! +# std dst +# LMT Local Mean Time +# 8:00 AWST AWDT Western Australia +# 8:45 ACWST ACWDT Central Western Australia* +# 9:00 JST Japan +# 9:30 ACST ACDT Central Australia +# 10:00 AEST AEDT Eastern Australia +# 10:00 ChST Chamorro +# 10:30 LHST LHDT Lord Howe* +# 11:00 BST Bougainville* +# 11:30 NZMT NZST New Zealand through 1945 +# 12:00 NZST NZDT New Zealand 1946-present +# 12:15 CHAST Chatham through 1945* +# 12:45 CHAST CHADT Chatham 1946-present* +# 13:00 WSST WSDT (western) Samoa 2011-present* +# -11:30 WSST Western Samoa through 1950* +# -11:00 SST Samoa +# -10:00 HST Hawaii +# - 8:00 PST Pitcairn* +# +# See the 'northamerica' file for Hawaii. +# See the 'southamerica' file for Easter I and the Galápagos Is. + +############################################################################### + +# Australia + +# From Paul Eggert (2014-06-30): +# Daylight saving time has long been controversial in Australia, pitting +# region against region, rural against urban, and local against global. +# For example, in her review of Graeme Davison's _The Unforgiving +# Minute: how Australians learned to tell the time_ (1993), Perth native +# Phillipa J Martyr wrote, "The section entitled 'Saving Daylight' was +# very informative, but was (as can, sadly, only be expected from a +# Melbourne-based study) replete with the usual chuckleheaded +# Queenslanders and straw-chewing yokels from the West prattling fables +# about fading curtains and crazed farm animals." +# Electronic Journal of Australian and New Zealand History (1997-03-03) +# http://www.jcu.edu.au/aff/history/reviews/davison.htm + +# From Paul Eggert (2005-12-08): +# Implementation Dates of Daylight Saving Time within Australia +# http://www.bom.gov.au/climate/averages/tables/dst_times.shtml +# summarizes daylight saving issues in Australia. + +# From Arthur David Olson (2005-12-12): +# Lawlink NSW:Daylight Saving in New South Wales +# http://www.lawlink.nsw.gov.au/lawlink/Corporate/ll_agdinfo.nsf/pages/community_relations_daylight_saving +# covers New South Wales in particular. + +# From John Mackin (1991-03-06): +# We in Australia have _never_ referred to DST as 'daylight' time. +# It is called 'summer' time. Now by a happy coincidence, 'summer' +# and 'standard' happen to start with the same letter; hence, the +# abbreviation does _not_ change... +# The legislation does not actually define abbreviations, at least +# in this State, but the abbreviation is just commonly taken to be the +# initials of the phrase, and the legislation here uniformly uses +# the phrase 'summer time' and does not use the phrase 'daylight +# time'. +# Announcers on the Commonwealth radio network, the ABC (for Australian +# Broadcasting Commission), use the phrases 'Eastern Standard Time' +# or 'Eastern Summer Time'. (Note, though, that as I say in the +# current australasia file, there is really no such thing.) Announcers +# on its overseas service, Radio Australia, use the same phrases +# prefixed by the word 'Australian' when referring to local times; +# time announcements on that service, naturally enough, are made in UTC. + +# From Paul Eggert (2014-06-30): +# +# Inspired by Mackin's remarks quoted above, earlier versions of this +# file used "EST" for both Eastern Standard Time and Eastern Summer +# Time in Australia, and similarly for "CST", "CWST", and "WST". +# However, these abbreviations were confusing and were not common +# practice among Australians, and there were justifiable complaints +# about them, so I attempted to survey current Australian usage. +# For the tz database, the full English phrase is not that important; +# what matters is the abbreviation. It's difficult to survey the web +# directly for abbreviation usage, as there are so many false hits for +# strings like "EST" and "EDT", so I looked for pages that defined an +# abbreviation for eastern or central DST in Australia, and got the +# following numbers of unique hits for the listed Google queries: +# +# 10 "Eastern Daylight Time AEST" site:au [some are false hits] +# 10 "Eastern Summer Time AEST" site:au +# 10 "Summer Time AEDT" site:au +# 13 "EDST Eastern Daylight Saving Time" site:au +# 18 "Summer Time ESST" site:au +# 28 "Eastern Daylight Saving Time EDST" site:au +# 39 "EDT Eastern Daylight Time" site:au [some are false hits] +# 53 "Eastern Daylight Time EDT" site:au [some are false hits] +# 54 "AEDT Australian Eastern Daylight Time" site:au +# 182 "Eastern Daylight Time AEDT" site:au +# +# 17 "Central Daylight Time CDT" site:au [some are false hits] +# 46 "Central Daylight Time ACDT" site:au +# +# I tried several other variants (e.g., "Eastern Summer Time EST") but +# they all returned fewer than 10 unique hits. I also looked for pages +# mentioning both "western standard time" and an abbreviation, since +# there is no WST in the US to generate false hits, and found: +# +# 156 "western standard time" AWST site:au +# 226 "western standard time" WST site:au +# +# I then surveyed the top ten newspapers in Australia by circulation as +# listed in Wikipedia, using Google queries like "AEDT site:heraldsun.com.au" +# and obtaining estimated counts from the initial page of search results. +# All ten papers greatly preferred "AEDT" to "EDT". The papers +# surveyed were the Herald Sun, The Daily Telegraph, The Courier-Mail, +# The Sydney Morning Herald, The West Australian, The Age, The Advertiser, +# The Australian, The Financial Review, and The Herald (Newcastle). +# +# I also searched for historical usage, to see whether abbreviations +# like "AEDT" are new. A Trove search <http://trove.nla.gov.au/> +# found only one newspaper (The Canberra Times) with a house style +# dating back to the 1970s, I expect because other newspapers weren't +# fully indexed. The Canberra Times strongly preferred abbreviations +# like "AEDT". The first occurrence of "AEDT" was a World Weather +# column (1971-11-17, page 24), and of "ACDT" was a Scoreboard column +# (1993-01-24, p 16). The style was the typical usage but was not +# strictly enforced; for example, "Welcome to the twilight zones ..." +# (1994-10-29, p 1) uses the abbreviations AEST/AEDT, CST/CDT, and +# WST, and goes on to say, "The confusion and frustration some feel +# about the lack of uniformity among Australia's six states and two +# territories has prompted one group to form its very own political +# party -- the Sydney-based Daylight Saving Extension Party." +# +# I also surveyed federal government sources. They did not agree: +# +# The Australian Government (2014-03-26) +# http://australia.gov.au/about-australia/our-country/time +# (This document was produced by the Department of Finance.) +# AEST ACST AWST AEDT ACDT +# +# Bureau of Meteorology (2012-11-08) +# http://www.bom.gov.au/climate/averages/tables/daysavtm.shtml +# EST CST WST EDT CDT +# +# Civil Aviation Safety Authority (undated) +# http://services.casa.gov.au/outnback/inc/pages/episode3/episode-3_time_zones.shtml +# EST CST WST (no abbreviations given for DST) +# +# Geoscience Australia (2011-11-24) +# http://www.ga.gov.au/geodesy/astro/sunrise.jsp +# AEST ACST AWST AEDT ACDT +# +# Parliamentary Library (2008-11-10) +# http://www.aph.gov.au/binaries/library/pubs/rp/2008-09/09rp14.pdf +# EST CST WST preferred for standard time; AEST AEDT ACST ACDT also used +# +# The Transport Safety Bureau has an extensive series of accident reports, +# and investigators seem to use whatever abbreviation they like. +# Googling site:atsb.gov.au found the following number of unique hits: +# 311 "ESuT", 195 "EDT", 26 "AEDT", 83 "CSuT", 46 "CDT". +# "_SuT" tended to appear in older reports, and "A_DT" tended to +# appear in reports of events with international implications. +# +# From the above it appears that there is a working consensus in +# Australia to use trailing "DT" for daylight saving time; although +# some sources use trailing "SST" or "ST" or "SuT" they are by far in +# the minority. The case for leading "A" is weaker, but since it +# seems to be preferred in the overall web and is preferred in all +# the leading newspaper websites and in many government departments, +# it has a stronger case than omitting the leading "A". The current +# version of the database therefore uses abbreviations like "AEST" and +# "AEDT" for Australian time zones. + +# From Paul Eggert (1995-12-19): +# Shanks & Pottenger report 2:00 for all autumn changes in Australia and NZ. +# Mark Prior writes that his newspaper +# reports that NSW's fall 1995 change will occur at 2:00, +# but Robert Elz says it's been 3:00 in Victoria since 1970 +# and perhaps the newspaper's '2:00' is referring to standard time. +# For now we'll continue to assume 2:00s for changes since 1960. + +# From Eric Ulevik (1998-01-05): +# +# Here are some URLs to Australian time legislation. These URLs are stable, +# and should probably be included in the data file. There are probably more +# relevant entries in this database. +# +# NSW (including LHI and Broken Hill): +# Standard Time Act 1987 (updated 1995-04-04) +# http://www.austlii.edu.au/au/legis/nsw/consol_act/sta1987137/index.html +# ACT +# Standard Time and Summer Time Act 1972 +# http://www.austlii.edu.au/au/legis/act/consol_act/stasta1972279/index.html +# SA +# Standard Time Act, 1898 +# http://www.austlii.edu.au/au/legis/sa/consol_act/sta1898137/index.html + +# From David Grosz (2005-06-13): +# It was announced last week that Daylight Saving would be extended by +# one week next year to allow for the 2006 Commonwealth Games. +# Daylight Saving is now to end for next year only on the first Sunday +# in April instead of the last Sunday in March. +# +# From Gwillim Law (2005-06-14): +# I did some Googling and found that all of those states (and territory) plan +# to extend DST together in 2006. +# ACT: http://www.cmd.act.gov.au/mediareleases/fileread.cfm?file=86.txt +# New South Wales: http://www.thecouriermail.news.com.au/common/story_page/0,5936,15538869%255E1702,00.html +# South Australia: http://www.news.com.au/story/0,10117,15555031-1246,00.html +# Tasmania: http://www.media.tas.gov.au/release.php?id=14772 +# Victoria: I wasn't able to find anything separate, but the other articles +# allude to it. +# But not Queensland +# http://www.news.com.au/story/0,10117,15564030-1248,00.html + +# Northern Territory + +# From George Shepherd via Simon Woodhead via Robert Elz (1991-03-06): +# # The NORTHERN TERRITORY.. [ Courtesy N.T. Dept of the Chief Minister ] +# # [ Nov 1990 ] +# # N.T. have never utilised any DST due to sub-tropical/tropical location. +# ... +# Zone Australia/North 9:30 - CST + +# From Bradley White (1991-03-04): +# A recent excerpt from an Australian newspaper... +# the Northern Territory do[es] not have daylight saving. + +# Western Australia + +# From George Shepherd via Simon Woodhead via Robert Elz (1991-03-06): +# # The state of WESTERN AUSTRALIA.. [ Courtesy W.A. dept Premier+Cabinet ] +# # [ Nov 1990 ] +# # W.A. suffers from a great deal of public and political opposition to +# # DST in principle. A bill is brought before parliament in most years, but +# # usually defeated either in the upper house, or in party caucus +# # before reaching parliament. +# ... +# Zone Australia/West 8:00 AW %sST +# ... +# Rule AW 1974 only - Oct lastSun 2:00 1:00 D +# Rule AW 1975 only - Mar Sun>=1 3:00 0 W +# Rule AW 1983 only - Oct lastSun 2:00 1:00 D +# Rule AW 1984 only - Mar Sun>=1 3:00 0 W + +# From Bradley White (1991-03-04): +# A recent excerpt from an Australian newspaper... +# Western Australia...do[es] not have daylight saving. + +# From John D. Newman via Bradley White (1991-11-02): +# Western Australia is still on "winter time". Some DH in Sydney +# rang me at home a few days ago at 6.00am. (He had just arrived at +# work at 9.00am.) +# W.A. is switching to Summer Time on Nov 17th just to confuse +# everybody again. + +# From Arthur David Olson (1992-03-08): +# The 1992 ending date used in the rules is a best guess; +# it matches what was used in the past. + +# The Australian Bureau of Meteorology FAQ +# http://www.bom.gov.au/faq/faqgen.htm +# (1999-09-27) writes that Giles Meteorological Station uses +# South Australian time even though it's located in Western Australia. + +# Queensland +# From George Shepherd via Simon Woodhead via Robert Elz (1991-03-06): +# # The state of QUEENSLAND.. [ Courtesy Qld. Dept Premier Econ&Trade Devel ] +# # [ Dec 1990 ] +# ... +# Zone Australia/Queensland 10:00 AQ %sST +# ... +# Rule AQ 1971 only - Oct lastSun 2:00 1:00 D +# Rule AQ 1972 only - Feb lastSun 3:00 0 E +# Rule AQ 1989 max - Oct lastSun 2:00 1:00 D +# Rule AQ 1990 max - Mar Sun>=1 3:00 0 E + +# From Bradley White (1989-12-24): +# "Australia/Queensland" now observes daylight time (i.e. from +# October 1989). + +# From Bradley White (1991-03-04): +# A recent excerpt from an Australian newspaper... +# ...Queensland...[has] agreed to end daylight saving +# at 3am tomorrow (March 3)... + +# From John Mackin (1991-03-06): +# I can certainly confirm for my part that Daylight Saving in NSW did in fact +# end on Sunday, 3 March. I don't know at what hour, though. (It surprised +# me.) + +# From Bradley White (1992-03-08): +# ...there was recently a referendum in Queensland which resulted +# in the experimental daylight saving system being abandoned. So, ... +# ... +# Rule QLD 1989 1991 - Oct lastSun 2:00 1:00 D +# Rule QLD 1990 1992 - Mar Sun>=1 3:00 0 S +# ... + +# From Arthur David Olson (1992-03-08): +# The chosen rules the union of the 1971/1972 change and the 1989-1992 changes. + +# From Christopher Hunt (2006-11-21), after an advance warning +# from Jesper Nørgaard Welen (2006-11-01): +# WA are trialing DST for three years. +# http://www.parliament.wa.gov.au/parliament/bills.nsf/9A1B183144403DA54825721200088DF1/$File/Bill175-1B.pdf + +# From Rives McDow (2002-04-09): +# The most interesting region I have found consists of three towns on the +# southern coast.... South Australia observes daylight saving time; Western +# Australia does not. The two states are one and a half hours apart. The +# residents decided to forget about this nonsense of changing the clock so +# much and set the local time 20 hours and 45 minutes from the +# international date line, or right in the middle of the time of South +# Australia and Western Australia.... +# +# From Paul Eggert (2002-04-09): +# This is confirmed by the section entitled +# "What's the deal with time zones???" in +# http://www.earthsci.unimelb.edu.au/~awatkins/null.html +# +# From Alex Livingston (2006-12-07): +# ... it was just on four years ago that I drove along the Eyre Highway, +# which passes through eastern Western Australia close to the southern +# coast of the continent. +# +# I paid particular attention to the time kept there. There can be no +# dispute that UTC+08:45 was considered "the time" from the border +# village just inside the border with South Australia to as far west +# as just east of Caiguna. There can also be no dispute that Eucla is +# the largest population centre in this zone.... +# +# Now that Western Australia is observing daylight saving, the +# question arose whether this part of the state would follow suit. I +# just called the border village and confirmed that indeed they have, +# meaning that they are now observing UTC+09:45. +# +# (2006-12-09): +# I personally doubt that either experimentation with daylight saving +# in WA or its introduction in SA had anything to do with the genesis +# of this time zone. My hunch is that it's been around since well +# before 1975. I remember seeing it noted on road maps decades ago. + +# From Paul Eggert (2006-12-15): +# For lack of better info, assume the tradition dates back to the +# introduction of standard time in 1895. + + +# southeast Australia +# +# From Paul Eggert (2007-07-23): +# Starting autumn 2008 Victoria, NSW, South Australia, Tasmania and the ACT +# end DST the first Sunday in April and start DST the first Sunday in October. +# http://www.theage.com.au/news/national/daylight-savings-to-span-six-months/2007/06/27/1182623966703.html + + +# South Australia + +# From Bradley White (1991-03-04): +# A recent excerpt from an Australian newspaper... +# ...South Australia...[has] agreed to end daylight saving +# at 3am tomorrow (March 3)... + +# From George Shepherd via Simon Woodhead via Robert Elz (1991-03-06): +# # The state of SOUTH AUSTRALIA....[ Courtesy of S.A. Dept of Labour ] +# # [ Nov 1990 ] +# ... +# Zone Australia/South 9:30 AS %sST +# ... +# Rule AS 1971 max - Oct lastSun 2:00 1:00 D +# Rule AS 1972 1985 - Mar Sun>=1 3:00 0 C +# Rule AS 1986 1990 - Mar Sun>=15 3:00 0 C +# Rule AS 1991 max - Mar Sun>=1 3:00 0 C + +# From Bradley White (1992-03-11): +# Recent correspondence with a friend in Adelaide +# contained the following exchange: "Due to the Adelaide Festival, +# South Australia delays setting back our clocks for a few weeks." + +# From Robert Elz (1992-03-13): +# I heard that apparently (or at least, it appears that) +# South Aus will have an extra 3 weeks daylight saving every even +# numbered year (from 1990). That's when the Adelaide Festival +# is on... + +# From Robert Elz (1992-03-16, 00:57:07 +1000): +# DST didn't end in Adelaide today (yesterday).... +# But whether it's "4th Sunday" or "2nd last Sunday" I have no idea whatever... +# (it's just as likely to be "the Sunday we pick for this year"...). + +# From Bradley White (1994-04-11): +# If Sun, 15 March, 1992 was at +1030 as kre asserts, but yet Sun, 20 March, +# 1994 was at +0930 as John Connolly's customer seems to assert, then I can +# only conclude that the actual rule is more complicated.... + +# From John Warburton (1994-10-07): +# The new Daylight Savings dates for South Australia ... +# was gazetted in the Government Hansard on Sep 26 1994.... +# start on last Sunday in October and end in last sunday in March. + +# From Paul Eggert (2007-07-23): +# See "southeast Australia" above for 2008 and later. + +# Tasmania + +# The rules for 1967 through 1991 were reported by George Shepherd +# via Simon Woodhead via Robert Elz (1991-03-06): +# # The state of TASMANIA.. [Courtesy Tasmanian Dept of Premier + Cabinet ] +# # [ Nov 1990 ] + +# From Bill Hart via Guy Harris (1991-10-10): +# Oh yes, the new daylight savings rules are uniquely tasmanian, we have +# 6 weeks a year now when we are out of sync with the rest of Australia +# (but nothing new about that). + +# From Alex Livingston (1999-10-04): +# I heard on the ABC (Australian Broadcasting Corporation) radio news on the +# (long) weekend that Tasmania, which usually goes its own way in this regard, +# has decided to join with most of NSW, the ACT, and most of Victoria +# (Australia) and start daylight saving on the last Sunday in August in 2000 +# instead of the first Sunday in October. + +# Sim Alam (2000-07-03) reported a legal citation for the 2000/2001 rules: +# http://www.thelaw.tas.gov.au/fragview/42++1968+GS3A@EN+2000070300 + +# From Paul Eggert (2007-07-23): +# See "southeast Australia" above for 2008 and later. + +# Victoria + +# The rules for 1971 through 1991 were reported by George Shepherd +# via Simon Woodhead via Robert Elz (1991-03-06): +# # The state of VICTORIA.. [ Courtesy of Vic. Dept of Premier + Cabinet ] +# # [ Nov 1990 ] + +# From Scott Harrington (2001-08-29): +# On KQED's "City Arts and Lectures" program last night I heard an +# interesting story about daylight savings time. Dr. John Heilbron was +# discussing his book "The Sun in the Church: Cathedrals as Solar +# Observatories"[1], and in particular the Shrine of Remembrance[2] located +# in Melbourne, Australia. +# +# Apparently the shrine's main purpose is a beam of sunlight which +# illuminates a special spot on the floor at the 11th hour of the 11th day +# of the 11th month (Remembrance Day) every year in memory of Australia's +# fallen WWI soldiers. And if you go there on Nov. 11, at 11am local time, +# you will indeed see the sunbeam illuminate the special spot at the +# expected time. +# +# However, that is only because of some special mirror contraption that had +# to be employed, since due to daylight savings time, the true solar time of +# the remembrance moment occurs one hour later (or earlier?). Perhaps +# someone with more information on this jury-rig can tell us more. +# +# [1] http://www.hup.harvard.edu/catalog/HEISUN.html +# [2] http://www.shrine.org.au + +# From Paul Eggert (2007-07-23): +# See "southeast Australia" above for 2008 and later. + +# New South Wales + +# From Arthur David Olson: +# New South Wales and subjurisdictions have their own ideas of a fun time. +# Based on law library research by John Mackin, +# who notes: +# In Australia, time is not legislated federally, but rather by the +# individual states. Thus, while such terms as "Eastern Standard Time" +# [I mean, of course, Australian EST, not any other kind] are in common +# use, _they have NO REAL MEANING_, as they are not defined in the +# legislation. This is very important to understand. +# I have researched New South Wales time only... + +# From Eric Ulevik (1999-05-26): +# DST will start in NSW on the last Sunday of August, rather than the usual +# October in 2000. See: Matthew Moore, +# Two months more daylight saving, Sydney Morning Herald (1999-05-26). +# http://www.smh.com.au/news/9905/26/pageone/pageone4.html + +# From Paul Eggert (1999-09-27): +# See the following official NSW source: +# Daylight Saving in New South Wales. +# http://dir.gis.nsw.gov.au/cgi-bin/genobject/document/other/daylightsaving/tigGmZ +# +# Narrabri Shire (NSW) council has announced it will ignore the extension of +# daylight saving next year. See: +# Narrabri Council to ignore daylight saving +# http://abc.net.au/news/regionals/neweng/monthly/regeng-22jul1999-1.htm +# (1999-07-22). For now, we'll wait to see if this really happens. +# +# Victoria will following NSW. See: +# Vic to extend daylight saving (1999-07-28) +# http://abc.net.au/local/news/olympics/1999/07/item19990728112314_1.htm +# +# However, South Australia rejected the DST request. See: +# South Australia rejects Olympics daylight savings request (1999-07-19) +# http://abc.net.au/news/olympics/1999/07/item19990719151754_1.htm +# +# Queensland also will not observe DST for the Olympics. See: +# Qld says no to daylight savings for Olympics +# http://abc.net.au/news/olympics/1999/06/item19990601114608_1.htm +# (1999-06-01), which quotes Queensland Premier Peter Beattie as saying +# "Look you've got to remember in my family when this came up last time +# I voted for it, my wife voted against it and she said to me it's all very +# well for you, you don't have to worry about getting the children out of +# bed, getting them to school, getting them to sleep at night. +# I've been through all this argument domestically...my wife rules." +# +# Broken Hill will stick with South Australian time in 2000. See: +# Broken Hill to be behind the times (1999-07-21) +# http://abc.net.au/news/regionals/brokenh/monthly/regbrok-21jul1999-6.htm + +# IATA SSIM (1998-09) says that the spring 2000 change for Australian +# Capital Territory, New South Wales except Lord Howe Island and Broken +# Hill, and Victoria will be August 27, presumably due to the Sydney Olympics. + +# From Eric Ulevik, referring to Sydney's Sun Herald (2000-08-13), page 29: +# The Queensland Premier Peter Beattie is encouraging northern NSW +# towns to use Queensland time. + +# From Paul Eggert (2007-07-23): +# See "southeast Australia" above for 2008 and later. + +# Yancowinna + +# From John Mackin (1989-01-04): +# 'Broken Hill' means the County of Yancowinna. + +# From George Shepherd via Simon Woodhead via Robert Elz (1991-03-06): +# # YANCOWINNA.. [ Confirmation courtesy of Broken Hill Postmaster ] +# # [ Dec 1990 ] +# ... +# # Yancowinna uses Central Standard Time, despite [its] location on the +# # New South Wales side of the S.A. border. Most business and social dealings +# # are with CST zones, therefore CST is legislated by local government +# # although the switch to Summer Time occurs in line with N.S.W. There have +# # been years when this did not apply, but the historical data is not +# # presently available. +# Zone Australia/Yancowinna 9:30 AY %sST +# ... +# Rule AY 1971 1985 - Oct lastSun 2:00 1:00 D +# Rule AY 1972 only - Feb lastSun 3:00 0 C +# [followed by other Rules] + +# Lord Howe Island + +# From George Shepherd via Simon Woodhead via Robert Elz (1991-03-06): +# LHI... [ Courtesy of Pauline Van Winsen ] +# [ Dec 1990 ] +# Lord Howe Island is located off the New South Wales coast, and is half an +# hour ahead of NSW time. + +# From James Lonergan, Secretary, Lord Howe Island Board (2000-01-27): +# Lord Howe Island summer time in 2000/2001 will commence on the same +# date as the rest of NSW (i.e. 2000-08-27). For your information the +# Lord Howe Island Board (controlling authority for the Island) is +# seeking the community's views on various options for summer time +# arrangements on the Island, e.g. advance clocks by 1 full hour +# instead of only 30 minutes. [Dependent] on the wishes of residents +# the Board may approach the NSW government to change the existing +# arrangements. The starting date for summer time on the Island will +# however always coincide with the rest of NSW. + +# From James Lonergan, Secretary, Lord Howe Island Board (2000-10-25): +# Lord Howe Island advances clocks by 30 minutes during DST in NSW and retards +# clocks by 30 minutes when DST finishes. Since DST was most recently +# introduced in NSW, the "changeover" time on the Island has been 02:00 as +# shown on clocks on LHI. I guess this means that for 30 minutes at the start +# of DST, LHI is actually 1 hour ahead of the rest of NSW. + +# From Paul Eggert (2006-03-22): +# For Lord Howe dates we use Shanks & Pottenger through 1989, and +# Lonergan thereafter. For times we use Lonergan. + +# From Paul Eggert (2007-07-23): +# See "southeast Australia" above for 2008 and later. + +# From Steffen Thorsen (2009-04-28): +# According to the official press release, South Australia's extended daylight +# saving period will continue with the same rules as used during the 2008-2009 +# summer (southern hemisphere). +# +# From +# http://www.safework.sa.gov.au/uploaded_files/DaylightDatesSet.pdf +# The extended daylight saving period that South Australia has been trialling +# for over the last year is now set to be ongoing. +# Daylight saving will continue to start on the first Sunday in October each +# year and finish on the first Sunday in April the following year. +# Industrial Relations Minister, Paul Caica, says this provides South Australia +# with a consistent half hour time difference with NSW, Victoria, Tasmania and +# the ACT for all 52 weeks of the year... +# +# We have a wrap-up here: +# http://www.timeanddate.com/news/time/south-australia-extends-dst.html +############################################################################### + +# New Zealand + +# From Mark Davies (1990-10-03): +# the 1989/90 year was a trial of an extended "daylight saving" period. +# This trial was deemed successful and the extended period adopted for +# subsequent years (with the addition of a further week at the start). +# source - phone call to Ministry of Internal Affairs Head Office. + +# From George Shepherd via Simon Woodhead via Robert Elz (1991-03-06): +# # The Country of New Zealand (Australia's east island -) Gee they hate that! +# # or is Australia the west island of N.Z. +# # [ courtesy of Geoff Tribble.. Auckland N.Z. ] +# # [ Nov 1990 ] +# ... +# Rule NZ 1974 1988 - Oct lastSun 2:00 1:00 D +# Rule NZ 1989 max - Oct Sun>=1 2:00 1:00 D +# Rule NZ 1975 1989 - Mar Sun>=1 3:00 0 S +# Rule NZ 1990 max - Mar lastSun 3:00 0 S +# ... +# Zone NZ 12:00 NZ NZ%sT # New Zealand +# Zone NZ-CHAT 12:45 - NZ-CHAT # Chatham Island + +# From Arthur David Olson (1992-03-08): +# The chosen rules use the Davies October 8 values for the start of DST in 1989 +# rather than the October 1 value. + +# From Paul Eggert (1995-12-19); +# Shank & Pottenger report 2:00 for all autumn changes in Australia and NZ. +# Robert Uzgalis writes that the New Zealand Daylight +# Savings Time Order in Council dated 1990-06-18 specifies 2:00 standard +# time on both the first Sunday in October and the third Sunday in March. +# As with Australia, we'll assume the tradition is 2:00s, not 2:00. +# +# From Paul Eggert (2006-03-22): +# The Department of Internal Affairs (DIA) maintains a brief history, +# as does Carol Squires; see tz-link.htm for the full references. +# Use these sources in preference to Shanks & Pottenger. +# +# For Chatham, IATA SSIM (1991/1999) gives the NZ rules but with +# transitions at 2:45 local standard time; this confirms that Chatham +# is always exactly 45 minutes ahead of Auckland. + +# From Colin Sharples (2007-04-30): +# DST will now start on the last Sunday in September, and end on the +# first Sunday in April. The changes take effect this year, meaning +# that DST will begin on 2007-09-30 2008-04-06. +# http://www.dia.govt.nz/diawebsite.nsf/wpg_URL/Services-Daylight-Saving-Daylight-saving-to-be-extended + +# From Paul Eggert (2014-07-14): +# Chatham Island time was formally standardized on 1957-01-01 by +# New Zealand's Standard Time Amendment Act 1956 (1956-10-26). +# http://www.austlii.edu.au/nz/legis/hist_act/staa19561956n100244.pdf +# According to Google Books snippet view, a speaker in the New Zealand +# parliamentary debates in 1956 said "Clause 78 makes provision for standard +# time in the Chatham Islands. The time there is 45 minutes in advance of New +# Zealand time. I understand that is the time they keep locally, anyhow." +# For now, assume this practice goes back to the introduction of standard time +# in New Zealand, as this would make Chatham Islands time almost exactly match +# LMT back when New Zealand was at UTC+11:30; also, assume Chatham Islands did +# not observe New Zealand's prewar DST. + +############################################################################### + + +# Fiji + +# Howse writes (p 153) that in 1879 the British governor of Fiji +# enacted an ordinance standardizing the islands on Antipodean Time +# instead of the American system (which was one day behind). + +# From Rives McDow (1998-10-08): +# Fiji will introduce DST effective 0200 local time, 1998-11-01 +# until 0300 local time 1999-02-28. Each year the DST period will +# be from the first Sunday in November until the last Sunday in February. + +# From Paul Eggert (2000-01-08): +# IATA SSIM (1999-09) says DST ends 0100 local time. Go with McDow. + +# From the BBC World Service in +# http://news.bbc.co.uk/2/hi/asia-pacific/205226.stm (1998-10-31 16:03 UTC): +# The Fijian government says the main reasons for the time change is to +# improve productivity and reduce road accidents.... [T]he move is also +# intended to boost Fiji's ability to attract tourists to witness the dawning +# of the new millennium. + +# http://www.fiji.gov.fj/press/2000_09/2000_09_13-05.shtml (2000-09-13) +# reports that Fiji has discontinued DST. + + +# Kiribati + +# From Paul Eggert (1996-01-22): +# Today's _Wall Street Journal_ (page 1) reports that Kiribati +# "declared it the same day [throughout] the country as of Jan. 1, 1995" +# as part of the competition to be first into the 21st century. + + +# Kwajalein + +# In comp.risks 14.87 (26 August 1993), Peter Neumann writes: +# I wonder what happened in Kwajalein, where there was NO Friday, +# 1993-08-20. Thursday night at midnight Kwajalein switched sides with +# respect to the International Date Line, to rejoin its fellow islands, +# going from 11:59 p.m. Thursday to 12:00 m. Saturday in a blink. + + +# N Mariana Is, Guam + +# Howse writes (p 153) "The Spaniards, on the other hand, reached the +# Philippines and the Ladrones from America," and implies that the Ladrones +# (now called the Marianas) kept American date for quite some time. +# For now, we assume the Ladrones switched at the same time as the Philippines; +# see Asia/Manila. + +# US Public Law 106-564 (2000-12-23) made UTC+10 the official standard time, +# under the name "Chamorro Standard Time". There is no official abbreviation, +# but Congressman Robert A. Underwood, author of the bill that became law, +# wrote in a press release (2000-12-27) that he will seek the use of "ChST". + + +# Micronesia + +# Alan Eugene Davis writes (1996-03-16), +# "I am certain, having lived there for the past decade, that 'Truk' +# (now properly known as Chuuk) ... is in the time zone GMT+10." +# +# Shanks & Pottenger write that Truk switched from UTC+10 to UTC+11 +# on 1978-10-01; ignore this for now. + +# From Paul Eggert (1999-10-29): +# The Federated States of Micronesia Visitors Board writes in +# The Federated States of Micronesia - Visitor Information (1999-01-26) +# http://www.fsmgov.org/info/clocks.html +# that Truk and Yap are UTC+10, and Ponape and Kosrae are UTC+11. +# We don't know when Kosrae switched from UTC+12; assume January 1 for now. + + +# Midway + +# From Charles T O'Connor, KMTH DJ (1956), +# quoted in the KTMH section of the Radio Heritage Collection +# <http://radiodx.com/spdxr/KMTH.htm> (2002-12-31): +# For the past two months we've been on what is known as Daylight +# Saving Time. This time has put us on air at 5am in the morning, +# your time down there in New Zealand. Starting September 2, 1956 +# we'll again go back to Standard Time. This'll mean that we'll go to +# air at 6am your time. +# +# From Paul Eggert (2003-03-23): +# We don't know the date of that quote, but we'll guess they +# started DST on June 3. Possibly DST was observed other years +# in Midway, but we have no record of it. + +# Norfolk + +# From Alexander Krivenyshev (2015-09-23): +# Norfolk Island will change ... from +1130 to +1100: +# https://www.comlaw.gov.au/Details/F2015L01483/Explanatory%20Statement/Text +# ... at 12.30 am (by legal time in New South Wales) on 4 October 2015. +# http://www.norfolkisland.gov.nf/nia/MediaRelease/Media%20Release%20Norfolk%20Island%20Standard%20Time%20Change.pdf + +# From Paul Eggert (2015-09-23): +# Transitions before 2015 are from timeanddate.com, which consulted +# the Norfolk Island Museum and the Australian Bureau of Meteorology's +# Norfolk Island station, and found no record of Norfolk observing DST +# other than in 1974/5. See: +# http://www.timeanddate.com/time/australia/norfolk-island.html + +# Pitcairn + +# From Rives McDow (1999-11-08): +# A Proclamation was signed by the Governor of Pitcairn on the 27th March 1998 +# with regard to Pitcairn Standard Time. The Proclamation is as follows. +# +# The local time for general purposes in the Islands shall be +# Co-ordinated Universal time minus 8 hours and shall be known +# as Pitcairn Standard Time. +# +# ... I have also seen Pitcairn listed as UTC minus 9 hours in several +# references, and can only assume that this was an error in interpretation +# somehow in light of this proclamation. + +# From Rives McDow (1999-11-09): +# The Proclamation regarding Pitcairn time came into effect on 27 April 1998 +# ... at midnight. + +# From Howie Phelps (1999-11-10), who talked to a Pitcairner via shortwave: +# Betty Christian told me yesterday that their local time is the same as +# Pacific Standard Time. They used to be 1/2 hour different from us here in +# Sacramento but it was changed a couple of years ago. + + +# (Western) Samoa and American Samoa + +# Howse writes (p 153, citing p 10 of the 1883-11-18 New York Herald) +# that in 1879 the King of Samoa decided to change +# "the date in his kingdom from the Antipodean to the American system, +# ordaining - by a masterpiece of diplomatic flattery - that +# the Fourth of July should be celebrated twice in that year." + +# Although Shanks & Pottenger says they both switched to UTC-11:30 +# in 1911, and to UTC-11 in 1950. many earlier sources give UTC-11 +# for American Samoa, e.g., the US National Bureau of Standards +# circular "Standard Time Throughout the World", 1932. +# Assume American Samoa switched to UTC-11 in 1911, not 1950, +# and that after 1950 they agreed until (western) Samoa skipped a +# day in 2011. Assume also that the Samoas follow the US and New +# Zealand's "ST"/"DT" style of daylight-saving abbreviations. + +# Tonga + +# From Paul Eggert (1996-01-22): +# Today's _Wall Street Journal_ (p 1) reports that "Tonga has been plotting +# to sneak ahead of [New Zealanders] by introducing daylight-saving time." +# Since Kiribati has moved the Date Line it's not clear what Tonga will do. + +# Don Mundell writes in the 1997-02-20 Tonga Chronicle +# How Tonga became 'The Land where Time Begins': +# http://www.tongatapu.net.to/tonga/homeland/timebegins.htm +# +# Until 1941 Tonga maintained a standard time 50 minutes ahead of NZST +# 12 hours and 20 minutes ahead of GMT. When New Zealand adjusted its +# standard time in 1940s, Tonga had the choice of subtracting from its +# local time to come on the same standard time as New Zealand or of +# advancing its time to maintain the differential of 13 degrees +# (approximately 50 minutes ahead of New Zealand time). +# +# Because His Majesty King Tāufaʻāhau Tupou IV, then Crown Prince +# Tungī, preferred to ensure Tonga's title as the land where time +# begins, the Legislative Assembly approved the latter change. +# +# But some of the older, more conservative members from the outer +# islands objected. "If at midnight on Dec. 31, we move ahead 40 +# minutes, as your Royal Highness wishes, what becomes of the 40 +# minutes we have lost?" +# +# The Crown Prince, presented an unanswerable argument: "Remember that +# on the World Day of Prayer, you would be the first people on Earth +# to say your prayers in the morning." + +# From Paul Eggert (2006-03-22): +# Shanks & Pottenger say the transition was on 1968-10-01; go with Mundell. + +# From Eric Ulevik (1999-05-03): +# Tonga's director of tourism, who is also secretary of the National Millennium +# Committee, has a plan to get Tonga back in front. +# He has proposed a one-off move to tropical daylight saving for Tonga from +# October to March, which has won approval in principle from the Tongan +# Government. + +# From Steffen Thorsen (1999-09-09): +# * Tonga will introduce DST in November +# +# I was given this link by John Letts: +# http://news.bbc.co.uk/hi/english/world/asia-pacific/newsid_424000/424764.stm +# +# I have not been able to find exact dates for the transition in November +# yet. By reading this article it seems like Fiji will be 14 hours ahead +# of UTC as well, but as far as I know Fiji will only be 13 hours ahead +# (12 + 1 hour DST). + +# From Arthur David Olson (1999-09-20): +# According to <http://www.tongaonline.com/news/sept1799.html>: +# "Daylight Savings Time will take effect on Oct. 2 through April 15, 2000 +# and annually thereafter from the first Saturday in October through the +# third Saturday of April. Under the system approved by Privy Council on +# Sept. 10, clocks must be turned ahead one hour on the opening day and +# set back an hour on the closing date." +# Alas, no indication of the time of day. + +# From Rives McDow (1999-10-06): +# Tonga started its Daylight Saving on Saturday morning October 2nd at 0200am. +# Daylight Saving ends on April 16 at 0300am which is Sunday morning. + +# From Steffen Thorsen (2000-10-31): +# Back in March I found a notice on the website http://www.tongaonline.com +# that Tonga changed back to standard time one month early, on March 19 +# instead of the original reported date April 16. Unfortunately, the article +# is no longer available on the site, and I did not make a copy of the +# text, and I have forgotten to report it here. +# (Original URL was <http://www.tongaonline.com/news/march162000.htm>) + +# From Rives McDow (2000-12-01): +# Tonga is observing DST as of 2000-11-04 and will stop on 2001-01-27. + +# From Sione Moala-Mafi (2001-09-20) via Rives McDow: +# At 2:00am on the first Sunday of November, the standard time in the Kingdom +# shall be moved forward by one hour to 3:00am. At 2:00am on the last Sunday +# of January the standard time in the Kingdom shall be moved backward by one +# hour to 1:00am. + +# From Pulu 'Anau (2002-11-05): +# The law was for 3 years, supposedly to get renewed. It wasn't. + + +# Wake + +# From Vernice Anderson, Personal Secretary to Philip Jessup, +# US Ambassador At Large (oral history interview, 1971-02-02): +# +# Saturday, the 14th [of October, 1950] - ... The time was all the +# more confusing at that point, because we had crossed the +# International Date Line, thus getting two Sundays. Furthermore, we +# discovered that Wake Island had two hours of daylight saving time +# making calculation of time in Washington difficult if not almost +# impossible. +# +# http://www.trumanlibrary.org/wake/meeting.htm + +# From Paul Eggert (2003-03-23): +# We have no other report of DST in Wake Island, so omit this info for now. + +############################################################################### + +# The International Date Line + +# From Gwillim Law (2000-01-03): +# +# The International Date Line is not defined by any international standard, +# convention, or treaty. Mapmakers are free to draw it as they please. +# Reputable mapmakers will simply ensure that every point of land appears on +# the correct side of the IDL, according to the date legally observed there. +# +# When Kiribati adopted a uniform date in 1995, thereby moving the Phoenix and +# Line Islands to the west side of the IDL (or, if you prefer, moving the IDL +# to the east side of the Phoenix and Line Islands), I suppose that most +# mapmakers redrew the IDL following the boundary of Kiribati. Even that line +# has a rather arbitrary nature. The straight-line boundaries between Pacific +# island nations that are shown on many maps are based on an international +# convention, but are not legally binding national borders.... The date is +# governed by the IDL; therefore, even on the high seas, there may be some +# places as late as fourteen hours later than UTC. And, since the IDL is not +# an international standard, there are some places on the high seas where the +# correct date is ambiguous. + +# From Wikipedia <http://en.wikipedia.org/wiki/Time_zone> (2005-08-31): +# Before 1920, all ships kept local apparent time on the high seas by setting +# their clocks at night or at the morning sight so that, given the ship's +# speed and direction, it would be 12 o'clock when the Sun crossed the ship's +# meridian (12 o'clock = local apparent noon). During 1917, at the +# Anglo-French Conference on Time-keeping at Sea, it was recommended that all +# ships, both military and civilian, should adopt hourly standard time zones +# on the high seas. Whenever a ship was within the territorial waters of any +# nation it would use that nation's standard time. The captain was permitted +# to change his ship's clocks at a time of his choice following his ship's +# entry into another zone time - he often chose midnight. These zones were +# adopted by all major fleets between 1920 and 1925 but not by many +# independent merchant ships until World War II. + +# From Paul Eggert, using references suggested by Oscar van Vlijmen +# (2005-03-20): +# +# The American Practical Navigator (2002) +# http://pollux.nss.nima.mil/pubs/pubs_j_apn_sections.html?rid=187 +# talks only about the 180-degree meridian with respect to ships in +# international waters; it ignores the international date line. diff --git a/tz/backward b/tz/backward new file mode 100644 index 0000000..aab237a --- /dev/null +++ b/tz/backward @@ -0,0 +1,124 @@ +# This file is in the public domain, so clarified as of +# 2009-05-17 by Arthur David Olson. + +# This file provides links between current names for time zones +# and their old names. Many names changed in late 1993. + +# Link TARGET LINK-NAME +Link Africa/Nairobi Africa/Asmera +Link Africa/Abidjan Africa/Timbuktu +Link America/Argentina/Catamarca America/Argentina/ComodRivadavia +Link America/Adak America/Atka +Link America/Argentina/Buenos_Aires America/Buenos_Aires +Link America/Argentina/Catamarca America/Catamarca +Link America/Atikokan America/Coral_Harbour +Link America/Argentina/Cordoba America/Cordoba +Link America/Tijuana America/Ensenada +Link America/Indiana/Indianapolis America/Fort_Wayne +Link America/Indiana/Indianapolis America/Indianapolis +Link America/Argentina/Jujuy America/Jujuy +Link America/Indiana/Knox America/Knox_IN +Link America/Kentucky/Louisville America/Louisville +Link America/Argentina/Mendoza America/Mendoza +Link America/Toronto America/Montreal +Link America/Rio_Branco America/Porto_Acre +Link America/Argentina/Cordoba America/Rosario +Link America/Tijuana America/Santa_Isabel +Link America/Denver America/Shiprock +Link America/Port_of_Spain America/Virgin +Link Pacific/Auckland Antarctica/South_Pole +Link Asia/Ashgabat Asia/Ashkhabad +Link Asia/Kolkata Asia/Calcutta +Link Asia/Shanghai Asia/Chongqing +Link Asia/Shanghai Asia/Chungking +Link Asia/Dhaka Asia/Dacca +Link Asia/Shanghai Asia/Harbin +Link Asia/Urumqi Asia/Kashgar +Link Asia/Kathmandu Asia/Katmandu +Link Asia/Macau Asia/Macao +Link Asia/Ho_Chi_Minh Asia/Saigon +Link Asia/Jerusalem Asia/Tel_Aviv +Link Asia/Thimphu Asia/Thimbu +Link Asia/Makassar Asia/Ujung_Pandang +Link Asia/Ulaanbaatar Asia/Ulan_Bator +Link Atlantic/Faroe Atlantic/Faeroe +Link Europe/Oslo Atlantic/Jan_Mayen +Link Australia/Sydney Australia/ACT +Link Australia/Sydney Australia/Canberra +Link Australia/Lord_Howe Australia/LHI +Link Australia/Sydney Australia/NSW +Link Australia/Darwin Australia/North +Link Australia/Brisbane Australia/Queensland +Link Australia/Adelaide Australia/South +Link Australia/Hobart Australia/Tasmania +Link Australia/Melbourne Australia/Victoria +Link Australia/Perth Australia/West +Link Australia/Broken_Hill Australia/Yancowinna +Link America/Rio_Branco Brazil/Acre +Link America/Noronha Brazil/DeNoronha +Link America/Sao_Paulo Brazil/East +Link America/Manaus Brazil/West +Link America/Halifax Canada/Atlantic +Link America/Winnipeg Canada/Central +Link America/Regina Canada/East-Saskatchewan +Link America/Toronto Canada/Eastern +Link America/Edmonton Canada/Mountain +Link America/St_Johns Canada/Newfoundland +Link America/Vancouver Canada/Pacific +Link America/Regina Canada/Saskatchewan +Link America/Whitehorse Canada/Yukon +Link America/Santiago Chile/Continental +Link Pacific/Easter Chile/EasterIsland +Link America/Havana Cuba +Link Africa/Cairo Egypt +Link Europe/Dublin Eire +Link Europe/London Europe/Belfast +Link Europe/Chisinau Europe/Tiraspol +Link Europe/London GB +Link Europe/London GB-Eire +Link Etc/GMT GMT+0 +Link Etc/GMT GMT-0 +Link Etc/GMT GMT0 +Link Etc/GMT Greenwich +Link Asia/Hong_Kong Hongkong +Link Atlantic/Reykjavik Iceland +Link Asia/Tehran Iran +Link Asia/Jerusalem Israel +Link America/Jamaica Jamaica +Link Asia/Tokyo Japan +Link Pacific/Kwajalein Kwajalein +Link Africa/Tripoli Libya +Link America/Tijuana Mexico/BajaNorte +Link America/Mazatlan Mexico/BajaSur +Link America/Mexico_City Mexico/General +Link Pacific/Auckland NZ +Link Pacific/Chatham NZ-CHAT +Link America/Denver Navajo +Link Asia/Shanghai PRC +Link Pacific/Pohnpei Pacific/Ponape +Link Pacific/Pago_Pago Pacific/Samoa +Link Pacific/Chuuk Pacific/Truk +Link Pacific/Chuuk Pacific/Yap +Link Europe/Warsaw Poland +Link Europe/Lisbon Portugal +Link Asia/Taipei ROC +Link Asia/Seoul ROK +Link Asia/Singapore Singapore +Link Europe/Istanbul Turkey +Link Etc/UCT UCT +Link America/Anchorage US/Alaska +Link America/Adak US/Aleutian +Link America/Phoenix US/Arizona +Link America/Chicago US/Central +Link America/Indiana/Indianapolis US/East-Indiana +Link America/New_York US/Eastern +Link Pacific/Honolulu US/Hawaii +Link America/Indiana/Knox US/Indiana-Starke +Link America/Detroit US/Michigan +Link America/Denver US/Mountain +Link America/Los_Angeles US/Pacific +Link Pacific/Pago_Pago US/Samoa +Link Etc/UTC UTC +Link Etc/UTC Universal +Link Europe/Moscow W-SU +Link Etc/UTC Zulu diff --git a/tz/backzone b/tz/backzone new file mode 100644 index 0000000..13dc8d4 --- /dev/null +++ b/tz/backzone @@ -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 UTC to UTC+1 on 1963-12-15, +# a Google Books search says that London Calling, Issues 432-465 (1948), p 19, +# says that Spanish Guinea was at GMT+1 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 GMT+5 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+7 on 1945-09-02, when Vietnam did, and +# (2) they also reverted to UT+7 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+7 on 1955-04-15. +# Also, guess that Laos reverted to UT+7 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 diff --git a/tz/checklinks.awk b/tz/checklinks.awk new file mode 100644 index 0000000..5b3e157 --- /dev/null +++ b/tz/checklinks.awk @@ -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 +} diff --git a/tz/checktab.awk b/tz/checktab.awk new file mode 100644 index 0000000..2397673 --- /dev/null +++ b/tz/checktab.awk @@ -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 +} diff --git a/tz/date.1 b/tz/date.1 new file mode 100644 index 0000000..7fd4848 --- /dev/null +++ b/tz/date.1 @@ -0,0 +1,164 @@ +.TH DATE 1 +.SH NAME +date \- show and set date and time +.SH SYNOPSIS +.if n .nh +.if n .na +.ie \n(.g .ds - \f(CW-\fP +.el ds - \- +.B date +[ +.B \*-u +] [ +.B \*-c +] [ +.B \*-r +.I seconds +] [ +.BI + format +] [ +\fR[\fIyyyy\fR]\fImmddhhmm\fR[\fIyy\fR][\fB.\fIss\fR] +] +.SH DESCRIPTION +.ie '\(lq'' .ds lq \&"\" +.el .ds lq \(lq\" +.ie '\(rq'' .ds rq \&"\" +.el .ds rq \(rq\" +.de q +\\$3\*(lq\\$1\*(rq\\$2 +.. +.I Date +without arguments writes the date and time to the standard output in +the form +.ce 1 +Wed Mar 8 14:54:40 EST 1989 +.br +with +.B EST +replaced by the local time zone's abbreviation +(or by the abbreviation for the time zone specified in the +.B TZ +environment variable if set). +The exact output format depends on the locale. +.PP +If a command-line argument starts with a plus sign (\c +.q "\fB+\fP" ), +the rest of the argument is used as a +.I format +that controls what appears in the output. +In the format, when a percent sign (\c +.q "\fB%\fP" +appears, +it and the character after it are not output, +but rather identify part of the date or time +to be output in a particular way +(or identify a special character to output): +.nf +.sp +.if t .in +.5i +.if n .in +2 +.ta \w'%M\0\0'u +\w'Wed Mar 8 14:54:40 EST 1989\0\0'u + Sample output Explanation +%a Wed Abbreviated weekday name* +%A Wednesday Full weekday name* +%b Mar Abbreviated month name* +%B March Full month name* +%c Wed Mar 08 14:54:40 1989 Date and time* +%C 19 Century +%d 08 Day of month (always two digits) +%D 03/08/89 Month/day/year (eight characters) +%e 8 Day of month (leading zero blanked) +%h Mar Abbreviated month name* +%H 14 24-hour-clock hour (two digits) +%I 02 12-hour-clock hour (two digits) +%j 067 Julian day number (three digits) +%k 2 12-hour-clock hour (leading zero blanked) +%l 14 24-hour-clock hour (leading zero blanked) +%m 03 Month number (two digits) +%M 54 Minute (two digits) +%n \\n newline character +%p PM AM/PM designation +%r 02:54:40 PM Hour:minute:second AM/PM designation +%R 14:54 Hour:minute +%S 40 Second (two digits) +%t \\t tab character +%T 14:54:40 Hour:minute:second +%U 10 Sunday-based week number (two digits) +%w 3 Day number (one digit, Sunday is 0) +%W 10 Monday-based week number (two digits) +%x 03/08/89 Date* +%X 14:54:40 Time* +%y 89 Last two digits of year +%Y 1989 Year in full +%Z EST Time zone abbreviation +%+ Wed Mar 8 14:54:40 EST 1989 Default output format* +.if t .in -.5i +.if n .in -2 +* The exact output depends on the locale. +.sp +.fi +If a character other than one of those shown above appears after +a percent sign in the format, +that following character is output. +All other characters in the format are copied unchanged to the output; +a newline character is always added at the end of the output. +.PP +In Sunday-based week numbering, +the first Sunday of the year begins week 1; +days preceding it are part of +.q "week 0" . +In Monday-based week numbering, +the first Monday of the year begins week 1. +.PP +To set the date, use a command line argument with one of the following forms: +.nf +.if t .in +.5i +.if n .in +2 +.ta \w'198903081454\0'u +1454 24-hour-clock hours (first two digits) and minutes +081454 Month day (first two digits), hours, and minutes +03081454 Month (two digits, January is 01), month day, hours, minutes +8903081454 Year, month, month day, hours, minutes +0308145489 Month, month day, hours, minutes, year + (on System V-compatible systems) +030814541989 Month, month day, hours, minutes, four-digit year +198903081454 Four-digit year, month, month day, hours, minutes +.if t .in -.5i +.if n .in -2 +.fi +If the century, year, month, or month day is not given, +the current value is used. +Any of the above forms may be followed by a period and two digits that give +the seconds part of the new time; if no seconds are given, zero is assumed. +.PP +These options are available: +.TP +.BR \*-u " or " \*-c +Use Universal Time when setting and showing the date and time. +.TP +.BI "\*-r " seconds +Output the date that corresponds to +.I seconds +past the epoch of 1970-01-01 00:00:00 UTC, where +.I seconds +should be an integer, either decimal, octal (leading 0), or +hexadecimal (leading 0x), preceded by an optional sign. +.SH FILES +.ta \w'/usr/local/etc/zoneinfo/posixrules\0\0'u +/usr/lib/locale/\f2L\fP/LC_TIME description of time locale \f2L\fP +.br +/usr/local/etc/zoneinfo time zone information directory +.br +/usr/local/etc/zoneinfo/localtime local time zone file +.br +/usr/local/etc/zoneinfo/posixrules used with POSIX-style TZ's +.br +/usr/local/etc/zoneinfo/GMT for UTC leap seconds +.sp +If +.B /usr/local/etc/zoneinfo/GMT +is absent, +UTC leap seconds are loaded from +.BR /usr/local/etc/zoneinfo/posixrules . +.\" This file is in the public domain, so clarified as of +.\" 2009-05-17 by Arthur David Olson. diff --git a/tz/date.c b/tz/date.c new file mode 100644 index 0000000..4c11f61 --- /dev/null +++ b/tz/date.c @@ -0,0 +1,238 @@ +/* Display or set the current time and date. */ + +/* Copyright 1985, 1987, 1988 The Regents of the University of California. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. Neither the name of the University nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. */ + +#include "private.h" +#include "locale.h" + +/* +** The two things date knows about time are. . . +*/ + +#ifndef TM_YEAR_BASE +#define TM_YEAR_BASE 1900 +#endif /* !defined TM_YEAR_BASE */ + +#ifndef SECSPERMIN +#define SECSPERMIN 60 +#endif /* !defined SECSPERMIN */ + +#if !HAVE_POSIX_DECLS +extern char ** environ; +extern char * optarg; +extern int optind; +extern char * tzname[]; +#endif + +static int retval = EXIT_SUCCESS; + +static void display(const char *, time_t); +static void dogmt(void); +static void errensure(void); +static void timeout(FILE *, const char *, const struct tm *); +static void usage(void); + +int +main(const int argc, char *argv[]) +{ + register const char * format; + register const char * cp; + register int ch; + register bool rflag = false; + time_t t; + intmax_t secs; + char * endarg; + +#ifdef LC_ALL + setlocale(LC_ALL, ""); +#endif /* defined(LC_ALL) */ +#if HAVE_GETTEXT +#ifdef TZ_DOMAINDIR + bindtextdomain(TZ_DOMAIN, TZ_DOMAINDIR); +#endif /* defined(TEXTDOMAINDIR) */ + textdomain(TZ_DOMAIN); +#endif /* HAVE_GETTEXT */ + t = time(NULL); + format = NULL; + while ((ch = getopt(argc, argv, "ucr:")) != EOF && ch != -1) { + switch (ch) { + default: + usage(); + case 'u': /* do it in UT */ + case 'c': + dogmt(); + break; + case 'r': /* seconds since 1970 */ + if (rflag) { + fprintf(stderr, + _("date: error: multiple -r's used")); + usage(); + } + rflag = true; + errno = 0; + secs = strtoimax (optarg, &endarg, 0); + if (*endarg || optarg == endarg) + errno = EINVAL; + else if (! (time_t_min <= secs && secs <= time_t_max)) + errno = ERANGE; + if (errno) { + perror(optarg); + errensure(); + exit(retval); + } + t = secs; + break; + } + } + while (optind < argc) { + cp = argv[optind++]; + if (*cp == '+') + if (format == NULL) + format = cp + 1; + else { + fprintf(stderr, +_("date: error: multiple formats in command line\n")); + usage(); + } + else { + fprintf(stderr, _("date: unknown operand: %s\n"), cp); + usage(); + } + } + + display(format, t); + return retval; +} + +static void +dogmt(void) +{ + static char ** fakeenv; + + if (fakeenv == NULL) { + register int from; + register int to; + register int n; + static char tzegmt0[] = "TZ=GMT0"; + + for (n = 0; environ[n] != NULL; ++n) + continue; + fakeenv = malloc((n + 2) * sizeof *fakeenv); + if (fakeenv == NULL) { + perror(_("Memory exhausted")); + errensure(); + exit(retval); + } + to = 0; + fakeenv[to++] = tzegmt0; + for (from = 1; environ[from] != NULL; ++from) + if (strncmp(environ[from], "TZ=", 3) != 0) + fakeenv[to++] = environ[from]; + fakeenv[to] = NULL; + environ = fakeenv; + } +} + +static void +errensure(void) +{ + if (retval == EXIT_SUCCESS) + retval = EXIT_FAILURE; +} + +static void +usage(void) +{ + fprintf(stderr, + _("date: usage: date [-u] [-c] [-r seconds]" + " [+format]\n")); + errensure(); + exit(retval); +} + +static void +display(char const *format, time_t now) +{ + struct tm *tmp; + + tmp = localtime(&now); + if (!tmp) { + fprintf(stderr, + _("date: error: time out of range\n")); + errensure(); + return; + } + timeout(stdout, format ? format : "%+", tmp); + putchar('\n'); + fflush(stdout); + fflush(stderr); + if (ferror(stdout) || ferror(stderr)) { + fprintf(stderr, + _("date: error: couldn't write results\n")); + errensure(); + } +} + +#define INCR 1024 + +static void +timeout(FILE *fp, char const *format, struct tm const *tmp) +{ + char * cp; + size_t result; + size_t size; + struct tm tm; + + if (*format == '\0') + return; + if (!tmp) { + fprintf(stderr, _("date: error: time out of range\n")); + errensure(); + return; + } + tm = *tmp; + tmp = &tm; + size = INCR; + cp = malloc(size); + for ( ; ; ) { + if (cp == NULL) { + fprintf(stderr, + _("date: error: can't get memory\n")); + errensure(); + exit(retval); + } + cp[0] = '\1'; + result = strftime(cp, size, format, tmp); + if (result != 0 || cp[0] == '\0') + break; + size += INCR; + cp = realloc(cp, size); + } + fwrite(cp, 1, result, fp); + free(cp); +} diff --git a/tz/difftime.c b/tz/difftime.c new file mode 100644 index 0000000..ba2fd03 --- /dev/null +++ b/tz/difftime.c @@ -0,0 +1,58 @@ +/* +** This file is in the public domain, so clarified as of +** 1996-06-05 by Arthur David Olson. +*/ + +/*LINTLIBRARY*/ + +#include "private.h" /* for time_t and TYPE_SIGNED */ + +/* Return -X as a double. Using this avoids casting to 'double'. */ +static double +dminus(double x) +{ + return -x; +} + +double ATTRIBUTE_CONST +difftime(time_t time1, time_t time0) +{ + /* + ** If double is large enough, simply convert and subtract + ** (assuming that the larger type has more precision). + */ + if (sizeof (time_t) < sizeof (double)) { + double t1 = time1, t0 = time0; + return t1 - t0; + } + + /* + ** The difference of two unsigned values can't overflow + ** if the minuend is greater than or equal to the subtrahend. + */ + if (!TYPE_SIGNED(time_t)) + return time0 <= time1 ? time1 - time0 : dminus(time0 - time1); + + /* Use uintmax_t if wide enough. */ + if (sizeof (time_t) <= sizeof (uintmax_t)) { + uintmax_t t1 = time1, t0 = time0; + return time0 <= time1 ? t1 - t0 : dminus(t0 - t1); + } + + /* + ** Handle cases where both time1 and time0 have the same sign + ** (meaning that their difference cannot overflow). + */ + if ((time1 < 0) == (time0 < 0)) + return time1 - time0; + + /* + ** The values have opposite signs and uintmax_t is too narrow. + ** This suffers from double rounding; attempt to lessen that + ** by using long double temporaries. + */ + { + long double t1 = time1, t0 = time0; + return t1 - t0; + } +} diff --git a/tz/etcetera b/tz/etcetera new file mode 100644 index 0000000..c2e2532 --- /dev/null +++ b/tz/etcetera @@ -0,0 +1,80 @@ +# This file is in the public domain, so clarified as of +# 2009-05-17 by Arthur David Olson. + +# These entries are mostly present for historical reasons, so that +# people in areas not otherwise covered by the tz files could "zic -l" +# to a time zone that was right for their area. These days, the +# tz files cover almost all the inhabited world, and the only practical +# need now for the entries that are not on UTC are for ships at sea +# that cannot use POSIX TZ settings. + +Zone Etc/GMT 0 - GMT +Zone Etc/UTC 0 - UTC +Zone Etc/UCT 0 - UCT + +# The following link uses older naming conventions, +# but it belongs here, not in the file 'backward', +# as functions like gmtime load the "GMT" file to handle leap seconds properly. +# We want this to work even on installations that omit the other older names. +Link Etc/GMT GMT + +Link Etc/UTC Etc/Universal +Link Etc/UTC Etc/Zulu + +Link Etc/GMT Etc/Greenwich +Link Etc/GMT Etc/GMT-0 +Link Etc/GMT Etc/GMT+0 +Link Etc/GMT Etc/GMT0 + +# We use POSIX-style signs in the Zone names and the output abbreviations, +# even though this is the opposite of what many people expect. +# POSIX has positive signs west of Greenwich, but many people expect +# positive signs east of Greenwich. For example, TZ='Etc/GMT+4' uses +# the abbreviation "GMT+4" and corresponds to 4 hours behind UT +# (i.e. west of Greenwich) even though many people would expect it to +# mean 4 hours ahead of UT (i.e. east of Greenwich). +# +# In the draft 5 of POSIX 1003.1-200x, the angle bracket notation allows for +# TZ='<GMT-4>+4'; if you want time zone abbreviations conforming to +# ISO 8601 you can use TZ='<-0400>+4'. Thus the commonly-expected +# offset is kept within the angle bracket (and is used for display) +# while the POSIX sign is kept outside the angle bracket (and is used +# for calculation). +# +# Do not use a TZ setting like TZ='GMT+4', which is four hours behind +# GMT but uses the completely misleading abbreviation "GMT". + +# Earlier incarnations of this package were not POSIX-compliant, +# and had lines such as +# Zone GMT-12 -12 - GMT-1200 +# We did not want things to change quietly if someone accustomed to the old +# way does a +# zic -l GMT-12 +# so we moved the names into the Etc subdirectory. + +Zone Etc/GMT-14 14 - GMT-14 # 14 hours ahead of GMT +Zone Etc/GMT-13 13 - GMT-13 +Zone Etc/GMT-12 12 - GMT-12 +Zone Etc/GMT-11 11 - GMT-11 +Zone Etc/GMT-10 10 - GMT-10 +Zone Etc/GMT-9 9 - GMT-9 +Zone Etc/GMT-8 8 - GMT-8 +Zone Etc/GMT-7 7 - GMT-7 +Zone Etc/GMT-6 6 - GMT-6 +Zone Etc/GMT-5 5 - GMT-5 +Zone Etc/GMT-4 4 - GMT-4 +Zone Etc/GMT-3 3 - GMT-3 +Zone Etc/GMT-2 2 - GMT-2 +Zone Etc/GMT-1 1 - GMT-1 +Zone Etc/GMT+1 -1 - GMT+1 +Zone Etc/GMT+2 -2 - GMT+2 +Zone Etc/GMT+3 -3 - GMT+3 +Zone Etc/GMT+4 -4 - GMT+4 +Zone Etc/GMT+5 -5 - GMT+5 +Zone Etc/GMT+6 -6 - GMT+6 +Zone Etc/GMT+7 -7 - GMT+7 +Zone Etc/GMT+8 -8 - GMT+8 +Zone Etc/GMT+9 -9 - GMT+9 +Zone Etc/GMT+10 -10 - GMT+10 +Zone Etc/GMT+11 -11 - GMT+11 +Zone Etc/GMT+12 -12 - GMT+12 diff --git a/tz/europe b/tz/europe new file mode 100644 index 0000000..cd3a088 --- /dev/null +++ b/tz/europe @@ -0,0 +1,3734 @@ +# This file is in the public domain, so clarified as of +# 2009-05-17 by Arthur David Olson. + +# This file is by no means authoritative; if you think you know better, +# go ahead and edit the file (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): +# +# 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. +# +# Gwillim Law writes that a good source +# for recent time zone data is the International Air Transport +# Association's Standard Schedules Information Manual (IATA SSIM), +# published semiannually. Law sent in several helpful summaries +# of the IATA's data after 1990. Except where otherwise noted, +# IATA SSIM is the source for entries after 1990. +# +# A reliable and entertaining source about time zones is +# Derek Howse, Greenwich time and longitude, Philip Wilson Publishers (1997). +# +# Except where otherwise noted, Shanks & Pottenger is the source for +# entries through 1991, and IATA SSIM is the source for entries afterwards. +# +# Other sources occasionally used include: +# +# Edward W. Whitman, World Time Differences, +# Whitman Publishing Co, 2 Niagara Av, Ealing, London (undated), +# which I found in the UCLA library. +# +# William Willett, The Waste of Daylight, 19th edition +# <http://cs.ucla.edu/~eggert/The-Waste-of-Daylight-19th.pdf> +# [PDF] (1914-03) +# +# Milne J. Civil time. Geogr J. 1899 Feb;13(2):173-94 +# <http://www.jstor.org/stable/1774359>. He writes: +# "It is requested that corrections and additions to these tables +# may be sent to Mr. John Milne, Royal Geographical Society, +# Savile Row, London." Nowadays please email them to tz@iana.org. +# +# Byalokoz EL. New Counting of Time in Russia since July 1, 1919. +# This Russian-language source was consulted by Vladimir Karpinsky; see +# http://mm.icann.org/pipermail/tz/2014-August/021320.html +# The full Russian citation is: +# Бялокоз, Евгений Людвигович. Новый счет времени в течении суток +# введенный декретом Совета народных комиссаров для всей России с 1-го +# июля 1919 г. / Изд. 2-е Междуведомственной комиссии. - Петроград: +# Десятая гос. тип., 1919. +# http://resolver.gpntb.ru/purl?docushare/dsweb/Get/Resource-2011/Byalokoz__E.L.__Novyy__schet__vremeni__v__techenie__sutok__izd__2(1).pdf +# +# Brazil's Divisão Serviço da Hora (DSHO), +# History of Summer Time +# <http://pcdsh01.on.br/HISTHV.htm> +# (1998-09-21, in Portuguese) + +# +# I invented the abbreviations marked '*' in the following table; +# the rest are from earlier versions of this file, or from other sources. +# Corrections are welcome! +# std dst 2dst +# LMT Local Mean Time +# -4:00 AST ADT Atlantic +# -3:00 WGT WGST Western Greenland* +# -1:00 EGT EGST Eastern Greenland* +# 0:00 GMT BST BDST Greenwich, British Summer +# 0:00 GMT IST Greenwich, Irish Summer +# 0:00 WET WEST WEMT Western Europe +# 0:19:32.13 AMT NST Amsterdam, Netherlands Summer (1835-1937)* +# 0:20 NET NEST Netherlands (1937-1940)* +# 1:00 BST British Standard (1968-1971) +# 1:00 CET CEST CEMT Central Europe +# 1:00:14 SET Swedish (1879-1899)* +# 2:00 EET EEST Eastern Europe +# 3:00 FET Further-eastern Europe (2011-2014)* +# 3:00 MSK MSD MSM* Minsk, Moscow + +# From Peter Ilieve (1994-12-04), +# The original six [EU members]: Belgium, France, (West) Germany, Italy, +# Luxembourg, the Netherlands. +# Plus, from 1 Jan 73: Denmark, Ireland, United Kingdom. +# Plus, from 1 Jan 81: Greece. +# Plus, from 1 Jan 86: Spain, Portugal. +# Plus, from 1 Jan 95: Austria, Finland, Sweden. (Norway negotiated terms for +# entry but in a referendum on 28 Nov 94 the people voted No by 52.2% to 47.8% +# on a turnout of 88.6%. This was almost the same result as Norway's previous +# referendum in 1972, they are the only country to have said No twice. +# Referendums in the other three countries voted Yes.) +# ... +# Estonia ... uses EU dates but not at 01:00 GMT, they use midnight GMT. +# I don't think they know yet what they will do from 1996 onwards. +# ... +# There shouldn't be any [current members who are not using EU rules]. +# A Directive has the force of law, member states are obliged to enact +# national law to implement it. The only contentious issue was the +# different end date for the UK and Ireland, and this was always allowed +# in the Directive. + + +############################################################################### + +# Britain (United Kingdom) and Ireland (Eire) + +# From Peter Ilieve (1994-07-06): +# +# On 17 Jan 1994 the Independent, a UK quality newspaper, had a piece about +# historical vistas along the Thames in west London. There was a photo +# and a sketch map showing some of the sightlines involved. One paragraph +# of the text said: +# +# 'An old stone obelisk marking a forgotten terrestrial meridian stands +# beside the river at Kew. In the 18th century, before time and longitude +# was standardised by the Royal Observatory in Greenwich, scholars observed +# this stone and the movement of stars from Kew Observatory nearby. They +# made their calculations and set the time for the Horse Guards and Parliament, +# but now the stone is obscured by scrubwood and can only be seen by walking +# along the towpath within a few yards of it.' +# +# I have a one inch to one mile map of London and my estimate of the stone's +# position is 51 degrees 28' 30" N, 0 degrees 18' 45" W. The longitude should +# be within about +-2". The Ordnance Survey grid reference is TQ172761. +# +# [This yields GMTOFF = -0:01:15 for London LMT in the 18th century.] + +# From Paul Eggert (1993-11-18): +# +# Howse writes that Britain was the first country to use standard time. +# The railways cared most about the inconsistencies of local mean time, +# and it was they who forced a uniform time on the country. +# The original idea was credited to Dr. William Hyde Wollaston (1766-1828) +# and was popularized by Abraham Follett Osler (1808-1903). +# The first railway to adopt London time was the Great Western Railway +# in November 1840; other railways followed suit, and by 1847 most +# (though not all) railways used London time. On 1847-09-22 the +# Railway Clearing House, an industry standards body, recommended that GMT be +# adopted at all stations as soon as the General Post Office permitted it. +# The transition occurred on 12-01 for the L&NW, the Caledonian, +# and presumably other railways; the January 1848 Bradshaw's lists many +# railways as using GMT. By 1855 the vast majority of public +# clocks in Britain were set to GMT (though some, like the great clock +# on Tom Tower at Christ Church, Oxford, were fitted with two minute hands, +# one for local time and one for GMT). The last major holdout was the legal +# system, which stubbornly stuck to local time for many years, leading +# to oddities like polls opening at 08:13 and closing at 16:13. +# The legal system finally switched to GMT when the Statutes (Definition +# of Time) Act took effect; it received the Royal Assent on 1880-08-02. +# +# In the tables below, we condense this complicated story into a single +# transition date for London, namely 1847-12-01. We don't know as much +# about Dublin, so we use 1880-08-02, the legal transition time. + +# From Paul Eggert (2014-07-19): +# The ancients had no need for daylight saving, as they kept time +# informally or via hours whose length depended on the time of year. +# Daylight saving time in its modern sense was invented by the +# New Zealand entomologist George Vernon Hudson (1867-1946), +# whose day job as a postal clerk led him to value +# after-hours daylight in which to pursue his research. +# In 1895 he presented a paper to the Wellington Philosophical Society +# that proposed a two-hour daylight-saving shift. See: +# Hudson GV. On seasonal time-adjustment in countries south of lat. 30 deg. +# Transactions and Proceedings of the New Zealand Institute. 1895;28:734 +# http://rsnz.natlib.govt.nz/volume/rsnz_28/rsnz_28_00_006110.html +# Although some interest was expressed in New Zealand, his proposal +# did not find its way into law and eventually it was almost forgotten. +# +# In England, DST was independently reinvented by William Willett (1857-1915), +# a London builder and member of the Royal Astronomical Society +# who circulated a pamphlet "The Waste of Daylight" (1907) +# that proposed advancing clocks 20 minutes on each of four Sundays in April, +# and retarding them by the same amount on four Sundays in September. +# A bill was drafted in 1909 and introduced in Parliament several times, +# but it met with ridicule and opposition, especially from farming interests. +# Later editions of the pamphlet proposed one-hour summer time, and +# it was eventually adopted as a wartime measure in 1916. +# See: Summer Time Arrives Early, The Times (2000-05-18). +# A monument to Willett was unveiled on 1927-05-21, in an open space in +# a 45-acre wood near Chislehurst, Kent that was purchased by popular +# subscription and open to the public. On the south face of the monolith, +# designed by G. W. Miller, is the William Willett Memorial Sundial, +# which is permanently set to Summer Time. + +# From Winston Churchill (1934-04-28): +# It is one of the paradoxes of history that we should owe the boon of +# summer time, which gives every year to the people of this country +# between 160 and 170 hours more daylight leisure, to a war which +# plunged Europe into darkness for four years, and shook the +# foundations of civilization throughout the world. +# -- "A Silent Toast to William Willett", Pictorial Weekly; +# republished in Finest Hour (Spring 2002) 1(114):26 +# http://www.winstonchurchill.org/images/finesthour/Vol.01%20No.114.pdf + +# From Paul Eggert (2015-08-08): +# The OED Supplement says that the English originally said "Daylight Saving" +# when they were debating the adoption of DST in 1908; but by 1916 this +# term appears only in quotes taken from DST's opponents, whereas the +# proponents (who eventually won the argument) are quoted as using "Summer". +# The term "Summer Time" was introduced by Herbert Samuel, Home Secretary; see: +# Viscount Samuel. Leisure in a Democracy. Cambridge University Press +# ISBN 978-1-107-49471-8 (1949, reissued 2015), p 8. + +# From Arthur David Olson (1989-01-19): +# A source at the British Information Office in New York avers that it's +# known as "British" Summer Time in all parts of the United Kingdom. + +# Date: 4 Jan 89 08:57:25 GMT (Wed) +# From: Jonathan Leffler +# [British Summer Time] is fixed annually by Act of Parliament. +# If you can predict what Parliament will do, you should be in +# politics making a fortune, not computing. + +# From Chris Carrier (1996-06-14): +# I remember reading in various wartime issues of the London Times the +# acronym BDST for British Double Summer Time. Look for the published +# time of sunrise and sunset in The Times, when BDST was in effect, and +# if you find a zone reference it will say, "All times B.D.S.T." + +# From Joseph S. Myers (1999-09-02): +# ... some military cables (WO 219/4100 - this is a copy from the +# main SHAEF archives held in the US National Archives, SHAEF/5252/8/516) +# agree that the usage is BDST (this appears in a message dated 17 Feb 1945). + +# From Joseph S. Myers (2000-10-03): +# On 18th April 1941, Sir Stephen Tallents of the BBC wrote to Sir +# Alexander Maxwell of the Home Office asking whether there was any +# official designation; the reply of the 21st was that there wasn't +# but he couldn't think of anything better than the "Double British +# Summer Time" that the BBC had been using informally. +# http://www.polyomino.org.uk/british-time/bbc-19410418.png +# http://www.polyomino.org.uk/british-time/ho-19410421.png + +# From Sir Alexander Maxwell in the above-mentioned letter (1941-04-21): +# [N]o official designation has as far as I know been adopted for the time +# which is to be introduced in May.... +# I cannot think of anything better than "Double British Summer Time" +# which could not be said to run counter to any official description. + +# From Paul Eggert (2000-10-02): +# Howse writes (p 157) 'DBST' too, but 'BDST' seems to have been common +# and follows the more usual convention of putting the location name first, +# so we use 'BDST'. + +# Peter Ilieve (1998-04-19) described at length +# the history of summer time legislation in the United Kingdom. +# Since 1998 Joseph S. Myers has been updating +# and extending this list, which can be found in +# http://www.polyomino.org.uk/british-time/ + +# From Joseph S. Myers (1998-01-06): +# +# The legal time in the UK outside of summer time is definitely GMT, not UTC; +# see Lord Tanlaw's speech +# http://www.publications.parliament.uk/pa/ld199798/ldhansrd/vo970611/text/70611-10.htm#70611-10_head0 +# (Lords Hansard 11 June 1997 columns 964 to 976). + +# From Paul Eggert (2006-03-22): +# +# For lack of other data, follow Shanks & Pottenger for Eire in 1940-1948. +# +# Given Ilieve and Myers's data, the following claims by Shanks & Pottenger +# are incorrect: +# * Wales did not switch from GMT to daylight saving time until +# 1921 Apr 3, when they began to conform with the rest of Great Britain. +# Actually, Wales was identical after 1880. +# * Eire had two transitions on 1916 Oct 1. +# It actually just had one transition. +# * Northern Ireland used single daylight saving time throughout WW II. +# Actually, it conformed to Britain. +# * GB-Eire changed standard time to 1 hour ahead of GMT on 1968-02-18. +# Actually, that date saw the usual switch to summer time. +# Standard time was not changed until 1968-10-27 (the clocks didn't change). +# +# Here is another incorrect claim by Shanks & Pottenger: +# * Jersey, Guernsey, and the Isle of Man did not switch from GMT +# to daylight saving time until 1921 Apr 3, when they began to +# conform with Great Britain. +# S.R.&O. 1916, No. 382 and HO 45/10811/312364 (quoted above) say otherwise. +# +# The following claim by Shanks & Pottenger is possible though doubtful; +# we'll ignore it for now. +# * Dublin's 1971-10-31 switch was at 02:00, even though London's was 03:00. +# +# +# Whitman says Dublin Mean Time was -0:25:21, which is more precise than +# Shanks & Pottenger. +# Perhaps this was Dunsink Observatory Time, as Dunsink Observatory +# (8 km NW of Dublin's center) seemingly was to Dublin as Greenwich was +# to London. For example: +# +# "Timeball on the ballast office is down. Dunsink time." +# -- James Joyce, Ulysses + +# "Countess Markievicz ... claimed that the [1916] abolition of Dublin Mean Time +# was among various actions undertaken by the 'English' government that +# would 'put the whole country into the SF (Sinn Féin) camp'. She claimed +# Irish 'public feeling (was) outraged by forcing of English time on us'." +# -- Parsons M. Dublin lost its time zone - and 25 minutes - after 1916 Rising. +# Irish Times 2014-10-27. +# http://www.irishtimes.com/news/politics/dublin-lost-its-time-zone-and-25-minutes-after-1916-rising-1.1977411 + +# From Joseph S. Myers (2005-01-26): +# Irish laws are available online at <http://www.irishstatutebook.ie>. +# These include various relating to legal time, for example: +# +# ZZA13Y1923.html ZZA12Y1924.html ZZA8Y1925.html ZZSIV20PG1267.html +# +# ZZSI71Y1947.html ZZSI128Y1948.html ZZSI23Y1949.html ZZSI41Y1950.html +# ZZSI27Y1951.html ZZSI73Y1952.html +# +# ZZSI11Y1961.html ZZSI232Y1961.html ZZSI182Y1962.html +# ZZSI167Y1963.html ZZSI257Y1964.html ZZSI198Y1967.html +# ZZA23Y1968.html ZZA17Y1971.html +# +# ZZSI67Y1981.html ZZSI212Y1982.html ZZSI45Y1986.html +# ZZSI264Y1988.html ZZSI52Y1990.html ZZSI371Y1992.html +# ZZSI395Y1994.html ZZSI484Y1997.html ZZSI506Y2001.html +# +# [These are all relative to the root, e.g., the first is +# <http://www.irishstatutebook.ie/ZZA13Y1923.html>.] +# +# (These are those I found, but there could be more. In any case these +# should allow various updates to the comments in the europe file to cover +# the laws applicable in Ireland.) +# +# (Note that the time in the Republic of Ireland since 1968 has been defined +# in terms of standard time being GMT+1 with a period of winter time when it +# is GMT, rather than standard time being GMT with a period of summer time +# being GMT+1.) + +# From Paul Eggert (1999-03-28): +# Clive Feather (<news:859845706.26043.0@office.demon.net>, 1997-03-31) +# reports that Folkestone (Cheriton) Shuttle Terminal uses Concession Time +# (CT), equivalent to French civil time. +# Julian Hill (<news:36118128.5A14@virgin.net>, 1998-09-30) reports that +# trains between Dollands Moor (the freight facility next door) +# and Frethun run in CT. +# My admittedly uninformed guess is that the terminal has two authorities, +# the French concession operators and the British civil authorities, +# and that the time depends on who you're talking to. +# If, say, the British police were called to the station for some reason, +# I would expect the official police report to use GMT/BST and not CET/CEST. +# This is a borderline case, but for now let's stick to GMT/BST. + +# From an anonymous contributor (1996-06-02): +# The law governing time in Ireland is under Statutory Instrument SI 395/94, +# which gives force to European Union 7th Council Directive No. 94/21/EC. +# Under this directive, the Minister for Justice in Ireland makes appropriate +# regulations. I spoke this morning with the Secretary of the Department of +# Justice (tel +353 1 678 9711) who confirmed to me that the correct name is +# "Irish Summer Time", abbreviated to "IST". + +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +# Summer Time Act, 1916 +Rule GB-Eire 1916 only - May 21 2:00s 1:00 BST +Rule GB-Eire 1916 only - Oct 1 2:00s 0 GMT +# S.R.&O. 1917, No. 358 +Rule GB-Eire 1917 only - Apr 8 2:00s 1:00 BST +Rule GB-Eire 1917 only - Sep 17 2:00s 0 GMT +# S.R.&O. 1918, No. 274 +Rule GB-Eire 1918 only - Mar 24 2:00s 1:00 BST +Rule GB-Eire 1918 only - Sep 30 2:00s 0 GMT +# S.R.&O. 1919, No. 297 +Rule GB-Eire 1919 only - Mar 30 2:00s 1:00 BST +Rule GB-Eire 1919 only - Sep 29 2:00s 0 GMT +# S.R.&O. 1920, No. 458 +Rule GB-Eire 1920 only - Mar 28 2:00s 1:00 BST +# S.R.&O. 1920, No. 1844 +Rule GB-Eire 1920 only - Oct 25 2:00s 0 GMT +# S.R.&O. 1921, No. 363 +Rule GB-Eire 1921 only - Apr 3 2:00s 1:00 BST +Rule GB-Eire 1921 only - Oct 3 2:00s 0 GMT +# S.R.&O. 1922, No. 264 +Rule GB-Eire 1922 only - Mar 26 2:00s 1:00 BST +Rule GB-Eire 1922 only - Oct 8 2:00s 0 GMT +# The Summer Time Act, 1922 +Rule GB-Eire 1923 only - Apr Sun>=16 2:00s 1:00 BST +Rule GB-Eire 1923 1924 - Sep Sun>=16 2:00s 0 GMT +Rule GB-Eire 1924 only - Apr Sun>=9 2:00s 1:00 BST +Rule GB-Eire 1925 1926 - Apr Sun>=16 2:00s 1:00 BST +# The Summer Time Act, 1925 +Rule GB-Eire 1925 1938 - Oct Sun>=2 2:00s 0 GMT +Rule GB-Eire 1927 only - Apr Sun>=9 2:00s 1:00 BST +Rule GB-Eire 1928 1929 - Apr Sun>=16 2:00s 1:00 BST +Rule GB-Eire 1930 only - Apr Sun>=9 2:00s 1:00 BST +Rule GB-Eire 1931 1932 - Apr Sun>=16 2:00s 1:00 BST +Rule GB-Eire 1933 only - Apr Sun>=9 2:00s 1:00 BST +Rule GB-Eire 1934 only - Apr Sun>=16 2:00s 1:00 BST +Rule GB-Eire 1935 only - Apr Sun>=9 2:00s 1:00 BST +Rule GB-Eire 1936 1937 - Apr Sun>=16 2:00s 1:00 BST +Rule GB-Eire 1938 only - Apr Sun>=9 2:00s 1:00 BST +Rule GB-Eire 1939 only - Apr Sun>=16 2:00s 1:00 BST +# S.R.&O. 1939, No. 1379 +Rule GB-Eire 1939 only - Nov Sun>=16 2:00s 0 GMT +# S.R.&O. 1940, No. 172 and No. 1883 +Rule GB-Eire 1940 only - Feb Sun>=23 2:00s 1:00 BST +# S.R.&O. 1941, No. 476 +Rule GB-Eire 1941 only - May Sun>=2 1:00s 2:00 BDST +Rule GB-Eire 1941 1943 - Aug Sun>=9 1:00s 1:00 BST +# S.R.&O. 1942, No. 506 +Rule GB-Eire 1942 1944 - Apr Sun>=2 1:00s 2:00 BDST +# S.R.&O. 1944, No. 932 +Rule GB-Eire 1944 only - Sep Sun>=16 1:00s 1:00 BST +# S.R.&O. 1945, No. 312 +Rule GB-Eire 1945 only - Apr Mon>=2 1:00s 2:00 BDST +Rule GB-Eire 1945 only - Jul Sun>=9 1:00s 1:00 BST +# S.R.&O. 1945, No. 1208 +Rule GB-Eire 1945 1946 - Oct Sun>=2 2:00s 0 GMT +Rule GB-Eire 1946 only - Apr Sun>=9 2:00s 1:00 BST +# The Summer Time Act, 1947 +Rule GB-Eire 1947 only - Mar 16 2:00s 1:00 BST +Rule GB-Eire 1947 only - Apr 13 1:00s 2:00 BDST +Rule GB-Eire 1947 only - Aug 10 1:00s 1:00 BST +Rule GB-Eire 1947 only - Nov 2 2:00s 0 GMT +# Summer Time Order, 1948 (S.I. 1948/495) +Rule GB-Eire 1948 only - Mar 14 2:00s 1:00 BST +Rule GB-Eire 1948 only - Oct 31 2:00s 0 GMT +# Summer Time Order, 1949 (S.I. 1949/373) +Rule GB-Eire 1949 only - Apr 3 2:00s 1:00 BST +Rule GB-Eire 1949 only - Oct 30 2:00s 0 GMT +# Summer Time Order, 1950 (S.I. 1950/518) +# Summer Time Order, 1951 (S.I. 1951/430) +# Summer Time Order, 1952 (S.I. 1952/451) +Rule GB-Eire 1950 1952 - Apr Sun>=14 2:00s 1:00 BST +Rule GB-Eire 1950 1952 - Oct Sun>=21 2:00s 0 GMT +# revert to the rules of the Summer Time Act, 1925 +Rule GB-Eire 1953 only - Apr Sun>=16 2:00s 1:00 BST +Rule GB-Eire 1953 1960 - Oct Sun>=2 2:00s 0 GMT +Rule GB-Eire 1954 only - Apr Sun>=9 2:00s 1:00 BST +Rule GB-Eire 1955 1956 - Apr Sun>=16 2:00s 1:00 BST +Rule GB-Eire 1957 only - Apr Sun>=9 2:00s 1:00 BST +Rule GB-Eire 1958 1959 - Apr Sun>=16 2:00s 1:00 BST +Rule GB-Eire 1960 only - Apr Sun>=9 2:00s 1:00 BST +# Summer Time Order, 1961 (S.I. 1961/71) +# Summer Time (1962) Order, 1961 (S.I. 1961/2465) +# Summer Time Order, 1963 (S.I. 1963/81) +Rule GB-Eire 1961 1963 - Mar lastSun 2:00s 1:00 BST +Rule GB-Eire 1961 1968 - Oct Sun>=23 2:00s 0 GMT +# Summer Time (1964) Order, 1963 (S.I. 1963/2101) +# Summer Time Order, 1964 (S.I. 1964/1201) +# Summer Time Order, 1967 (S.I. 1967/1148) +Rule GB-Eire 1964 1967 - Mar Sun>=19 2:00s 1:00 BST +# Summer Time Order, 1968 (S.I. 1968/117) +Rule GB-Eire 1968 only - Feb 18 2:00s 1:00 BST +# The British Standard Time Act, 1968 +# (no summer time) +# The Summer Time Act, 1972 +Rule GB-Eire 1972 1980 - Mar Sun>=16 2:00s 1:00 BST +Rule GB-Eire 1972 1980 - Oct Sun>=23 2:00s 0 GMT +# Summer Time Order, 1980 (S.I. 1980/1089) +# Summer Time Order, 1982 (S.I. 1982/1673) +# Summer Time Order, 1986 (S.I. 1986/223) +# Summer Time Order, 1988 (S.I. 1988/931) +Rule GB-Eire 1981 1995 - Mar lastSun 1:00u 1:00 BST +Rule GB-Eire 1981 1989 - Oct Sun>=23 1:00u 0 GMT +# Summer Time Order, 1989 (S.I. 1989/985) +# Summer Time Order, 1992 (S.I. 1992/1729) +# Summer Time Order 1994 (S.I. 1994/2798) +Rule GB-Eire 1990 1995 - Oct Sun>=22 1:00u 0 GMT +# Summer Time Order 1997 (S.I. 1997/2982) +# See EU for rules starting in 1996. +# +# Use Europe/London for Jersey, Guernsey, and the Isle of Man. + +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Europe/London -0:01:15 - LMT 1847 Dec 1 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 +Link Europe/London Europe/Jersey +Link Europe/London Europe/Guernsey +Link Europe/London Europe/Isle_of_Man + +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Europe/Dublin -0:25:00 - LMT 1880 Aug 2 + -0:25:21 - DMT 1916 May 21 2:00 + -0:25:21 1:00 IST 1916 Oct 1 2:00s + 0:00 GB-Eire %s 1921 Dec 6 # independence + 0:00 GB-Eire GMT/IST 1940 Feb 25 2:00 + 0:00 1:00 IST 1946 Oct 6 2:00 + 0:00 - GMT 1947 Mar 16 2:00 + 0:00 1:00 IST 1947 Nov 2 2:00 + 0:00 - GMT 1948 Apr 18 2:00 + 0:00 GB-Eire GMT/IST 1968 Oct 27 + 1:00 - IST 1971 Oct 31 2:00u + 0:00 GB-Eire GMT/IST 1996 + 0:00 EU GMT/IST + +############################################################################### + +# Europe + +# EU rules are for the European Union, previously known as the EC, EEC, +# Common Market, etc. + +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule EU 1977 1980 - Apr Sun>=1 1:00u 1:00 S +Rule EU 1977 only - Sep lastSun 1:00u 0 - +Rule EU 1978 only - Oct 1 1:00u 0 - +Rule EU 1979 1995 - Sep lastSun 1:00u 0 - +Rule EU 1981 max - Mar lastSun 1:00u 1:00 S +Rule EU 1996 max - Oct lastSun 1:00u 0 - +# The most recent directive covers the years starting in 2002. See: +# Directive 2000/84/EC of the European Parliament and of the Council +# of 19 January 2001 on summer-time arrangements. +# http://eur-lex.europa.eu/LexUriServ/LexUriServ.do?uri=CELEX:32000L0084:EN:NOT + +# W-Eur differs from EU only in that W-Eur uses standard time. +Rule W-Eur 1977 1980 - Apr Sun>=1 1:00s 1:00 S +Rule W-Eur 1977 only - Sep lastSun 1:00s 0 - +Rule W-Eur 1978 only - Oct 1 1:00s 0 - +Rule W-Eur 1979 1995 - Sep lastSun 1:00s 0 - +Rule W-Eur 1981 max - Mar lastSun 1:00s 1:00 S +Rule W-Eur 1996 max - Oct lastSun 1:00s 0 - + +# Older C-Eur rules are for convenience in the tables. +# From 1977 on, C-Eur differs from EU only in that C-Eur uses standard time. +Rule C-Eur 1916 only - Apr 30 23:00 1:00 S +Rule C-Eur 1916 only - Oct 1 1:00 0 - +Rule C-Eur 1917 1918 - Apr Mon>=15 2:00s 1:00 S +Rule C-Eur 1917 1918 - Sep Mon>=15 2:00s 0 - +Rule C-Eur 1940 only - Apr 1 2:00s 1:00 S +Rule C-Eur 1942 only - Nov 2 2:00s 0 - +Rule C-Eur 1943 only - Mar 29 2:00s 1:00 S +Rule C-Eur 1943 only - Oct 4 2:00s 0 - +Rule C-Eur 1944 1945 - Apr Mon>=1 2:00s 1:00 S +# Whitman gives 1944 Oct 7; go with Shanks & Pottenger. +Rule C-Eur 1944 only - Oct 2 2:00s 0 - +# From Jesper Nørgaard Welen (2008-07-13): +# +# I found what is probably a typo of 2:00 which should perhaps be 2:00s +# in the C-Eur rule from tz database version 2008d (this part was +# corrected in version 2008d). The circumstantial evidence is simply the +# tz database itself, as seen below: +# +# Zone Europe/Paris 0:09:21 - LMT 1891 Mar 15 0:01 +# 0:00 France WE%sT 1945 Sep 16 3:00 +# +# Zone Europe/Monaco 0:29:32 - LMT 1891 Mar 15 +# 0:00 France WE%sT 1945 Sep 16 3:00 +# +# Zone Europe/Belgrade 1:22:00 - LMT 1884 +# 1:00 1:00 CEST 1945 Sep 16 2:00s +# +# Rule France 1945 only - Sep 16 3:00 0 - +# Rule Belgium 1945 only - Sep 16 2:00s 0 - +# Rule Neth 1945 only - Sep 16 2:00s 0 - +# +# The rule line to be changed is: +# +# Rule C-Eur 1945 only - Sep 16 2:00 0 - +# +# It seems that Paris, Monaco, Rule France, Rule Belgium all agree on +# 2:00 standard time, e.g. 3:00 local time. However there are no +# countries that use C-Eur rules in September 1945, so the only items +# affected are apparently these fictitious zones that translate acronyms +# CET and MET: +# +# Zone CET 1:00 C-Eur CE%sT +# Zone MET 1:00 C-Eur ME%sT +# +# It this is right then the corrected version would look like: +# +# Rule C-Eur 1945 only - Sep 16 2:00s 0 - +# +# A small step for mankind though 8-) +Rule C-Eur 1945 only - Sep 16 2:00s 0 - +Rule C-Eur 1977 1980 - Apr Sun>=1 2:00s 1:00 S +Rule C-Eur 1977 only - Sep lastSun 2:00s 0 - +Rule C-Eur 1978 only - Oct 1 2:00s 0 - +Rule C-Eur 1979 1995 - Sep lastSun 2:00s 0 - +Rule C-Eur 1981 max - Mar lastSun 2:00s 1:00 S +Rule C-Eur 1996 max - Oct lastSun 2:00s 0 - + +# E-Eur differs from EU only in that E-Eur switches at midnight local time. +Rule E-Eur 1977 1980 - Apr Sun>=1 0:00 1:00 S +Rule E-Eur 1977 only - Sep lastSun 0:00 0 - +Rule E-Eur 1978 only - Oct 1 0:00 0 - +Rule E-Eur 1979 1995 - Sep lastSun 0:00 0 - +Rule E-Eur 1981 max - Mar lastSun 0:00 1:00 S +Rule E-Eur 1996 max - Oct lastSun 0:00 0 - + +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Russia 1917 only - Jul 1 23:00 1:00 MST # Moscow Summer Time +Rule Russia 1917 only - Dec 28 0:00 0 MMT # Moscow Mean Time +Rule Russia 1918 only - May 31 22:00 2:00 MDST # Moscow Double Summer Time +Rule Russia 1918 only - Sep 16 1:00 1:00 MST +Rule Russia 1919 only - May 31 23:00 2:00 MDST +Rule Russia 1919 only - Jul 1 2:00 1:00 MSD +Rule Russia 1919 only - Aug 16 0:00 0 MSK +Rule Russia 1921 only - Feb 14 23:00 1:00 MSD +Rule Russia 1921 only - Mar 20 23:00 2:00 MSM # Midsummer +Rule Russia 1921 only - Sep 1 0:00 1:00 MSD +Rule Russia 1921 only - Oct 1 0:00 0 - +# Act No. 925 of the Council of Ministers of the USSR (1980-10-24): +Rule Russia 1981 1984 - Apr 1 0:00 1:00 S +Rule Russia 1981 1983 - Oct 1 0:00 0 - +# Act No. 967 of the Council of Ministers of the USSR (1984-09-13), repeated in +# Act No. 227 of the Council of Ministers of the USSR (1989-03-14): +Rule Russia 1984 1995 - Sep lastSun 2:00s 0 - +Rule Russia 1985 2010 - Mar lastSun 2:00s 1:00 S +# +Rule Russia 1996 2010 - Oct lastSun 2:00s 0 - +# As described below, Russia's 2014 change affects Zone data, not Rule data. + +# From Stepan Golosunov (2016-03-07): +# Wikipedia and other sources refer to the Act of the Council of +# Ministers of the USSR from 1988-01-04 No. 5 and the Act of the +# Council of Ministers of the USSR from 1989-03-14 No. 227. +# +# I did not find full texts of these acts. For the 1989 one we have +# title at http://base.garant.ru/70754136/ : +# "About change in calculation of time on the territories of +# Lithuanian SSR, Latvian SSR and Estonian SSR, Astrakhan, +# Kaliningrad, Kirov, Kuybyshev, Ulyanovsk and Uralsk oblasts". +# And http://astrozet.net/files/Zones/DOC/RU/1980-925.txt appears to +# contain quotes from both acts: Since last Sunday of March 1988 rules +# of the second time belt are installed in Volgograd and Saratov +# oblasts. Since last Sunday of March 1989: +# a) Lithuanian SSR, Latvian SSR, Estonian SSR, Kaliningrad oblast: +# second time belt rules without extra hour (Moscow-1); +# b) Astrakhan, Kirov, Kuybyshev, Ulyanovsk oblasts: second time belt +# rules (Moscow time) +# c) Uralsk oblast: third time belt rules (Moscow+1). + +# From Stepan Golosunov (2016-03-27): +# Unamended version of the act of the +# Government of the Russian Federation No. 23 from 08.01.1992 +# http://pravo.gov.ru/proxy/ips/?docbody=&nd=102014034&rdk=0 +# says that every year clocks were to be moved forward on last Sunday +# of March at 2 hours and moved backwards on last Sunday of September +# at 3 hours. It was amended in 1996 to replace September with October. + +# From Alexander Krivenyshev (2011-06-14): +# According to Kremlin press service, Russian President Dmitry Medvedev +# signed a federal law "On calculation of time" on June 9, 2011. +# According to the law Russia is abolishing daylight saving time. +# +# Medvedev signed a law "On the Calculation of Time" (in russian): +# http://bmockbe.ru/events/?ID=7583 +# +# Medvedev signed a law on the calculation of the time (in russian): +# http://www.regnum.ru/news/polit/1413906.html + +# From Arthur David Olson (2011-06-15): +# Take "abolishing daylight saving time" to mean that time is now considered +# to be standard. + +# These are for backward compatibility with older versions. + +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone WET 0:00 EU WE%sT +Zone CET 1:00 C-Eur CE%sT +Zone MET 1:00 C-Eur ME%sT +Zone EET 2:00 EU EE%sT + +# Previous editions of this database used abbreviations like MET DST +# for Central European Summer Time, but this didn't agree with common usage. + +# From Markus Kuhn (1996-07-12): +# The official German names ... are +# +# Mitteleuropäische Zeit (MEZ) = UTC+01:00 +# Mitteleuropäische Sommerzeit (MESZ) = UTC+02:00 +# +# as defined in the German Time Act (Gesetz über die Zeitbestimmung (ZeitG), +# 1978-07-25, Bundesgesetzblatt, Jahrgang 1978, Teil I, S. 1110-1111).... +# I wrote ... to the German Federal Physical-Technical Institution +# +# Physikalisch-Technische Bundesanstalt (PTB) +# Laboratorium 4.41 "Zeiteinheit" +# Postfach 3345 +# D-38023 Braunschweig +# phone: +49 531 592-0 +# +# ... I received today an answer letter from Dr. Peter Hetzel, head of the PTB +# department for time and frequency transmission. He explained that the +# PTB translates MEZ and MESZ into English as +# +# Central European Time (CET) = UTC+01:00 +# Central European Summer Time (CEST) = UTC+02:00 + + +# Albania +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Albania 1940 only - Jun 16 0:00 1:00 S +Rule Albania 1942 only - Nov 2 3:00 0 - +Rule Albania 1943 only - Mar 29 2:00 1:00 S +Rule Albania 1943 only - Apr 10 3:00 0 - +Rule Albania 1974 only - May 4 0:00 1:00 S +Rule Albania 1974 only - Oct 2 0:00 0 - +Rule Albania 1975 only - May 1 0:00 1:00 S +Rule Albania 1975 only - Oct 2 0:00 0 - +Rule Albania 1976 only - May 2 0:00 1:00 S +Rule Albania 1976 only - Oct 3 0:00 0 - +Rule Albania 1977 only - May 8 0:00 1:00 S +Rule Albania 1977 only - Oct 2 0:00 0 - +Rule Albania 1978 only - May 6 0:00 1:00 S +Rule Albania 1978 only - Oct 1 0:00 0 - +Rule Albania 1979 only - May 5 0:00 1:00 S +Rule Albania 1979 only - Sep 30 0:00 0 - +Rule Albania 1980 only - May 3 0:00 1:00 S +Rule Albania 1980 only - Oct 4 0:00 0 - +Rule Albania 1981 only - Apr 26 0:00 1:00 S +Rule Albania 1981 only - Sep 27 0:00 0 - +Rule Albania 1982 only - May 2 0:00 1:00 S +Rule Albania 1982 only - Oct 3 0:00 0 - +Rule Albania 1983 only - Apr 18 0:00 1:00 S +Rule Albania 1983 only - Oct 1 0:00 0 - +Rule Albania 1984 only - Apr 1 0:00 1:00 S +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Europe/Tirane 1:19:20 - LMT 1914 + 1:00 - CET 1940 Jun 16 + 1:00 Albania CE%sT 1984 Jul + 1:00 EU CE%sT + +# Andorra +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Europe/Andorra 0:06:04 - LMT 1901 + 0:00 - WET 1946 Sep 30 + 1:00 - CET 1985 Mar 31 2:00 + 1:00 EU CE%sT + +# Austria + +# Milne says Vienna time was 1:05:21. + +# From Paul Eggert (2006-03-22): Shanks & Pottenger give 1918-06-16 and +# 1945-11-18, but the Austrian Federal Office of Metrology and +# Surveying (BEV) gives 1918-09-16 and for Vienna gives the "alleged" +# date of 1945-04-12 with no time. For the 1980-04-06 transition +# Shanks & Pottenger give 02:00, the BEV 00:00. Go with the BEV, +# and guess 02:00 for 1945-04-12. + +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Austria 1920 only - Apr 5 2:00s 1:00 S +Rule Austria 1920 only - Sep 13 2:00s 0 - +Rule Austria 1946 only - Apr 14 2:00s 1:00 S +Rule Austria 1946 1948 - Oct Sun>=1 2:00s 0 - +Rule Austria 1947 only - Apr 6 2:00s 1:00 S +Rule Austria 1948 only - Apr 18 2:00s 1:00 S +Rule Austria 1980 only - Apr 6 0:00 1:00 S +Rule Austria 1980 only - Sep 28 0:00 0 - +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Europe/Vienna 1:05:21 - LMT 1893 Apr + 1:00 C-Eur CE%sT 1920 + 1:00 Austria CE%sT 1940 Apr 1 2:00s + 1:00 C-Eur CE%sT 1945 Apr 2 2:00s + 1:00 1:00 CEST 1945 Apr 12 2:00s + 1:00 - CET 1946 + 1:00 Austria CE%sT 1981 + 1:00 EU CE%sT + +# Belarus +# +# From Stepan Golosunov (2016-07-02): +# http://www.lawbelarus.com/repub/sub30/texf9611.htm +# (Act of the Cabinet of Ministers of the Republic of Belarus from +# 1992-03-25 No. 157) ... says clocks were to be moved forward at 2:00 +# on last Sunday of March and backward at 3:00 on last Sunday of September +# (the same as previous USSR and contemporary Russian regulations). +# +# From Yauhen Kharuzhy (2011-09-16): +# By latest Belarus government act Europe/Minsk timezone was changed to +# GMT+3 without DST (was GMT+2 with DST). +# +# Sources (Russian language): +# http://www.belta.by/ru/all_news/society/V-Belarusi-otmenjaetsja-perexod-na-sezonnoe-vremja_i_572952.html +# http://naviny.by/rubrics/society/2011/09/16/ic_articles_116_175144/ +# http://news.tut.by/society/250578.html +# +# From Alexander Bokovoy (2014-10-09): +# Belarussian government decided against changing to winter time.... +# http://eng.belta.by/all_news/society/Belarus-decides-against-adjusting-time-in-Russias-wake_i_76335.html +# From Paul Eggert (2014-10-08): +# Hence Belarus can share time zone abbreviations with Moscow again. +# +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Europe/Minsk 1:50:16 - LMT 1880 + 1:50 - MMT 1924 May 2 # Minsk Mean Time + 2:00 - EET 1930 Jun 21 + 3:00 - MSK 1941 Jun 28 + 1:00 C-Eur CE%sT 1944 Jul 3 + 3:00 Russia MSK/MSD 1990 + 3:00 - MSK 1991 Mar 31 2:00s + 2:00 Russia EE%sT 2011 Mar 27 2:00s + 3:00 - FET 2014 Oct 26 1:00s + 3:00 - MSK + +# Belgium +# +# From Paul Eggert (1997-07-02): +# Entries from 1918 through 1991 are taken from: +# Annuaire de L'Observatoire Royal de Belgique, +# Avenue Circulaire, 3, B-1180 BRUXELLES, CLVIIe année, 1991 +# (Imprimerie HAYEZ, s.p.r.l., Rue Fin, 4, 1080 BRUXELLES, MCMXC), +# pp 8-9. +# LMT before 1892 was 0:17:30, according to the official journal of Belgium: +# Moniteur Belge, Samedi 30 Avril 1892, N.121. +# Thanks to Pascal Delmoitie for these references. +# The 1918 rules are listed for completeness; they apply to unoccupied Belgium. +# Assume Brussels switched to WET in 1918 when the armistice took effect. +# +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Belgium 1918 only - Mar 9 0:00s 1:00 S +Rule Belgium 1918 1919 - Oct Sat>=1 23:00s 0 - +Rule Belgium 1919 only - Mar 1 23:00s 1:00 S +Rule Belgium 1920 only - Feb 14 23:00s 1:00 S +Rule Belgium 1920 only - Oct 23 23:00s 0 - +Rule Belgium 1921 only - Mar 14 23:00s 1:00 S +Rule Belgium 1921 only - Oct 25 23:00s 0 - +Rule Belgium 1922 only - Mar 25 23:00s 1:00 S +Rule Belgium 1922 1927 - Oct Sat>=1 23:00s 0 - +Rule Belgium 1923 only - Apr 21 23:00s 1:00 S +Rule Belgium 1924 only - Mar 29 23:00s 1:00 S +Rule Belgium 1925 only - Apr 4 23:00s 1:00 S +# DSH writes that a royal decree of 1926-02-22 specified the Sun following 3rd +# Sat in Apr (except if it's Easter, in which case it's one Sunday earlier), +# to Sun following 1st Sat in Oct, and that a royal decree of 1928-09-15 +# changed the transition times to 02:00 GMT. +Rule Belgium 1926 only - Apr 17 23:00s 1:00 S +Rule Belgium 1927 only - Apr 9 23:00s 1:00 S +Rule Belgium 1928 only - Apr 14 23:00s 1:00 S +Rule Belgium 1928 1938 - Oct Sun>=2 2:00s 0 - +Rule Belgium 1929 only - Apr 21 2:00s 1:00 S +Rule Belgium 1930 only - Apr 13 2:00s 1:00 S +Rule Belgium 1931 only - Apr 19 2:00s 1:00 S +Rule Belgium 1932 only - Apr 3 2:00s 1:00 S +Rule Belgium 1933 only - Mar 26 2:00s 1:00 S +Rule Belgium 1934 only - Apr 8 2:00s 1:00 S +Rule Belgium 1935 only - Mar 31 2:00s 1:00 S +Rule Belgium 1936 only - Apr 19 2:00s 1:00 S +Rule Belgium 1937 only - Apr 4 2:00s 1:00 S +Rule Belgium 1938 only - Mar 27 2:00s 1:00 S +Rule Belgium 1939 only - Apr 16 2:00s 1:00 S +Rule Belgium 1939 only - Nov 19 2:00s 0 - +Rule Belgium 1940 only - Feb 25 2:00s 1:00 S +Rule Belgium 1944 only - Sep 17 2:00s 0 - +Rule Belgium 1945 only - Apr 2 2:00s 1:00 S +Rule Belgium 1945 only - Sep 16 2:00s 0 - +Rule Belgium 1946 only - May 19 2:00s 1:00 S +Rule Belgium 1946 only - Oct 7 2:00s 0 - +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Europe/Brussels 0:17:30 - LMT 1880 + 0:17:30 - BMT 1892 May 1 12:00 # Brussels MT + 0:00 - WET 1914 Nov 8 + 1:00 - CET 1916 May 1 0:00 + 1:00 C-Eur CE%sT 1918 Nov 11 11:00u + 0:00 Belgium WE%sT 1940 May 20 2:00s + 1:00 C-Eur CE%sT 1944 Sep 3 + 1:00 Belgium CE%sT 1977 + 1:00 EU CE%sT + +# Bosnia and Herzegovina +# See Europe/Belgrade. + +# Bulgaria +# +# From Plamen Simenov via Steffen Thorsen (1999-09-09): +# A document of Government of Bulgaria (No. 94/1997) says: +# EET -> EETDST is in 03:00 Local time in last Sunday of March ... +# EETDST -> EET is in 04:00 Local time in last Sunday of October +# +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Bulg 1979 only - Mar 31 23:00 1:00 S +Rule Bulg 1979 only - Oct 1 1:00 0 - +Rule Bulg 1980 1982 - Apr Sat>=1 23:00 1:00 S +Rule Bulg 1980 only - Sep 29 1:00 0 - +Rule Bulg 1981 only - Sep 27 2:00 0 - +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Europe/Sofia 1:33:16 - LMT 1880 + 1:56:56 - IMT 1894 Nov 30 # Istanbul MT? + 2:00 - EET 1942 Nov 2 3:00 + 1:00 C-Eur CE%sT 1945 + 1:00 - CET 1945 Apr 2 3:00 + 2:00 - EET 1979 Mar 31 23:00 + 2:00 Bulg EE%sT 1982 Sep 26 3:00 + 2:00 C-Eur EE%sT 1991 + 2:00 E-Eur EE%sT 1997 + 2:00 EU EE%sT + +# Croatia +# See Europe/Belgrade. + +# Cyprus +# Please see the 'asia' file for Asia/Nicosia. + +# Czech Republic +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Czech 1945 only - Apr 8 2:00s 1:00 S +Rule Czech 1945 only - Nov 18 2:00s 0 - +Rule Czech 1946 only - May 6 2:00s 1:00 S +Rule Czech 1946 1949 - Oct Sun>=1 2:00s 0 - +Rule Czech 1947 only - Apr 20 2:00s 1:00 S +Rule Czech 1948 only - Apr 18 2:00s 1:00 S +Rule Czech 1949 only - Apr 9 2:00s 1:00 S +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Europe/Prague 0:57:44 - LMT 1850 + 0:57:44 - PMT 1891 Oct # Prague Mean Time + 1:00 C-Eur CE%sT 1944 Sep 17 2:00s + 1:00 Czech CE%sT 1979 + 1:00 EU CE%sT +# Use Europe/Prague also for Slovakia. + +# Denmark, Faroe Islands, and Greenland + +# From Jesper Nørgaard Welen (2005-04-26): +# http://www.hum.aau.dk/~poe/tid/tine/DanskTid.htm says that the law +# [introducing standard time] was in effect from 1894-01-01.... +# The page http://www.retsinfo.dk/_GETDOCI_/ACCN/A18930008330-REGL +# confirms this, and states that the law was put forth 1893-03-29. +# +# The EU treaty with effect from 1973: +# http://www.retsinfo.dk/_GETDOCI_/ACCN/A19722110030-REGL +# +# This provoked a new law from 1974 to make possible summer time changes +# in subsequent decrees with the law +# http://www.retsinfo.dk/_GETDOCI_/ACCN/A19740022330-REGL +# +# It seems however that no decree was set forward until 1980. I have +# not found any decree, but in another related law, the effecting DST +# changes are stated explicitly to be from 1980-04-06 at 02:00 to +# 1980-09-28 at 02:00. If this is true, this differs slightly from +# the EU rule in that DST runs to 02:00, not 03:00. We don't know +# when Denmark began using the EU rule correctly, but we have only +# confirmation of the 1980-time, so I presume it was correct in 1981: +# The law is about the management of the extra hour, concerning +# working hours reported and effect on obligatory-rest rules (which +# was suspended on that night): +# http://www.retsinfo.dk/_GETDOCI_/ACCN/C19801120554-REGL + +# From Jesper Nørgaard Welen (2005-06-11): +# The Herning Folkeblad (1980-09-26) reported that the night between +# Saturday and Sunday the clock is set back from three to two. + +# From Paul Eggert (2005-06-11): +# Hence the "02:00" of the 1980 law refers to standard time, not +# wall-clock time, and so the EU rules were in effect in 1980. + +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Denmark 1916 only - May 14 23:00 1:00 S +Rule Denmark 1916 only - Sep 30 23:00 0 - +Rule Denmark 1940 only - May 15 0:00 1:00 S +Rule Denmark 1945 only - Apr 2 2:00s 1:00 S +Rule Denmark 1945 only - Aug 15 2:00s 0 - +Rule Denmark 1946 only - May 1 2:00s 1:00 S +Rule Denmark 1946 only - Sep 1 2:00s 0 - +Rule Denmark 1947 only - May 4 2:00s 1:00 S +Rule Denmark 1947 only - Aug 10 2:00s 0 - +Rule Denmark 1948 only - May 9 2:00s 1:00 S +Rule Denmark 1948 only - Aug 8 2:00s 0 - +# +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Europe/Copenhagen 0:50:20 - LMT 1890 + 0:50:20 - CMT 1894 Jan 1 # Copenhagen MT + 1:00 Denmark CE%sT 1942 Nov 2 2:00s + 1:00 C-Eur CE%sT 1945 Apr 2 2:00 + 1:00 Denmark CE%sT 1980 + 1:00 EU CE%sT +Zone Atlantic/Faroe -0:27:04 - LMT 1908 Jan 11 # Tórshavn + 0:00 - WET 1981 + 0:00 EU WE%sT +# +# From Paul Eggert (2004-10-31): +# During World War II, Germany maintained secret manned weather stations in +# East Greenland and Franz Josef Land, but we don't know their time zones. +# My source for this is Wilhelm Dege's book mentioned under Svalbard. +# +# From Paul Eggert (2006-03-22): +# Greenland joined the EU as part of Denmark, obtained home rule on 1979-05-01, +# and left the EU on 1985-02-01. It therefore should have been using EU +# rules at least through 1984. Shanks & Pottenger say Scoresbysund and Godthåb +# used C-Eur rules after 1980, but IATA SSIM (1991/1996) says they use EU +# rules since at least 1991. Assume EU rules since 1980. + +# From Gwillim Law (2001-06-06), citing +# <http://www.statkart.no/efs/efshefter/2001/efs5-2001.pdf> (2001-03-15), +# and with translations corrected by Steffen Thorsen: +# +# Greenland has four local times, and the relation to UTC +# is according to the following time line: +# +# The military zone near Thule UTC-4 +# Standard Greenland time UTC-3 +# Scoresbysund UTC-1 +# Danmarkshavn UTC +# +# In the military area near Thule and in Danmarkshavn DST will not be +# introduced. + +# From Rives McDow (2001-11-01): +# +# I correspond regularly with the Dansk Polarcenter, and wrote them at +# the time to clarify the situation in Thule. Unfortunately, I have +# not heard back from them regarding my recent letter. [But I have +# info from earlier correspondence.] +# +# According to the center, a very small local time zone around Thule +# Air Base keeps the time according to UTC-4, implementing daylight +# savings using North America rules, changing the time at 02:00 local time.... +# +# The east coast of Greenland north of the community of Scoresbysund +# uses UTC in the same way as in Iceland, year round, with no dst. +# There are just a few stations on this coast, including the +# Danmarkshavn ICAO weather station mentioned in your September 29th +# email. The other stations are two sledge patrol stations in +# Mestersvig and Daneborg, the air force base at Station Nord, and the +# DPC research station at Zackenberg. +# +# Scoresbysund and two small villages nearby keep time UTC-1 and use +# the same daylight savings time period as in West Greenland (Godthåb). +# +# The rest of Greenland, including Godthåb (this area, although it +# includes central Greenland, is known as west Greenland), keeps time +# UTC-3, with daylight savings methods according to European rules. +# +# It is common procedure to use UTC 0 in the wilderness of East and +# North Greenland, because it is mainly Icelandic aircraft operators +# maintaining traffic in these areas. However, the official status of +# this area is that it sticks with Godthåb time. This area might be +# considered a dual time zone in some respects because of this. + +# From Rives McDow (2001-11-19): +# I heard back from someone stationed at Thule; the time change took place +# there at 2:00 AM. + +# From Paul Eggert (2006-03-22): +# From 1997 on the CIA map shows Danmarkshavn on GMT; +# the 1995 map as like Godthåb. +# For lack of better info, assume they were like Godthåb before 1996. +# startkart.no says Thule does not observe DST, but this is clearly an error, +# so go with Shanks & Pottenger for Thule transitions until this year. +# For 2007 on assume Thule will stay in sync with US DST rules. + +# From J William Piggott (2016-02-20): +# "Greenland north of the community of Scoresbysund" is officially named +# "National Park" by Executive Order: +# http://naalakkersuisut.gl/~/media/Nanoq/Files/Attached%20Files/Engelske-tekster/Legislation/Executive%20Order%20National%20Park.rtf +# It is their only National Park. +# +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Thule 1991 1992 - Mar lastSun 2:00 1:00 D +Rule Thule 1991 1992 - Sep lastSun 2:00 0 S +Rule Thule 1993 2006 - Apr Sun>=1 2:00 1:00 D +Rule Thule 1993 2006 - Oct lastSun 2:00 0 S +Rule Thule 2007 max - Mar Sun>=8 2:00 1:00 D +Rule Thule 2007 max - Nov Sun>=1 2:00 0 S +# +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone America/Danmarkshavn -1:14:40 - LMT 1916 Jul 28 + -3:00 - WGT 1980 Apr 6 2:00 + -3:00 EU WG%sT 1996 + 0:00 - GMT +Zone America/Scoresbysund -1:27:52 - LMT 1916 Jul 28 # Ittoqqortoormiit + -2:00 - CGT 1980 Apr 6 2:00 + -2:00 C-Eur CG%sT 1981 Mar 29 + -1:00 EU EG%sT +Zone America/Godthab -3:26:56 - LMT 1916 Jul 28 # Nuuk + -3:00 - WGT 1980 Apr 6 2:00 + -3:00 EU WG%sT +Zone America/Thule -4:35:08 - LMT 1916 Jul 28 # Pituffik air base + -4:00 Thule A%sT + +# Estonia +# +# From Paul Eggert (2016-03-18): +# The 1989 transition is from USSR act No. 227 (1989-03-14). +# +# From Peter Ilieve (1994-10-15): +# A relative in Tallinn confirms the accuracy of the data for 1989 onwards +# [through 1994] and gives the legal authority for it, +# a regulation of the Government of Estonia, No. 111 of 1989.... +# +# From Peter Ilieve (1996-10-28): +# [IATA SSIM (1992/1996) claims that the Baltic republics switch at 01:00s, +# but a relative confirms that Estonia still switches at 02:00s, writing:] +# "I do not [know] exactly but there are some little different +# (confusing) rules for International Air and Railway Transport Schedules +# conversion in Sunday connected with end of summer time in Estonia.... +# A discussion is running about the summer time efficiency and effect on +# human physiology. It seems that Estonia maybe will not change to +# summer time next spring." + +# From Peter Ilieve (1998-11-04), heavily edited: +# The 1998-09-22 Estonian time law +# http://trip.rk.ee/cgi-bin/thw?${BASE}=akt&${OOHTML}=rtd&TA=1998&TO=1&AN=1390 +# refers to the Eighth Directive and cites the association agreement between +# the EU and Estonia, ratified by the Estonian law (RT II 1995, 22-27, 120). +# +# I also asked [my relative] whether they use any standard abbreviation +# for their standard and summer times. He says no, they use "suveaeg" +# (summer time) and "talveaeg" (winter time). + +# From The Baltic Times <http://www.baltictimes.com/> (1999-09-09) +# via Steffen Thorsen: +# This year will mark the last time Estonia shifts to summer time, +# a council of the ruling coalition announced Sept. 6.... +# But what this could mean for Estonia's chances of joining the European +# Union are still unclear. In 1994, the EU declared summer time compulsory +# for all member states until 2001. Brussels has yet to decide what to do +# after that. + +# From Mart Oruaas (2000-01-29): +# Regulation No. 301 (1999-10-12) obsoletes previous regulation +# No. 206 (1998-09-22) and thus sticks Estonia to +02:00 GMT for all +# the year round. The regulation is effective 1999-11-01. + +# From Toomas Soome (2002-02-21): +# The Estonian government has changed once again timezone politics. +# Now we are using again EU rules. +# +# From Urmet Jänes (2002-03-28): +# The legislative reference is Government decree No. 84 on 2002-02-21. + +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Europe/Tallinn 1:39:00 - LMT 1880 + 1:39:00 - TMT 1918 Feb # Tallinn Mean Time + 1:00 C-Eur CE%sT 1919 Jul + 1:39:00 - TMT 1921 May + 2:00 - EET 1940 Aug 6 + 3:00 - MSK 1941 Sep 15 + 1:00 C-Eur CE%sT 1944 Sep 22 + 3:00 Russia MSK/MSD 1989 Mar 26 2:00s + 2:00 1:00 EEST 1989 Sep 24 2:00s + 2:00 C-Eur EE%sT 1998 Sep 22 + 2:00 EU EE%sT 1999 Oct 31 4:00 + 2:00 - EET 2002 Feb 21 + 2:00 EU EE%sT + +# Finland + +# From Hannu Strang (1994-09-25 06:03:37 UTC): +# Well, here in Helsinki we're just changing from summer time to regular one, +# and it's supposed to change at 4am... + +# From Janne Snabb (2010-07-15): +# +# I noticed that the Finland data is not accurate for years 1981 and 1982. +# During these two first trial years the DST adjustment was made one hour +# earlier than in forthcoming years. Starting 1983 the adjustment was made +# according to the central European standards. +# +# This is documented in Heikki Oja: Aikakirja 2007, published by The Almanac +# Office of University of Helsinki, ISBN 952-10-3221-9, available online (in +# Finnish) at +# http://almanakka.helsinki.fi/aikakirja/Aikakirja2007kokonaan.pdf +# +# Page 105 (56 in PDF version) has a handy table of all past daylight savings +# transitions. It is easy enough to interpret without Finnish skills. +# +# This is also confirmed by Finnish Broadcasting Company's archive at: +# http://www.yle.fi/elavaarkisto/?s=s&g=1&ag=5&t=&a=3401 +# +# The news clip from 1981 says that "the time between 2 and 3 o'clock does not +# exist tonight." + +# From Konstantin Hyppönen (2014-06-13): +# [Heikki Oja's book Aikakirja 2013] +# http://almanakka.helsinki.fi/images/aikakirja/Aikakirja2013kokonaan.pdf +# pages 104-105, including a scan from a newspaper published on Apr 2 1942 +# say that ... [o]n Apr 2 1942, 24 o'clock (which means Apr 3 1942, +# 00:00), clocks were moved one hour forward. The newspaper +# mentions "on the night from Thursday to Friday".... +# On Oct 4 1942, clocks were moved at 1:00 one hour backwards. +# +# From Paul Eggert (2014-06-14): +# Go with Oja over Shanks. + +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Finland 1942 only - Apr 2 24:00 1:00 S +Rule Finland 1942 only - Oct 4 1:00 0 - +Rule Finland 1981 1982 - Mar lastSun 2:00 1:00 S +Rule Finland 1981 1982 - Sep lastSun 3:00 0 - + +# Milne says Helsinki (Helsingfors) time was 1:39:49.2 (official document); +# round to nearest. + +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Europe/Helsinki 1:39:49 - LMT 1878 May 31 + 1:39:49 - HMT 1921 May # Helsinki Mean Time + 2:00 Finland EE%sT 1983 + 2:00 EU EE%sT + +# Åland Is +Link Europe/Helsinki Europe/Mariehamn + + +# France + +# From Ciro Discepolo (2000-12-20): +# +# Henri Le Corre, Régimes horaires pour le monde entier, Éditions +# Traditionnelles - Paris 2 books, 1993 +# +# Gabriel, Traité de l'heure dans le monde, Guy Trédaniel, +# Paris, 1991 +# +# Françoise Gauquelin, Problèmes de l'heure résolus en astrologie, +# Guy Trédaniel, Paris 1987 + + +# +# Shank & Pottenger seem to use '24:00' ambiguously; resolve it with Whitman. +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule France 1916 only - Jun 14 23:00s 1:00 S +Rule France 1916 1919 - Oct Sun>=1 23:00s 0 - +Rule France 1917 only - Mar 24 23:00s 1:00 S +Rule France 1918 only - Mar 9 23:00s 1:00 S +Rule France 1919 only - Mar 1 23:00s 1:00 S +Rule France 1920 only - Feb 14 23:00s 1:00 S +Rule France 1920 only - Oct 23 23:00s 0 - +Rule France 1921 only - Mar 14 23:00s 1:00 S +Rule France 1921 only - Oct 25 23:00s 0 - +Rule France 1922 only - Mar 25 23:00s 1:00 S +# DSH writes that a law of 1923-05-24 specified 3rd Sat in Apr at 23:00 to 1st +# Sat in Oct at 24:00; and that in 1930, because of Easter, the transitions +# were Apr 12 and Oct 5. Go with Shanks & Pottenger. +Rule France 1922 1938 - Oct Sat>=1 23:00s 0 - +Rule France 1923 only - May 26 23:00s 1:00 S +Rule France 1924 only - Mar 29 23:00s 1:00 S +Rule France 1925 only - Apr 4 23:00s 1:00 S +Rule France 1926 only - Apr 17 23:00s 1:00 S +Rule France 1927 only - Apr 9 23:00s 1:00 S +Rule France 1928 only - Apr 14 23:00s 1:00 S +Rule France 1929 only - Apr 20 23:00s 1:00 S +Rule France 1930 only - Apr 12 23:00s 1:00 S +Rule France 1931 only - Apr 18 23:00s 1:00 S +Rule France 1932 only - Apr 2 23:00s 1:00 S +Rule France 1933 only - Mar 25 23:00s 1:00 S +Rule France 1934 only - Apr 7 23:00s 1:00 S +Rule France 1935 only - Mar 30 23:00s 1:00 S +Rule France 1936 only - Apr 18 23:00s 1:00 S +Rule France 1937 only - Apr 3 23:00s 1:00 S +Rule France 1938 only - Mar 26 23:00s 1:00 S +Rule France 1939 only - Apr 15 23:00s 1:00 S +Rule France 1939 only - Nov 18 23:00s 0 - +Rule France 1940 only - Feb 25 2:00 1:00 S +# The French rules for 1941-1944 were not used in Paris, but Shanks & Pottenger +# write that they were used in Monaco and in many French locations. +# Le Corre writes that the upper limit of the free zone was Arnéguy, Orthez, +# Mont-de-Marsan, Bazas, Langon, Lamothe-Montravel, Marœuil, La +# Rochefoucauld, Champagne-Mouton, La Roche-Posay, La Haye-Descartes, +# Loches, Montrichard, Vierzon, Bourges, Moulins, Digoin, +# Paray-le-Monial, Montceau-les-Mines, Chalon-sur-Saône, Arbois, +# Dole, Morez, St-Claude, and Collonges (Haute-Savoie). +Rule France 1941 only - May 5 0:00 2:00 M # Midsummer +# Shanks & Pottenger say this transition occurred at Oct 6 1:00, +# but go with Denis Excoffier (1997-12-12), +# who quotes the Ephémérides astronomiques for 1998 from Bureau des Longitudes +# as saying 5/10/41 22hUT. +Rule France 1941 only - Oct 6 0:00 1:00 S +Rule France 1942 only - Mar 9 0:00 2:00 M +Rule France 1942 only - Nov 2 3:00 1:00 S +Rule France 1943 only - Mar 29 2:00 2:00 M +Rule France 1943 only - Oct 4 3:00 1:00 S +Rule France 1944 only - Apr 3 2:00 2:00 M +Rule France 1944 only - Oct 8 1:00 1:00 S +Rule France 1945 only - Apr 2 2:00 2:00 M +Rule France 1945 only - Sep 16 3:00 0 - +# Shanks & Pottenger give Mar 28 2:00 and Sep 26 3:00; +# go with Excoffier's 28/3/76 0hUT and 25/9/76 23hUT. +Rule France 1976 only - Mar 28 1:00 1:00 S +Rule France 1976 only - Sep 26 1:00 0 - +# Shanks & Pottenger give 0:09:20 for Paris Mean Time, and Whitman 0:09:05, +# but Howse quotes the actual French legislation as saying 0:09:21. +# Go with Howse. Howse writes that the time in France was officially based +# on PMT-0:09:21 until 1978-08-09, when the time base finally switched to UTC. +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Europe/Paris 0:09:21 - LMT 1891 Mar 15 0:01 + 0:09:21 - PMT 1911 Mar 11 0:01 # Paris MT +# Shanks & Pottenger give 1940 Jun 14 0:00; go with Excoffier and Le Corre. + 0:00 France WE%sT 1940 Jun 14 23:00 +# Le Corre says Paris stuck with occupied-France time after the liberation; +# go with Shanks & Pottenger. + 1:00 C-Eur CE%sT 1944 Aug 25 + 0:00 France WE%sT 1945 Sep 16 3:00 + 1:00 France CE%sT 1977 + 1:00 EU CE%sT + +# Germany + +# From Markus Kuhn (1998-09-29): +# The German time zone web site by the Physikalisch-Technische +# Bundesanstalt contains DST information back to 1916. +# [See tz-link.htm for the URL.] + +# From Jörg Schilling (2002-10-23): +# In 1945, Berlin was switched to Moscow Summer time (GMT+4) by +# http://www.dhm.de/lemo/html/biografien/BersarinNikolai/ +# General [Nikolai] Bersarin. + +# From Paul Eggert (2003-03-08): +# http://www.parlament-berlin.de/pds-fraktion.nsf/727459127c8b66ee8525662300459099/defc77cb784f180ac1256c2b0030274b/$FILE/bersarint.pdf +# says that Bersarin issued an order to use Moscow time on May 20. +# However, Moscow did not observe daylight saving in 1945, so +# this was equivalent to CEMT (GMT+3), not GMT+4. + + +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Germany 1946 only - Apr 14 2:00s 1:00 S +Rule Germany 1946 only - Oct 7 2:00s 0 - +Rule Germany 1947 1949 - Oct Sun>=1 2:00s 0 - +# http://www.ptb.de/de/org/4/44/441/salt.htm says the following transition +# occurred at 3:00 MEZ, not the 2:00 MEZ given in Shanks & Pottenger. +# Go with the PTB. +Rule Germany 1947 only - Apr 6 3:00s 1:00 S +Rule Germany 1947 only - May 11 2:00s 2:00 M +Rule Germany 1947 only - Jun 29 3:00 1:00 S +Rule Germany 1948 only - Apr 18 2:00s 1:00 S +Rule Germany 1949 only - Apr 10 2:00s 1:00 S + +Rule SovietZone 1945 only - May 24 2:00 2:00 M # Midsummer +Rule SovietZone 1945 only - Sep 24 3:00 1:00 S +Rule SovietZone 1945 only - Nov 18 2:00s 0 - + +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Europe/Berlin 0:53:28 - LMT 1893 Apr + 1:00 C-Eur CE%sT 1945 May 24 2:00 + 1:00 SovietZone CE%sT 1946 + 1:00 Germany CE%sT 1980 + 1:00 EU CE%sT + +# From Tobias Conradi (2011-09-12): +# Büsingen <http://www.buesingen.de>, surrounded by the Swiss canton +# Schaffhausen, did not start observing DST in 1980 as the rest of DE +# (West Germany at that time) and DD (East Germany at that time) did. +# DD merged into DE, the area is currently covered by code DE in ISO 3166-1, +# which in turn is covered by the zone Europe/Berlin. +# +# Source for the time in Büsingen 1980: +# http://www.srf.ch/player/video?id=c012c029-03b7-4c2b-9164-aa5902cd58d3 + +# From Arthur David Olson (2012-03-03): +# Büsingen and Zurich have shared clocks since 1970. + +Link Europe/Zurich Europe/Busingen + +# Georgia +# Please see the "asia" file for Asia/Tbilisi. +# Herodotus (Histories, IV.45) says Georgia north of the Phasis (now Rioni) +# is in Europe. Our reference location Tbilisi is in the Asian part. + +# Gibraltar +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Europe/Gibraltar -0:21:24 - LMT 1880 Aug 2 0:00s + 0:00 GB-Eire %s 1957 Apr 14 2:00 + 1:00 - CET 1982 + 1:00 EU CE%sT + +# Greece +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +# Whitman gives 1932 Jul 5 - Nov 1; go with Shanks & Pottenger. +Rule Greece 1932 only - Jul 7 0:00 1:00 S +Rule Greece 1932 only - Sep 1 0:00 0 - +# Whitman gives 1941 Apr 25 - ?; go with Shanks & Pottenger. +Rule Greece 1941 only - Apr 7 0:00 1:00 S +# Whitman gives 1942 Feb 2 - ?; go with Shanks & Pottenger. +Rule Greece 1942 only - Nov 2 3:00 0 - +Rule Greece 1943 only - Mar 30 0:00 1:00 S +Rule Greece 1943 only - Oct 4 0:00 0 - +# Whitman gives 1944 Oct 3 - Oct 31; go with Shanks & Pottenger. +Rule Greece 1952 only - Jul 1 0:00 1:00 S +Rule Greece 1952 only - Nov 2 0:00 0 - +Rule Greece 1975 only - Apr 12 0:00s 1:00 S +Rule Greece 1975 only - Nov 26 0:00s 0 - +Rule Greece 1976 only - Apr 11 2:00s 1:00 S +Rule Greece 1976 only - Oct 10 2:00s 0 - +Rule Greece 1977 1978 - Apr Sun>=1 2:00s 1:00 S +Rule Greece 1977 only - Sep 26 2:00s 0 - +Rule Greece 1978 only - Sep 24 4:00 0 - +Rule Greece 1979 only - Apr 1 9:00 1:00 S +Rule Greece 1979 only - Sep 29 2:00 0 - +Rule Greece 1980 only - Apr 1 0:00 1:00 S +Rule Greece 1980 only - Sep 28 0:00 0 - +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Europe/Athens 1:34:52 - LMT 1895 Sep 14 + 1:34:52 - AMT 1916 Jul 28 0:01 # Athens MT + 2:00 Greece EE%sT 1941 Apr 30 + 1:00 Greece CE%sT 1944 Apr 4 + 2:00 Greece EE%sT 1981 + # Shanks & Pottenger say it switched to C-Eur in 1981; + # go with EU instead, since Greece joined it on Jan 1. + 2:00 EU EE%sT + +# Hungary +# From Paul Eggert (2014-07-15): +# Dates for 1916-1945 are taken from: +# Oross A. Jelen a múlt jövője: a nyári időszámítás Magyarországon 1916-1945. +# National Archives of Hungary (2012-10-29). +# http://mnl.gov.hu/a_het_dokumentuma/a_nyari_idoszamitas_magyarorszagon_19161945.html +# This source does not always give times, which are taken from Shanks +# & Pottenger (which disagree about the dates). +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Hungary 1918 only - Apr 1 3:00 1:00 S +Rule Hungary 1918 only - Sep 16 3:00 0 - +Rule Hungary 1919 only - Apr 15 3:00 1:00 S +Rule Hungary 1919 only - Nov 24 3:00 0 - +Rule Hungary 1945 only - May 1 23:00 1:00 S +Rule Hungary 1945 only - Nov 1 0:00 0 - +Rule Hungary 1946 only - Mar 31 2:00s 1:00 S +Rule Hungary 1946 1949 - Oct Sun>=1 2:00s 0 - +Rule Hungary 1947 1949 - Apr Sun>=4 2:00s 1:00 S +Rule Hungary 1950 only - Apr 17 2:00s 1:00 S +Rule Hungary 1950 only - Oct 23 2:00s 0 - +Rule Hungary 1954 1955 - May 23 0:00 1:00 S +Rule Hungary 1954 1955 - Oct 3 0:00 0 - +Rule Hungary 1956 only - Jun Sun>=1 0:00 1:00 S +Rule Hungary 1956 only - Sep lastSun 0:00 0 - +Rule Hungary 1957 only - Jun Sun>=1 1:00 1:00 S +Rule Hungary 1957 only - Sep lastSun 3:00 0 - +Rule Hungary 1980 only - Apr 6 1:00 1:00 S +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Europe/Budapest 1:16:20 - LMT 1890 Oct + 1:00 C-Eur CE%sT 1918 + 1:00 Hungary CE%sT 1941 Apr 8 + 1:00 C-Eur CE%sT 1945 + 1:00 Hungary CE%sT 1980 Sep 28 2:00s + 1:00 EU CE%sT + +# Iceland +# +# From Adam David (1993-11-06): +# The name of the timezone in Iceland for system / mail / news purposes is GMT. +# +# (1993-12-05): +# This material is paraphrased from the 1988 edition of the University of +# Iceland Almanak. +# +# From January 1st, 1908 the whole of Iceland was standardised at 1 hour +# behind GMT. Previously, local mean solar time was used in different parts +# of Iceland, the almanak had been based on Reykjavik mean solar time which +# was 1 hour and 28 minutes behind GMT. +# +# "first day of winter" referred to [below] means the first day of the 26 weeks +# of winter, according to the old icelandic calendar that dates back to the +# time the norsemen first settled Iceland. The first day of winter is always +# Saturday, but is not dependent on the Julian or Gregorian calendars. +# +# (1993-12-10): +# I have a reference from the Oxford Icelandic-English dictionary for the +# beginning of winter, which ties it to the ecclesiastical calendar (and thus +# to the julian/gregorian calendar) over the period in question. +# the winter begins on the Saturday next before St. Luke's day +# (old style), or on St. Luke's day, if a Saturday. +# St. Luke's day ought to be traceable from ecclesiastical sources. "old style" +# might be a reference to the Julian calendar as opposed to Gregorian, or it +# might mean something else (???). +# +# From Paul Eggert (2014-11-22): +# The information below is taken from the 1988 Almanak; see +# http://www.almanak.hi.is/klukkan.html +# +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Iceland 1917 1919 - Feb 19 23:00 1:00 S +Rule Iceland 1917 only - Oct 21 1:00 0 - +Rule Iceland 1918 1919 - Nov 16 1:00 0 - +Rule Iceland 1921 only - Mar 19 23:00 1:00 S +Rule Iceland 1921 only - Jun 23 1:00 0 - +Rule Iceland 1939 only - Apr 29 23:00 1:00 S +Rule Iceland 1939 only - Oct 29 2:00 0 - +Rule Iceland 1940 only - Feb 25 2:00 1:00 S +Rule Iceland 1940 1941 - Nov Sun>=2 1:00s 0 - +Rule Iceland 1941 1942 - Mar Sun>=2 1:00s 1:00 S +# 1943-1946 - first Sunday in March until first Sunday in winter +Rule Iceland 1943 1946 - Mar Sun>=1 1:00s 1:00 S +Rule Iceland 1942 1948 - Oct Sun>=22 1:00s 0 - +# 1947-1967 - first Sunday in April until first Sunday in winter +Rule Iceland 1947 1967 - Apr Sun>=1 1:00s 1:00 S +# 1949 and 1967 Oct transitions delayed by 1 week +Rule Iceland 1949 only - Oct 30 1:00s 0 - +Rule Iceland 1950 1966 - Oct Sun>=22 1:00s 0 - +Rule Iceland 1967 only - Oct 29 1:00s 0 - +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Atlantic/Reykjavik -1:28 - LMT 1908 + -1:00 Iceland IS%sT 1968 Apr 7 1:00s + 0:00 - GMT + +# Italy +# +# From Paul Eggert (2001-03-06): +# Sicily and Sardinia each had their own time zones from 1866 to 1893, +# called Palermo Time (+00:53:28) and Cagliari Time (+00:36:32). +# During World War II, German-controlled Italy used German time. +# 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: +# +# 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 +# +# 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 - +# 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 + 1:00 Italy CE%sT 1980 + 1:00 EU CE%sT + +Link Europe/Rome Europe/Vatican +Link Europe/Rome Europe/San_Marino + +# Latvia + +# From Liene Kanepe (1998-09-17): + +# I asked about this matter Scientific Secretary of the Institute of Astronomy +# of The University of Latvia Dr. paed Mr. Ilgonis Vilks. I also searched the +# correct data in juridical acts and I found some juridical documents about +# changes in the counting of time in Latvia from 1981.... +# +# Act No. 35 of the Council of Ministers of Latvian SSR of 1981-01-22 ... +# according to the Act No. 925 of the Council of Ministers of USSR of 1980-10-24 +# ...: all year round the time of 2nd time zone + 1 hour, in addition turning +# the hands of the clock 1 hour forward on 1 April at 00:00 (GMT 31 March 21:00) +# and 1 hour backward on the 1 October at 00:00 (GMT 30 September 20:00). +# +# Act No. 592 of the Council of Ministers of Latvian SSR of 1984-09-24 ... +# according to the Act No. 967 of the Council of Ministers of USSR of 1984-09-13 +# ...: all year round the time of 2nd time zone + 1 hour, in addition turning +# the hands of the clock 1 hour forward on the last Sunday of March at 02:00 +# (GMT 23:00 on the previous day) and 1 hour backward on the last Sunday of +# September at 03:00 (GMT 23:00 on the previous day). +# +# Act No. 81 of the Council of Ministers of Latvian SSR of 1989-03-22 ... +# according to the Act No. 227 of the Council of Ministers of USSR of 1989-03-14 +# ...: since the last Sunday of March 1989 in Lithuanian SSR, Latvian SSR, +# Estonian SSR and Kaliningrad region of Russian Federation all year round the +# time of 2nd time zone (Moscow time minus one hour). On the territory of Latvia +# transition to summer time is performed on the last Sunday of March at 02:00 +# (GMT 00:00), turning the hands of the clock 1 hour forward. The end of +# daylight saving time is performed on the last Sunday of September at 03:00 +# (GMT 00:00), turning the hands of the clock 1 hour backward. Exception is +# 1989-03-26, when we must not turn the hands of the clock.... +# +# The Regulations of the Cabinet of Ministers of the Republic of Latvia of +# 1997-01-21 on transition to Summer time ... established the same order of +# daylight savings time settings as in the States of the European Union. + +# From Andrei Ivanov (2000-03-06): +# This year Latvia will not switch to Daylight Savings Time (as specified in +# The Regulations of the Cabinet of Ministers of the Rep. of Latvia of +# 29-Feb-2000 (No. 79) <http://www.lv-laiks.lv/wwwraksti/2000/071072/vd4.htm>, +# in Latvian for subscribers only). + +# From RFE/RL Newsline +# http://www.rferl.org/newsline/2001/01/3-CEE/cee-030101.html +# (2001-01-03), noted after a heads-up by Rives McDow: +# The Latvian government on 2 January decided that the country will +# institute daylight-saving time this spring, LETA reported. +# Last February the three Baltic states decided not to turn back their +# clocks one hour in the spring.... +# Minister of Economy Aigars Kalvītis noted that Latvia had too few +# daylight hours and thus decided to comply with a draft European +# Commission directive that provides for instituting daylight-saving +# time in EU countries between 2002 and 2006. The Latvian government +# urged Lithuania and Estonia to adopt a similar time policy, but it +# appears that they will not do so.... + +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Latvia 1989 1996 - Mar lastSun 2:00s 1:00 S +Rule Latvia 1989 1996 - Sep lastSun 2:00s 0 - + +# Milne 1899 says Riga was 1:36:28 (Polytechnique House time). +# Byalokoz 1919 says Latvia was 1:36:34. +# Go with Byalokoz. + +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Europe/Riga 1:36:34 - LMT 1880 + 1:36:34 - RMT 1918 Apr 15 2:00 # Riga MT + 1:36:34 1:00 LST 1918 Sep 16 3:00 # Latvian ST + 1:36:34 - RMT 1919 Apr 1 2:00 + 1:36:34 1:00 LST 1919 May 22 3:00 + 1:36:34 - RMT 1926 May 11 + 2:00 - EET 1940 Aug 5 + 3:00 - MSK 1941 Jul + 1:00 C-Eur CE%sT 1944 Oct 13 + 3:00 Russia MSK/MSD 1989 Mar lastSun 2:00s + 2:00 1:00 EEST 1989 Sep lastSun 2:00s + 2:00 Latvia EE%sT 1997 Jan 21 + 2:00 EU EE%sT 2000 Feb 29 + 2:00 - EET 2001 Jan 2 + 2:00 EU EE%sT + +# Liechtenstein + +# From Paul Eggert (2013-09-09): +# Shanks & Pottenger say Vaduz is like Zurich. + +# From Alois Treindl (2013-09-18): +# http://www.eliechtensteinensia.li/LIJ/1978/1938-1978/1941.pdf +# ... confirms on p. 6 that Liechtenstein followed Switzerland in 1941 and 1942. +# I ... translate only the last two paragraphs: +# ... during second world war, in the years 1941 and 1942, Liechtenstein +# introduced daylight saving time, adapting to Switzerland. From 1943 on +# central European time was in force throughout the year. +# From a report of the duke's government to the high council, +# regarding the introduction of a time law, of 31 May 1977. + +Link Europe/Zurich Europe/Vaduz + + +# Lithuania + +# From Paul Eggert (2016-03-18): +# The 1989 transition is from USSR act No. 227 (1989-03-14). + +# From Paul Eggert (1996-11-22): +# IATA SSIM (1992/1996) says Lithuania uses W-Eur rules, but since it is +# known to be wrong about Estonia and Latvia, assume it's wrong here too. + +# From Marius Gedminas (1998-08-07): +# I would like to inform that in this year Lithuanian time zone +# (Europe/Vilnius) was changed. + +# From ELTA No. 972 (2582) (1999-09-29) <http://www.elta.lt/>, +# via Steffen Thorsen: +# Lithuania has shifted back to the second time zone (GMT plus two hours) +# to be valid here starting from October 31, +# as decided by the national government on Wednesday.... +# The Lithuanian government also announced plans to consider a +# motion to give up shifting to summer time in spring, as it was +# already done by Estonia. + +# From the Fact File, Lithuanian State Department of Tourism +# <http://www.tourism.lt/informa/ff.htm> (2000-03-27): +# Local time is GMT+2 hours ..., no daylight saving. + +# From a user via Klaus Marten (2003-02-07): +# As a candidate for membership of the European Union, Lithuania will +# observe Summer Time in 2003, changing its clocks at the times laid +# down in EU Directive 2000/84 of 19.I.01 (i.e. at the same times as its +# neighbour Latvia). The text of the Lithuanian government Order of +# 7.XI.02 to this effect can be found at +# http://www.lrvk.lt/nut/11/n1749.htm + + +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Europe/Vilnius 1:41:16 - LMT 1880 + 1:24:00 - WMT 1917 # Warsaw Mean Time + 1:35:36 - KMT 1919 Oct 10 # Kaunas Mean Time + 1:00 - CET 1920 Jul 12 + 2:00 - EET 1920 Oct 9 + 1:00 - CET 1940 Aug 3 + 3:00 - MSK 1941 Jun 24 + 1:00 C-Eur CE%sT 1944 Aug + 3:00 Russia MSK/MSD 1989 Mar 26 2:00s + 2:00 Russia EE%sT 1991 Sep 29 2:00s + 2:00 C-Eur EE%sT 1998 + 2:00 - EET 1998 Mar 29 1:00u + 1:00 EU CE%sT 1999 Oct 31 1:00u + 2:00 - EET 2003 Jan 1 + 2:00 EU EE%sT + +# Luxembourg +# Whitman disagrees with most of these dates in minor ways; +# go with Shanks & Pottenger. +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Lux 1916 only - May 14 23:00 1:00 S +Rule Lux 1916 only - Oct 1 1:00 0 - +Rule Lux 1917 only - Apr 28 23:00 1:00 S +Rule Lux 1917 only - Sep 17 1:00 0 - +Rule Lux 1918 only - Apr Mon>=15 2:00s 1:00 S +Rule Lux 1918 only - Sep Mon>=15 2:00s 0 - +Rule Lux 1919 only - Mar 1 23:00 1:00 S +Rule Lux 1919 only - Oct 5 3:00 0 - +Rule Lux 1920 only - Feb 14 23:00 1:00 S +Rule Lux 1920 only - Oct 24 2:00 0 - +Rule Lux 1921 only - Mar 14 23:00 1:00 S +Rule Lux 1921 only - Oct 26 2:00 0 - +Rule Lux 1922 only - Mar 25 23:00 1:00 S +Rule Lux 1922 only - Oct Sun>=2 1:00 0 - +Rule Lux 1923 only - Apr 21 23:00 1:00 S +Rule Lux 1923 only - Oct Sun>=2 2:00 0 - +Rule Lux 1924 only - Mar 29 23:00 1:00 S +Rule Lux 1924 1928 - Oct Sun>=2 1:00 0 - +Rule Lux 1925 only - Apr 5 23:00 1:00 S +Rule Lux 1926 only - Apr 17 23:00 1:00 S +Rule Lux 1927 only - Apr 9 23:00 1:00 S +Rule Lux 1928 only - Apr 14 23:00 1:00 S +Rule Lux 1929 only - Apr 20 23:00 1:00 S +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Europe/Luxembourg 0:24:36 - LMT 1904 Jun + 1:00 Lux CE%sT 1918 Nov 25 + 0:00 Lux WE%sT 1929 Oct 6 2:00s + 0:00 Belgium WE%sT 1940 May 14 3:00 + 1:00 C-Eur WE%sT 1944 Sep 18 3:00 + 1:00 Belgium CE%sT 1977 + 1:00 EU CE%sT + +# Macedonia +# See Europe/Belgrade. + +# Malta +# 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 - +Rule Malta 1974 only - Apr 21 0:00s 1:00 S +Rule Malta 1974 only - Sep 16 0:00s 0 - +Rule Malta 1975 1979 - Apr Sun>=15 2:00 1:00 S +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 + +# Moldova + +# From Stepan Golosunov (2016-03-07): +# the act of the government of the Republic of Moldova Nr. 132 from 1990-05-04 +# http://lex.justice.md/viewdoc.php?action=view&view=doc&id=298782&lang=2 +# ... says that since 1990-05-06 on the territory of the Moldavian SSR +# time would be calculated as the standard time of the second time belt +# plus one hour of the "summer" time. To implement that clocks would be +# adjusted one hour backwards at 1990-05-06 2:00. After that "summer" +# time would be cancelled last Sunday of September at 3:00 and +# reintroduced last Sunday of March at 2:00. + +# From Paul Eggert (2006-03-22): +# A previous version of this database followed Shanks & Pottenger, who write +# that Tiraspol switched to Moscow time on 1992-01-19 at 02:00. +# However, this is most likely an error, as Moldova declared independence +# on 1991-08-27 (the 1992-01-19 date is that of a Russian decree). +# In early 1992 there was large-scale interethnic violence in the area +# and it's possible that some Russophones continued to observe Moscow time. +# But [two people] separately reported via +# Jesper Nørgaard that as of 2001-01-24 Tiraspol was like Chisinau. +# The Tiraspol entry has therefore been removed for now. +# +# From Alexander Krivenyshev (2011-10-17): +# Pridnestrovian Moldavian Republic (PMR, also known as +# "Pridnestrovie") has abolished seasonal clock change (no transition +# to the Winter Time). +# +# News (in Russian): +# http://www.kyivpost.ua/russia/news/pridnestrove-otkazalos-ot-perehoda-na-zimnee-vremya-30954.html +# http://www.allmoldova.com/moldova-news/1249064116.html +# +# The substance of this change (reinstatement of the Tiraspol entry) +# is from a patch from Petr Machata (2011-10-17) +# +# From Tim Parenti (2011-10-19) +# In addition, being situated at +4651+2938 would give Tiraspol +# a pre-1880 LMT offset of 1:58:32. +# +# (which agrees with the earlier entry that had been removed) +# +# From Alexander Krivenyshev (2011-10-26) +# NO need to divide Moldova into two timezones at this point. +# As of today, Transnistria (Pridnestrovie)- Tiraspol reversed its own +# decision to abolish DST this winter. +# Following Moldova and neighboring Ukraine- Transnistria (Pridnestrovie)- +# Tiraspol will go back to winter time on October 30, 2011. +# News from Moldova (in russian): +# http://ru.publika.md/link_317061.html + +# From Roman Tudos (2015-07-02): +# http://lex.justice.md/index.php?action=view&view=doc&lang=1&id=355077 +# From Paul Eggert (2015-07-01): +# The abovementioned official link to IGO1445-868/2014 states that +# 2014-10-26's fallback transition occurred at 03:00 local time. Also, +# http://www.trm.md/en/social/la-30-martie-vom-trece-la-ora-de-vara +# says the 2014-03-30 spring-forward transition was at 02:00 local time. +# Guess that since 1997 Moldova has switched one hour before the EU. + +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Moldova 1997 max - Mar lastSun 2:00 1:00 S +Rule Moldova 1997 max - Oct lastSun 3:00 0 - + +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Europe/Chisinau 1:55:20 - 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 1990 May 6 2:00 + 2:00 Russia EE%sT 1992 + 2:00 E-Eur EE%sT 1997 +# See Romania commentary for the guessed 1997 transition to EU rules. + 2:00 Moldova EE%sT + +# Monaco +# Shanks & Pottenger give 0:09:20 for Paris Mean Time; go with Howse's +# more precise 0:09:21. +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Europe/Monaco 0:29:32 - LMT 1891 Mar 15 + 0:09:21 - PMT 1911 Mar 11 # Paris Mean Time + 0:00 France WE%sT 1945 Sep 16 3:00 + 1:00 France CE%sT 1977 + 1:00 EU CE%sT + +# Montenegro +# See Europe/Belgrade. + +# Netherlands + +# Howse writes that the Netherlands' railways used GMT between 1892 and 1940, +# but for other purposes the Netherlands used Amsterdam mean time. + +# However, Robert H. van Gent writes (2001-04-01): +# Howse's statement is only correct up to 1909. From 1909-05-01 (00:00:00 +# Amsterdam mean time) onwards, the whole of the Netherlands (including +# the Dutch railways) was required by law to observe Amsterdam mean time +# (19 minutes 32.13 seconds ahead of GMT). This had already been the +# common practice (except for the railways) for many decades but it was +# not until 1909 when the Dutch government finally defined this by law. +# On 1937-07-01 this was changed to 20 minutes (exactly) ahead of GMT and +# was generally known as Dutch Time ("Nederlandse Tijd"). +# +# (2001-04-08): +# 1892-05-01 was the date when the Dutch railways were by law required to +# observe GMT while the remainder of the Netherlands adhered to the common +# practice of following Amsterdam mean time. +# +# (2001-04-09): +# In 1835 the authorities of the province of North Holland requested the +# municipal authorities of the towns and cities in the province to observe +# Amsterdam mean time but I do not know in how many cases this request was +# actually followed. +# +# From 1852 onwards the Dutch telegraph offices were by law required to +# observe Amsterdam mean time. As the time signals from the observatory of +# Leiden were also distributed by the telegraph system, I assume that most +# places linked up with the telegraph (and railway) system automatically +# adopted Amsterdam mean time. +# +# Although the early Dutch railway companies initially observed a variety +# of times, most of them had adopted Amsterdam mean time by 1858 but it +# was not until 1866 when they were all required by law to observe +# Amsterdam mean time. + +# The data entries before 1945 are taken from +# http://www.phys.uu.nl/~vgent/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 +Rule Neth 1916 only - Oct 1 0:00 0 AMT # Amsterdam Mean Time +Rule Neth 1917 only - Apr 16 2:00s 1:00 NST +Rule Neth 1917 only - Sep 17 2:00s 0 AMT +Rule Neth 1918 1921 - Apr Mon>=1 2:00s 1:00 NST +Rule Neth 1918 1921 - Sep lastMon 2:00s 0 AMT +Rule Neth 1922 only - Mar lastSun 2:00s 1:00 NST +Rule Neth 1922 1936 - Oct Sun>=2 2:00s 0 AMT +Rule Neth 1923 only - Jun Fri>=1 2:00s 1:00 NST +Rule Neth 1924 only - Mar lastSun 2:00s 1:00 NST +Rule Neth 1925 only - Jun Fri>=1 2:00s 1:00 NST +# From 1926 through 1939 DST began 05-15, except that it was delayed by a week +# in years when 05-15 fell in the Pentecost weekend. +Rule Neth 1926 1931 - May 15 2:00s 1:00 NST +Rule Neth 1932 only - May 22 2:00s 1:00 NST +Rule Neth 1933 1936 - May 15 2:00s 1:00 NST +Rule Neth 1937 only - May 22 2:00s 1:00 NST +Rule Neth 1937 only - Jul 1 0:00 1:00 S +Rule Neth 1937 1939 - Oct Sun>=2 2:00s 0 - +Rule Neth 1938 1939 - May 15 2:00s 1:00 S +Rule Neth 1945 only - Apr 2 2:00s 1:00 S +Rule Neth 1945 only - Sep 16 2:00s 0 - +# +# Amsterdam Mean Time was +00:19:32.13 exactly, but the .13 is omitted +# below because the current format requires GMTOFF to be an integer. +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Europe/Amsterdam 0:19:32 - LMT 1835 + 0:19:32 Neth %s 1937 Jul 1 + 0:20 Neth NE%sT 1940 May 16 0:00 # Dutch Time + 1:00 C-Eur CE%sT 1945 Apr 2 2:00 + 1:00 Neth CE%sT 1977 + 1:00 EU CE%sT + +# Norway +# http://met.no/met/met_lex/q_u/sommertid.html (2004-01) agrees with Shanks & +# Pottenger. +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Norway 1916 only - May 22 1:00 1:00 S +Rule Norway 1916 only - Sep 30 0:00 0 - +Rule Norway 1945 only - Apr 2 2:00s 1:00 S +Rule Norway 1945 only - Oct 1 2:00s 0 - +Rule Norway 1959 1964 - Mar Sun>=15 2:00s 1:00 S +Rule Norway 1959 1965 - Sep Sun>=15 2:00s 0 - +Rule Norway 1965 only - Apr 25 2:00s 1:00 S +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Europe/Oslo 0:43:00 - LMT 1895 Jan 1 + 1:00 Norway CE%sT 1940 Aug 10 23:00 + 1:00 C-Eur CE%sT 1945 Apr 2 2:00 + 1:00 Norway CE%sT 1980 + 1:00 EU CE%sT + +# Svalbard & Jan Mayen + +# From Steffen Thorsen (2001-05-01): +# Although I could not find it explicitly, it seems that Jan Mayen and +# Svalbard have been using the same time as Norway at least since the +# time they were declared as parts of Norway. Svalbard was declared +# as a part of Norway by law of 1925-07-17 no 11, section 4 and Jan +# Mayen by law of 1930-02-27 no 2, section 2. (From +# <http://www.lovdata.no/all/nl-19250717-011.html> and +# <http://www.lovdata.no/all/nl-19300227-002.html>). The law/regulation +# for normal/standard time in Norway is from 1894-06-29 no 1 (came +# into operation on 1895-01-01) and Svalbard/Jan Mayen seem to be a +# part of this law since 1925/1930. (From +# <http://www.lovdata.no/all/nl-18940629-001.html>) I have not been +# able to find if Jan Mayen used a different time zone (e.g. -0100) +# before 1930. Jan Mayen has only been "inhabited" since 1921 by +# Norwegian meteorologists and maybe used the same time as Norway ever +# since 1921. Svalbard (Arctic/Longyearbyen) has been inhabited since +# before 1895, and therefore probably changed the local time somewhere +# between 1895 and 1925 (inclusive). + +# From Paul Eggert (2013-09-04): +# +# Actually, Jan Mayen was never occupied by Germany during World War II, +# so it must have diverged from Oslo time during the war, as Oslo was +# keeping Berlin time. +# +# <http://home.no.net/janmayen/history.htm> says that the meteorologists +# burned down their station in 1940 and left the island, but returned in +# 1941 with a small Norwegian garrison and continued operations despite +# frequent air attacks from Germans. In 1943 the Americans established a +# radiolocating station on the island, called "Atlantic City". Possibly +# the UT offset changed during the war, but I think it unlikely that +# Jan Mayen used German daylight-saving rules. +# +# Svalbard is more complicated, as it was raided in August 1941 by an +# Allied party that evacuated the civilian population to England (says +# <http://www.bartleby.com/65/sv/Svalbard.html>). The Svalbard FAQ +# <http://www.svalbard.com/SvalbardFAQ.html> says that the Germans were +# expelled on 1942-05-14. However, small parties of Germans did return, +# and according to Wilhelm Dege's book "War North of 80" (1954) +# http://www.ucalgary.ca/UofC/departments/UP/1-55238/1-55238-110-2.html +# the German armed forces at the Svalbard weather station code-named +# Haudegen did not surrender to the Allies until September 1945. +# +# All these events predate our cutoff date of 1970, so use Europe/Oslo +# for these regions. +Link Europe/Oslo Arctic/Longyearbyen + +# Poland + +# The 1919 dates and times can be found in Tygodnik Urzędowy nr 1 (1919-03-20), +# <http://www.wbc.poznan.pl/publication/32156> pp 1-2. + +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Poland 1918 1919 - Sep 16 2:00s 0 - +Rule Poland 1919 only - Apr 15 2:00s 1:00 S +Rule Poland 1944 only - Apr 3 2:00s 1:00 S +# Whitman gives 1944 Nov 30; go with Shanks & Pottenger. +Rule Poland 1944 only - Oct 4 2:00 0 - +# For 1944-1948 Whitman gives the previous day; go with Shanks & Pottenger. +Rule Poland 1945 only - Apr 29 0:00 1:00 S +Rule Poland 1945 only - Nov 1 0:00 0 - +# For 1946 on the source is Kazimierz Borkowski, +# Toruń Center for Astronomy, Dept. of Radio Astronomy, Nicolaus Copernicus U., +# http://www.astro.uni.torun.pl/~kb/Artykuly/U-PA/Czas2.htm#tth_tAb1 +# Thanks to Przemysław Augustyniak (2005-05-28) for this reference. +# He also gives these further references: +# Mon Pol nr 13, poz 162 (1995) <http://www.abc.com.pl/serwis/mp/1995/0162.htm> +# Druk nr 2180 (2003) <http://www.senat.gov.pl/k5/dok/sejm/053/2180.pdf> +Rule Poland 1946 only - Apr 14 0:00s 1:00 S +Rule Poland 1946 only - Oct 7 2:00s 0 - +Rule Poland 1947 only - May 4 2:00s 1:00 S +Rule Poland 1947 1949 - Oct Sun>=1 2:00s 0 - +Rule Poland 1948 only - Apr 18 2:00s 1:00 S +Rule Poland 1949 only - Apr 10 2:00s 1:00 S +Rule Poland 1957 only - Jun 2 1:00s 1:00 S +Rule Poland 1957 1958 - Sep lastSun 1:00s 0 - +Rule Poland 1958 only - Mar 30 1:00s 1:00 S +Rule Poland 1959 only - May 31 1:00s 1:00 S +Rule Poland 1959 1961 - Oct Sun>=1 1:00s 0 - +Rule Poland 1960 only - Apr 3 1:00s 1:00 S +Rule Poland 1961 1964 - May lastSun 1:00s 1:00 S +Rule Poland 1962 1964 - Sep lastSun 1:00s 0 - +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Europe/Warsaw 1:24:00 - LMT 1880 + 1:24:00 - WMT 1915 Aug 5 # Warsaw Mean Time + 1:00 C-Eur CE%sT 1918 Sep 16 3:00 + 2:00 Poland EE%sT 1922 Jun + 1:00 Poland CE%sT 1940 Jun 23 2:00 + 1:00 C-Eur CE%sT 1944 Oct + 1:00 Poland CE%sT 1977 + 1:00 W-Eur CE%sT 1988 + 1:00 EU CE%sT + +# Portugal +# +# 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 +# Lisbon was at -0:36:44.68, but switched to GMT on 1912-01-01 at 00:00. +# Round the old offset to -0:36:45. This agrees with Willett but disagrees +# with Shanks, who says the transition occurred on 1911-05-24 at 00:00 for +# Europe/Lisbon, Atlantic/Azores, and Atlantic/Madeira. +# +# From Rui Pedro Salgueiro (1992-11-12): +# Portugal has recently (September, 27) changed timezone +# (from WET to MET or CET) to harmonize with EEC. +# +# Martin Bruckmann (1996-02-29) reports via Peter Ilieve +# that Portugal is reverting to 0:00 by not moving its clocks this spring. +# The new Prime Minister was fed up with getting up in the dark in the winter. +# +# From Paul Eggert (1996-11-12): +# IATA SSIM (1991-09) reports several 1991-09 and 1992-09 transitions +# at 02:00u, not 01:00u. Assume that these are typos. +# IATA SSIM (1991/1992) reports that the Azores were at -1:00. +# IATA SSIM (1993-02) says +0:00; later issues (through 1996-09) say -1:00. +# Guess that the Azores changed to EU rules in 1992 (since that's when Portugal +# harmonized with the EU), and that they stayed +0:00 that winter. +# +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +# DSH writes that despite Decree 1,469 (1915), the change to the clocks was not +# done every year, depending on what Spain did, because of railroad schedules. +# Go with Shanks & Pottenger. +Rule Port 1916 only - Jun 17 23:00 1:00 S +# Whitman gives 1916 Oct 31; go with Shanks & Pottenger. +Rule Port 1916 only - Nov 1 1:00 0 - +Rule Port 1917 only - Feb 28 23:00s 1:00 S +Rule Port 1917 1921 - Oct 14 23:00s 0 - +Rule Port 1918 only - Mar 1 23:00s 1:00 S +Rule Port 1919 only - Feb 28 23:00s 1:00 S +Rule Port 1920 only - Feb 29 23:00s 1:00 S +Rule Port 1921 only - Feb 28 23:00s 1:00 S +Rule Port 1924 only - Apr 16 23:00s 1:00 S +Rule Port 1924 only - Oct 14 23:00s 0 - +Rule Port 1926 only - Apr 17 23:00s 1:00 S +Rule Port 1926 1929 - Oct Sat>=1 23:00s 0 - +Rule Port 1927 only - Apr 9 23:00s 1:00 S +Rule Port 1928 only - Apr 14 23:00s 1:00 S +Rule Port 1929 only - Apr 20 23:00s 1:00 S +Rule Port 1931 only - Apr 18 23:00s 1:00 S +# Whitman gives 1931 Oct 8; go with Shanks & Pottenger. +Rule Port 1931 1932 - Oct Sat>=1 23:00s 0 - +Rule Port 1932 only - Apr 2 23:00s 1:00 S +Rule Port 1934 only - Apr 7 23:00s 1:00 S +# Whitman gives 1934 Oct 5; go with Shanks & Pottenger. +Rule Port 1934 1938 - Oct Sat>=1 23:00s 0 - +# Shanks & Pottenger give 1935 Apr 30; go with Whitman. +Rule Port 1935 only - Mar 30 23:00s 1:00 S +Rule Port 1936 only - Apr 18 23:00s 1:00 S +# Whitman gives 1937 Apr 2; go with Shanks & Pottenger. +Rule Port 1937 only - Apr 3 23:00s 1:00 S +Rule Port 1938 only - Mar 26 23:00s 1:00 S +Rule Port 1939 only - Apr 15 23:00s 1:00 S +# Whitman gives 1939 Oct 7; go with Shanks & Pottenger. +Rule Port 1939 only - Nov 18 23:00s 0 - +Rule Port 1940 only - Feb 24 23:00s 1:00 S +# Shanks & Pottenger give 1940 Oct 7; go with Whitman. +Rule Port 1940 1941 - Oct 5 23:00s 0 - +Rule Port 1941 only - Apr 5 23:00s 1:00 S +Rule Port 1942 1945 - Mar Sat>=8 23:00s 1:00 S +Rule Port 1942 only - Apr 25 22:00s 2:00 M # Midsummer +Rule Port 1942 only - Aug 15 22:00s 1:00 S +Rule Port 1942 1945 - Oct Sat>=24 23:00s 0 - +Rule Port 1943 only - Apr 17 22:00s 2:00 M +Rule Port 1943 1945 - Aug Sat>=25 22:00s 1:00 S +Rule Port 1944 1945 - Apr Sat>=21 22:00s 2:00 M +Rule Port 1946 only - Apr Sat>=1 23:00s 1:00 S +Rule Port 1946 only - Oct Sat>=1 23:00s 0 - +Rule Port 1947 1949 - Apr Sun>=1 2:00s 1:00 S +Rule Port 1947 1949 - Oct Sun>=1 2:00s 0 - +# Shanks & Pottenger say DST was observed in 1950; go with Whitman. +# Whitman gives Oct lastSun for 1952 on; go with Shanks & Pottenger. +Rule Port 1951 1965 - Apr Sun>=1 2:00s 1:00 S +Rule Port 1951 1965 - Oct Sun>=1 2:00s 0 - +Rule Port 1977 only - Mar 27 0:00s 1:00 S +Rule Port 1977 only - Sep 25 0:00s 0 - +Rule Port 1978 1979 - Apr Sun>=1 0:00s 1:00 S +Rule Port 1978 only - Oct 1 0:00s 0 - +Rule Port 1979 1982 - Sep lastSun 1:00s 0 - +Rule Port 1980 only - Mar lastSun 0:00s 1:00 S +Rule Port 1981 1982 - Mar lastSun 1:00s 1:00 S +Rule Port 1983 only - Mar lastSun 2:00s 1:00 S +# +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Europe/Lisbon -0:36:45 - LMT 1884 + -0:36:45 - LMT 1912 Jan 1 # Lisbon Mean Time + 0:00 Port WE%sT 1966 Apr 3 2:00 + 1:00 - CET 1976 Sep 26 1:00 + 0:00 Port WE%sT 1983 Sep 25 1:00s + 0:00 W-Eur WE%sT 1992 Sep 27 1:00s + 1:00 EU CE%sT 1996 Mar 31 1:00u + 0:00 EU WE%sT +Zone Atlantic/Azores -1:42:40 - LMT 1884 # Ponta Delgada + -1:54:32 - HMT 1912 Jan 1 # Horta Mean Time + -2:00 Port AZO%sT 1966 Apr 3 2:00 # Azores Time + -1:00 Port AZO%sT 1983 Sep 25 1:00s + -1:00 W-Eur AZO%sT 1992 Sep 27 1:00s + 0:00 EU WE%sT 1993 Mar 28 1:00u + -1:00 EU AZO%sT +Zone Atlantic/Madeira -1:07:36 - LMT 1884 # Funchal + -1:07:36 - FMT 1912 Jan 1 # Funchal Mean Time + -1:00 Port MAD%sT 1966 Apr 3 2:00 # Madeira Time + 0:00 Port WE%sT 1983 Sep 25 1:00s + 0:00 EU WE%sT + +# Romania +# +# From Paul Eggert (1999-10-07): +# Nine O'clock <http://www.nineoclock.ro/POL/1778pol.html> +# (1998-10-23) reports that the switch occurred at +# 04:00 local time in fall 1998. For lack of better info, +# assume that Romania and Moldova switched to EU rules in 1997, +# the same year as Bulgaria. +# +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Romania 1932 only - May 21 0:00s 1:00 S +Rule Romania 1932 1939 - Oct Sun>=1 0:00s 0 - +Rule Romania 1933 1939 - Apr Sun>=2 0:00s 1:00 S +Rule Romania 1979 only - May 27 0:00 1:00 S +Rule Romania 1979 only - Sep lastSun 0:00 0 - +Rule Romania 1980 only - Apr 5 23:00 1:00 S +Rule Romania 1980 only - Sep lastSun 1:00 0 - +Rule Romania 1991 1993 - Mar lastSun 0:00s 1:00 S +Rule Romania 1991 1993 - Sep lastSun 0:00s 0 - +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Europe/Bucharest 1:44:24 - LMT 1891 Oct + 1:44:24 - BMT 1931 Jul 24 # Bucharest MT + 2:00 Romania EE%sT 1981 Mar 29 2:00s + 2:00 C-Eur EE%sT 1991 + 2:00 Romania EE%sT 1994 + 2:00 E-Eur EE%sT 1997 + 2:00 EU EE%sT + + +# Russia + +# From Alexander Krivenyshev (2011-09-15): +# Based on last Russian Government Decree No. 725 on August 31, 2011 +# (Government document +# http://www.government.ru/gov/results/16355/print/ +# in Russian) +# there are few corrections have to be made for some Russian time zones... +# All updated Russian Time Zones were placed in table and translated to English +# by WorldTimeZone.com at the link below: +# http://www.worldtimezone.com/dst_news/dst_news_russia36.htm + +# From Sanjeev Gupta (2011-09-27): +# Scans of [Decree No. 23 of January 8, 1992] are available at: +# http://government.consultant.ru/page.aspx?1223966 +# They are in Cyrillic letters (presumably Russian). + +# From Arthur David Olson (2012-05-09): +# Regarding the instant when clocks in time-zone-shifting parts of Russia +# changed in September 2011: +# +# One source is +# http://government.ru/gov/results/16355/ +# which, according to translate.google.com, begins "Decree of August 31, +# 2011 No. 725" and contains no other dates or "effective date" information. +# +# Another source is +# http://www.rg.ru/2011/09/06/chas-zona-dok.html +# which, according to translate.google.com, begins "Resolution of the +# Government of the Russian Federation on August 31, 2011 N 725" and also +# contains "Date first official publication: September 6, 2011 Posted on: +# in the 'RG' - Federal Issue No. 5573 September 6, 2011" but which +# does not contain any "effective date" information. +# +# Another source is +# http://en.wikipedia.org/wiki/Oymyakonsky_District#cite_note-RuTime-7 +# which, in note 8, contains "Resolution No. 725 of August 31, 2011... +# Effective as of after 7 days following the day of the official publication" +# but which does not contain any reference to September 6, 2011. +# +# The Wikipedia article refers to +# http://base.consultant.ru/cons/cgi/online.cgi?req=doc;base=LAW;n=118896 +# which seems to copy the text of the government.ru page. +# +# Tobias Conradi combines Wikipedia's +# "as of after 7 days following the day of the official publication" +# with www.rg.ru's "Date of first official publication: September 6, 2011" to +# get September 13, 2011 as the cutover date (unusually, a Tuesday, as Tobias +# Conradi notes). +# +# None of the sources indicates a time of day for changing clocks. +# +# Go with 2011-09-13 0:00s. + +# From Alexander Krivenyshev (2014-07-01): +# According to the Russian news (ITAR-TASS News Agency) +# http://en.itar-tass.com/russia/738562 +# the State Duma has approved ... the draft bill on returning to +# winter time standard and return Russia 11 time zones. The new +# regulations will come into effect on October 26, 2014 at 02:00 ... +# http://asozd2.duma.gov.ru/main.nsf/%28Spravka%29?OpenAgent&RN=431985-6&02 +# Here is a link where we put together table (based on approved Bill N +# 431985-6) with proposed 11 Russian time zones and corresponding +# areas/cities/administrative centers in the Russian Federation (in English): +# http://www.worldtimezone.com/dst_news/dst_news_russia65.html +# +# From Alexander Krivenyshev (2014-07-22): +# Putin signed the Federal Law 431985-6 ... (in Russian) +# http://itar-tass.com/obschestvo/1333711 +# http://www.pravo.gov.ru:8080/page.aspx?111660 +# http://www.kremlin.ru/acts/46279 +# From October 26, 2014 the new Russian time zone map will looks like this: +# http://www.worldtimezone.com/dst_news/dst_news_russia-map-2014-07.html + +# From Paul Eggert (2006-03-22): +# Except for Moscow after 1919-07-01, I invented the time zone abbreviations. +# Moscow time zone abbreviations after 1919-07-01, and Moscow rules after 1991, +# are from Andrey A. Chernov. The rest is from Shanks & Pottenger, +# except we follow Chernov's report that 1992 DST transitions were Sat +# 23:00, not Sun 02:00s. +# +# From Stanislaw A. Kuzikowski (1994-06-29): +# But now it is some months since Novosibirsk is 3 hours ahead of Moscow! +# I do not know why they have decided to make this change; +# as far as I remember it was done exactly during winter->summer switching +# so we (Novosibirsk) simply did not switch. +# +# From Andrey A. Chernov (1996-10-04): +# 'MSK' and 'MSD' were born and used initially on Moscow computers with +# UNIX-like OSes by several developer groups (e.g. Demos group, Kiae group).... +# The next step was the UUCP network, the Relcom predecessor +# (used mainly for mail), and MSK/MSD was actively used there. +# +# From Chris Carrier (1996-10-30): +# According to a friend of mine who rode the Trans-Siberian Railroad from +# Moscow to Irkutsk in 1995, public air and rail transport in Russia ... +# still follows Moscow time, no matter where in Russia it is located. +# +# For Grozny, Chechnya, we have the following story from +# John Daniszewski, "Scavengers in the Rubble", Los Angeles Times (2001-02-07): +# News - often false - is spread by word of mouth. A rumor that it was +# time to move the clocks back put this whole city out of sync with +# the rest of Russia for two weeks - even soldiers stationed here began +# enforcing curfew at the wrong time. +# +# From Gwillim Law (2001-06-05): +# There's considerable evidence that Sakhalin Island used to be in +# UTC+11, and has changed to UTC+10, in this decade. I start with the +# SSIM, which listed Yuzhno-Sakhalinsk in zone RU10 along with Magadan +# until February 1997, and then in RU9 with Khabarovsk and Vladivostok +# since September 1997.... Although the Kuril Islands are +# administratively part of Sakhalin oblast', they appear to have +# remained on UTC+11 along with Magadan. + +# From Tim Parenti (2014-07-06): +# The comments detailing the coverage of each Russian zone are meant to assist +# with maintenance only and represent our best guesses as to which regions +# are covered by each zone. They are not meant to be taken as an authoritative +# listing. The region codes listed come from +# http://en.wikipedia.org/w/?title=Federal_subjects_of_Russia&oldid=611810498 +# and are used for convenience only; no guarantees are made regarding their +# future stability. ISO 3166-2:RU codes are also listed for first-level +# divisions where available. + +# Zone NAME GMTOFF RULES FORMAT [UNTIL] + + +# From Tim Parenti (2014-07-03): +# Europe/Kaliningrad covers... +# 39 RU-KGD Kaliningrad Oblast + +# From Paul Eggert (2016-03-18): +# The 1989 transition is from USSR act No. 227 (1989-03-14). + +# From Stepan Golosunov (2016-03-07): +# http://www.rgo.ru/ru/kaliningradskoe-oblastnoe-otdelenie/ob-otdelenii/publikacii/kak-nam-zhilos-bez-letnego-vremeni +# confirms that the 1989 change to Moscow-1 was implemented. +# (The article, though, is misattributed to 1990 while saying that +# summer->winter transition would be done on the 24 of September. But +# 1990-09-24 was Monday, while 1989-09-24 was Sunday as expected.) +# ... +# http://www.kaliningradka.ru/site_pc/cherez/index.php?ELEMENT_ID=40091 +# says that Kaliningrad switched to Moscow-1 on 1989-03-26, avoided +# at the last moment switch to Moscow-1 on 1991-03-31, switched to +# Moscow on 1991-11-03, switched to Moscow-1 on 1992-01-19. + +Zone Europe/Kaliningrad 1:22:00 - LMT 1893 Apr + 1:00 C-Eur CE%sT 1945 + 2:00 Poland CE%sT 1946 + 3:00 Russia MSK/MSD 1989 Mar 26 2:00s + 2:00 Russia EE%sT 2011 Mar 27 2:00s + 3:00 - FET 2014 Oct 26 2:00s + 2:00 - EET + + +# From Paul Eggert (2016-02-21), per Tim Parenti (2014-07-03) and +# Oscar van Vlijmen (2001-08-25): +# Europe/Moscow covers... +# 01 RU-AD Adygea, Republic of +# 05 RU-DA Dagestan, Republic of +# 06 RU-IN Ingushetia, Republic of +# 07 RU-KB Kabardino-Balkar Republic +# 08 RU-KL Kalmykia, Republic of +# 09 RU-KC Karachay-Cherkess Republic +# 10 RU-KR Karelia, Republic of +# 11 RU-KO Komi Republic +# 12 RU-ME Mari El Republic +# 13 RU-MO Mordovia, Republic of +# 15 RU-SE North Ossetia-Alania, Republic of +# 16 RU-TA Tatarstan, Republic of +# 20 RU-CE Chechen Republic +# 21 RU-CU Chuvash Republic +# 23 RU-KDA Krasnodar Krai +# 26 RU-STA Stavropol Krai +# 29 RU-ARK Arkhangelsk Oblast +# 31 RU-BEL Belgorod Oblast +# 32 RU-BRY Bryansk Oblast +# 33 RU-VLA Vladimir Oblast +# 35 RU-VLG Vologda Oblast +# 36 RU-VOR Voronezh Oblast +# 37 RU-IVA Ivanovo Oblast +# 40 RU-KLU Kaluga Oblast +# 44 RU-KOS Kostroma Oblast +# 46 RU-KRS Kursk Oblast +# 47 RU-LEN Leningrad Oblast +# 48 RU-LIP Lipetsk Oblast +# 50 RU-MOS Moscow Oblast +# 51 RU-MUR Murmansk Oblast +# 52 RU-NIZ Nizhny Novgorod Oblast +# 53 RU-NGR Novgorod Oblast +# 57 RU-ORL Oryol Oblast +# 58 RU-PNZ Penza Oblast +# 60 RU-PSK Pskov Oblast +# 61 RU-ROS Rostov Oblast +# 62 RU-RYA Ryazan Oblast +# 67 RU-SMO Smolensk Oblast +# 68 RU-TAM Tambov Oblast +# 69 RU-TVE Tver Oblast +# 71 RU-TUL Tula Oblast +# 76 RU-YAR Yaroslavl Oblast +# 77 RU-MOW Moscow +# 78 RU-SPE Saint Petersburg +# 83 RU-NEN Nenets Autonomous Okrug + +# From Stepan Golosunov (2016-03-07): +# 11. Regions-violators, 1981-1982. +# Wikipedia refers to +# http://maps.monetonos.ru/maps/raznoe/Old_Maps/Old_Maps/Articles/022/3_1981.html +# http://besp.narod.ru/nauka_1981_3.htm +# +# The second link provides two articles scanned from the Nauka i Zhizn +# magazine No. 3, 1981 and a scan of the short article attributed to +# the Trud newspaper from February 1982. The first link provides the +# same Nauka i Zhizn articles converted to the text form (but misses +# time belt changes map). +# +# The second Nauka i Zhizn article says that in addition to +# introduction of summer time on 1981-04-01 there are some time belt +# border changes on 1981-10-01, mostly affecting Nenets Autonomous +# Okrug, Krasnoyarsk Krai, Yakutia, Magadan Oblast and Chukotka +# according to the provided map (colored one). In addition to that +# "time violators" (regions which were not using rules of the time +# belts in which they were located) would not be moving off the DST on +# 1981-10-01 to restore the decree time usage. (Komi ASSR was +# supposed to repeat that move in October 1982 to account for the 2 +# hour difference.) Map depicting "time violators" before 1981-10-01 +# is also provided. +# +# The article from Trud says that 1981-10-01 changes caused problems +# and some territories would be moved to pre-1981-10-01 time by not +# moving to summer time on 1982-04-01. Namely: Dagestan, +# Kabardino-Balkar, Kalmyk, Komi, Mari, Mordovian, North Ossetian, +# Tatar, Chechen-Ingush and Chuvash ASSR, Krasnodar and Stavropol +# krais, Arkhangelsk, Vladimir, Vologda, Voronezh, Gorky, Ivanovo, +# Kostroma, Lipetsk, Penza, Rostov, Ryazan, Tambov, Tyumen and +# Yaroslavl oblasts, Nenets and Evenk autonomous okrugs, Khatangsky +# district of Taymyr Autonomous Okrug. As a result Evenk Autonomous +# Okrug and Khatangsky district of Taymyr Autonomous Okrug would end +# up on Moscow+4, Tyumen Oblast on Moscow+2 and the rest on Moscow +# time. +# +# http://astrozet.net/files/Zones/DOC/RU/1980-925.txt +# attributes the 1982 changes to the Act of the Council of Ministers +# of the USSR No. 126 from 18.02.1982. 1980-925.txt also adds +# Udmurtia to the list of affected territories and lists Khatangsky +# district separately from Taymyr Autonomous Okurg. Probably erroneously. +# +# The affected territories are currently listed under Europe/Moscow, +# Asia/Yekaterinburg and Asia/Krasnoyarsk. +# +# 12. Udmurtia +# The fact that Udmurtia is depicted as a violator in the Nauka i +# Zhizn article hints at Izhevsk being on different time from +# Kuybyshev before 1981-10-01. Udmurtia is not mentioned in the 1989 act. +# http://astrozet.net/files/Zones/DOC/RU/1980-925.txt +# implies Udmurtia was on Moscow time after 1982-04-01. +# Wikipedia implies Udmurtia being on Moscow+1 until 1991. +# +# ... +# +# All Russian zones are supposed to have by default a -1 change at +# 1991-03-31 2:00 (cancellation of the decree time in the USSR) and a +1 +# change at 1992-01-19 2:00 (restoration of the decree time in Russia). +# +# There were some exceptions, though. +# Wikipedia says newspapers listed Astrakhan, Saratov, Kirov, Volgograd, +# Izhevsk, Grozny, Kazan and Samara as such exceptions for the 1992 +# change. (Different newspapers providing different lists. And some +# lists found in the internet are quite wild.) +# +# And apparently some exceptions were reverted in the last moment. +# http://www.kaliningradka.ru/site_pc/cherez/index.php?ELEMENT_ID=40091 +# says that Kaliningrad decided not to be an exception 2 days before the +# 1991-03-31 switch and one person at +# http://izhevsk.ru/forum_light_message/50/682597-m8369040.html +# says he remembers that Samara opted out of the 1992-01-19 exception +# 2 days before the switch. +# +# +# From Paul Eggert (2016-03-18): +# Given the above, we appear to be missing some Zone entries for the +# chaotic early 1980s in Russia. It's not clear what these entries +# should be. For now, sweep this under the rug and just document the +# time in Moscow. + +# From Vladimir Karpinsky (2014-07-08): +# LMT in Moscow (before Jul 3, 1916) is 2:30:17, that was defined by Moscow +# Observatory (coordinates: 55 deg. 45'29.70", 37 deg. 34'05.30").... +# LMT in Moscow since Jul 3, 1916 is 2:31:01 as a result of new standard. +# (The info is from the book by Byalokoz ... p. 18.) +# The time in St. Petersburg as capital of Russia was defined by +# Pulkov observatory, near St. Petersburg. In 1916 LMT Moscow +# was synchronized with LMT St. Petersburg (+30 minutes), (Pulkov observatory +# coordinates: 59 deg. 46'18.70", 30 deg. 19'40.70") so 30 deg. 19'40.70" > +# 2h01m18.7s = 2:01:19. LMT Moscow = LMT St.Petersburg + 30m 2:01:19 + 0:30 = +# 2:31:19 ... +# +# From Paul Eggert (2014-07-08): +# Milne does not list Moscow, but suggests that its time might be listed in +# Résumés mensuels et annuels des observations météorologiques (1895). +# Presumably this is OCLC 85825704, a journal published with parallel text in +# Russian and French. This source has not been located; go with Karpinsky. + +Zone Europe/Moscow 2:30:17 - LMT 1880 + 2:30:17 - MMT 1916 Jul 3 # Moscow Mean Time + 2:31:19 Russia %s 1919 Jul 1 2:00 + 3:00 Russia %s 1921 Oct + 3:00 Russia MSK/MSD 1922 Oct + 2:00 - EET 1930 Jun 21 + 3:00 Russia MSK/MSD 1991 Mar 31 2:00s + 2:00 Russia EE%sT 1992 Jan 19 2:00s + 3:00 Russia MSK/MSD 2011 Mar 27 2:00s + 4:00 - MSK 2014 Oct 26 2:00s + 3:00 - MSK + + +# From Tim Parenti (2014-07-03): +# Europe/Simferopol covers... +# ** **** Crimea, Republic of +# ** **** Sevastopol + +Zone Europe/Simferopol 2:16:24 - LMT 1880 + 2:16 - SMT 1924 May 2 # Simferopol Mean T + 2:00 - EET 1930 Jun 21 + 3:00 - MSK 1941 Nov + 1:00 C-Eur CE%sT 1944 Apr 13 + 3:00 Russia MSK/MSD 1990 + 3:00 - MSK 1990 Jul 1 2:00 + 2:00 - EET 1992 +# Central Crimea used Moscow time 1994/1997. +# +# From Paul Eggert (2006-03-22): +# The _Economist_ (1994-05-28, p 45) reports that central Crimea switched +# from Kiev to Moscow time sometime after the January 1994 elections. +# Shanks (1999) says "date of change uncertain", but implies that it happened +# sometime between the 1994 DST switches. Shanks & Pottenger simply say +# 1994-09-25 03:00, but that can't be right. For now, guess it +# changed in May. + 2:00 E-Eur EE%sT 1994 May +# From IATA SSIM (1994/1997), which also says that Kerch is still like Kiev. + 3:00 E-Eur MSK/MSD 1996 Mar 31 0:00s + 3:00 1:00 MSD 1996 Oct 27 3:00s +# IATA SSIM (1997-09) says Crimea switched to EET/EEST. +# Assume it happened in March by not changing the clocks. + 3:00 Russia MSK/MSD 1997 + 3:00 - MSK 1997 Mar lastSun 1:00u +# From Alexander Krivenyshev (2014-03-17): +# time change at 2:00 (2am) on March 30, 2014 +# http://vz.ru/news/2014/3/17/677464.html +# From Paul Eggert (2014-03-30): +# Simferopol and Sevastopol reportedly changed their central town clocks +# late the previous day, but this appears to have been ceremonial +# and the discrepancies are small enough to not worry about. + 2:00 EU EE%sT 2014 Mar 30 2:00 + 4:00 - MSK 2014 Oct 26 2:00s + 3:00 - MSK + + +# From Paul Eggert (2016-03-18): +# Europe/Astrakhan covers: +# 30 RU-AST Astrakhan Oblast +# +# The 1989 transition is from USSR act No. 227 (1989-03-14). + +# From Alexander Krivenyshev (2016-01-12): +# On February 10, 2016 Astrakhan Oblast got approval by the Federation +# Council to change its time zone to UTC+4 (from current UTC+3 Moscow time).... +# This Federal Law shall enter into force on 27 March 2016 at 02:00. +# From Matt Johnson (2016-03-09): +# http://publication.pravo.gov.ru/Document/View/0001201602150056 + +Zone Europe/Astrakhan 3:12:12 - LMT 1924 May + 3:00 - +03 1930 Jun 21 + 4:00 Russia +04/+05 1989 Mar 26 2:00s + 3:00 Russia +03/+04 1991 Mar 31 2:00s + 4:00 - +04 1992 Mar 29 2:00s + 3:00 Russia +03/+04 2011 Mar 27 2:00s + 4:00 - +04 2014 Oct 26 2:00s + 3:00 - +03 2016 Mar 27 2:00s + 4:00 - +04 + +# From Paul Eggert (2016-03-18): +# Europe/Volgograd covers: +# 34 RU-VGG Volgograd Oblast +# 64 RU-SAR Saratov Oblast +# The 1988 transition is from USSR act No. 5 (1988-01-04). + +Zone Europe/Volgograd 2:57:40 - LMT 1920 Jan 3 + 3:00 - TSAT 1925 Apr 6 # Tsaritsyn Time + 3:00 - STAT 1930 Jun 21 # Stalingrad Time + 4:00 - STAT 1961 Nov 11 + 4:00 Russia VOL%sT 1988 Mar 27 2:00s # Volgograd T + 3:00 Russia VOL%sT 1991 Mar 31 2:00s + 4:00 - VOLT 1992 Mar 29 2:00s + 3:00 Russia MSK/MSD 2011 Mar 27 2:00s + 4:00 - MSK 2014 Oct 26 2:00s + 3:00 - MSK + +# From Paul Eggert (2016-03-18): +# Europe/Kirov covers: +# 43 RU-KIR Kirov Oblast +# The 1989 transition is from USSR act No. 227 (1989-03-14). +# +Zone Europe/Kirov 3:18:48 - LMT 1919 Jul 1 2:00 + 3:00 - +03 1930 Jun 21 + 4:00 Russia +04/+05 1989 Mar 26 2:00s + 3:00 Russia +03/+04 1991 Mar 31 2:00s + 4:00 - +04 1992 Mar 29 2:00s + 3:00 Russia +03/+04 2011 Mar 27 2:00s + 4:00 - +04 2014 Oct 26 2:00s + 3:00 - +03 + +# From Tim Parenti (2014-07-03), per Oscar van Vlijmen (2001-08-25): +# Europe/Samara covers... +# 18 RU-UD Udmurt Republic +# 63 RU-SAM Samara Oblast + +# From Paul Eggert (2016-03-18): +# Byalokoz 1919 says Samara was 3:20:20. +# The 1989 transition is from USSR act No. 227 (1989-03-14). + +Zone Europe/Samara 3:20:20 - LMT 1919 Jul 1 2:00 + 3:00 - SAMT 1930 Jun 21 # Samara Time + 4:00 - SAMT 1935 Jan 27 + 4:00 Russia KUY%sT 1989 Mar 26 2:00s # Kuybyshev + 3:00 Russia MSK/MSD 1991 Mar 31 2:00s + 2:00 Russia EE%sT 1991 Sep 29 2:00s + 3:00 - SAMT 1991 Oct 20 3:00 + 4:00 Russia SAM%sT 2010 Mar 28 2:00s + 3:00 Russia SAM%sT 2011 Mar 27 2:00s + 4:00 - SAMT + +# From Paul Eggert (2016-03-18): +# Europe/Ulyanovsk covers: +# 73 RU-ULY Ulyanovsk Oblast + +# The 1989 transition is from USSR act No. 227 (1989-03-14). + +# From Alexander Krivenyshev (2016-02-17): +# Ulyanovsk ... on their way to change time zones by March 27, 2016 at 2am. +# Ulyanovsk Oblast ... from MSK to MSK+1 (UTC+3 to UTC+4) ... +# 920582-6 ... 02/17/2016 The State Duma passed the bill in the first reading. +# From Matt Johnson (2016-03-09): +# http://publication.pravo.gov.ru/Document/View/0001201603090051 + +Zone Europe/Ulyanovsk 3:13:36 - LMT 1919 Jul 1 2:00 + 3:00 - +03 1930 Jun 21 + 4:00 Russia +04/+05 1989 Mar 26 2:00s + 3:00 Russia +03/+04 1991 Mar 31 2:00s + 2:00 Russia +02/+03 1992 Jan 19 2:00s + 3:00 Russia +03/+04 2011 Mar 27 2:00s + 4:00 - +04 2014 Oct 26 2:00s + 3:00 - +03 2016 Mar 27 2:00s + 4:00 - +04 + +# From Tim Parenti (2014-07-03), per Oscar van Vlijmen (2001-08-25): +# Asia/Yekaterinburg covers... +# 02 RU-BA Bashkortostan, Republic of +# 90 RU-PER Perm Krai +# 45 RU-KGN Kurgan Oblast +# 56 RU-ORE Orenburg Oblast +# 66 RU-SVE Sverdlovsk Oblast +# 72 RU-TYU Tyumen Oblast +# 74 RU-CHE Chelyabinsk Oblast +# 86 RU-KHM Khanty-Mansi Autonomous Okrug - Yugra +# 89 RU-YAN Yamalo-Nenets Autonomous Okrug +# +# Note: Effective 2005-12-01, (59) Perm Oblast and (81) Komi-Permyak +# Autonomous Okrug merged to form (90, RU-PER) Perm Krai. + +# Milne says Yekaterinburg was 4:02:32.9; round to nearest. +# Byalokoz 1919 says its provincial time was based on Perm, at 3:45:05. +# Assume it switched on 1916-07-03, the time of the new standard. +# The 1919 and 1930 transitions are from Shanks. + +Zone Asia/Yekaterinburg 4:02:33 - LMT 1916 Jul 3 + 3:45:05 - PMT 1919 Jul 15 4:00 + 4:00 - SVET 1930 Jun 21 # Sverdlovsk Time + 5:00 Russia SVE%sT 1991 Mar 31 2:00s + 4:00 Russia SVE%sT 1992 Jan 19 2:00s + 5:00 Russia YEK%sT 2011 Mar 27 2:00s + 6:00 - YEKT 2014 Oct 26 2:00s + 5:00 - YEKT + + +# From Tim Parenti (2014-07-03), per Oscar van Vlijmen (2001-08-25): +# Asia/Omsk covers... +# 55 RU-OMS Omsk Oblast + +# Byalokoz 1919 says Omsk was 4:53:30. + +Zone Asia/Omsk 4:53:30 - LMT 1919 Nov 14 + 5:00 - OMST 1930 Jun 21 # Omsk Time + 6:00 Russia OMS%sT 1991 Mar 31 2:00s + 5:00 Russia OMS%sT 1992 Jan 19 2:00s + 6:00 Russia OMS%sT 2011 Mar 27 2:00s + 7:00 - OMST 2014 Oct 26 2:00s + 6:00 - OMST + +# From Paul Eggert (2016-02-22): +# Asia/Barnaul covers: +# 04 RU-AL Altai Republic +# 22 RU-ALT Altai Krai + +# Data before 1991 are from Shanks & Pottenger. + +# From Stepan Golosunov (2016-03-07): +# Letter of Bank of Russia from 1995-05-25 +# http://www.bestpravo.ru/rossijskoje/lj-akty/y3a.htm +# suggests that Altai Republic transitioned to Moscow+3 on +# 1995-05-28. +# +# http://regnum.ru/news/society/1957270.html +# has some historical data for Altai Krai: +# before 1957: west part on UTC+6, east on UTC+7 +# after 1957: UTC+7 +# since 1995: UTC+6 +# http://barnaul.rusplt.ru/index/pochemu_altajskij_kraj_okazalsja_v_neprivychnom_chasovom_pojase-17648.html +# confirms that and provides more details including 1995-05-28 transition date. + +# From Alexander Krivenyshev (2016-02-17): +# Altai Krai and Altai Republic on their way to change time zones +# by March 27, 2016 at 2am.... +# Altai Republic / Gorno-Altaysk MSK+3 to MSK+4 (UTC+6 to UTC+7) ... +# Altai Krai / Barnaul MSK+3 to MSK+4 (UTC+6 to UTC+7) +# From Matt Johnson (2016-03-09): +# http://publication.pravo.gov.ru/Document/View/0001201603090043 +# http://publication.pravo.gov.ru/Document/View/0001201603090038 + +Zone Asia/Barnaul 5:35:00 - LMT 1919 Dec 10 + 6:00 - +06 1930 Jun 21 + 7:00 Russia +07/+08 1991 Mar 31 2:00s + 6:00 Russia +06/+07 1992 Jan 19 2:00s + 7:00 Russia +07/+08 1995 May 28 + 6:00 Russia +06/+07 2011 Mar 27 2:00s + 7:00 - +07 2014 Oct 26 2:00s + 6:00 - +06 2016 Mar 27 2:00s + 7:00 - +07 + +# From Paul Eggert (2016-03-18): +# Asia/Novosibirsk covers: +# 54 RU-NVS Novosibirsk Oblast + +# From Stepan Golosunov (2016-05-30): +# http://asozd2.duma.gov.ru/main.nsf/(Spravka)?OpenAgent&RN=1085784-6 +# moves Novosibirsk oblast from UTC+6 to UTC+7. +# From Stepan Golosunov (2016-07-04): +# The law was signed yesterday and published today on +# http://publication.pravo.gov.ru/Document/View/0001201607040064 + +Zone Asia/Novosibirsk 5:31:40 - LMT 1919 Dec 14 6:00 + 6:00 - +06 1930 Jun 21 + 7:00 Russia +07/+08 1991 Mar 31 2:00s + 6:00 Russia +06/+07 1992 Jan 19 2:00s + 7:00 Russia +07/+08 1993 May 23 # say Shanks & P. + 6:00 Russia +06/+07 2011 Mar 27 2:00s + 7:00 - +07 2014 Oct 26 2:00s + 6:00 - +06 2016 Jul 24 2:00s + 7:00 - +07 + +# From Paul Eggert (2016-03-18): +# Asia/Tomsk covers: +# 70 RU-TOM Tomsk Oblast + +# From Stepan Golosunov (2016-03-24): +# Byalokoz listed Tomsk at 5:39:51. + +# From Stanislaw A. Kuzikowski (1994-06-29): +# Tomsk is still 4 hours ahead of Moscow. + +# From Stepan Golosunov (2016-03-19): +# http://pravo.gov.ru/proxy/ips/?docbody=&nd=102075743 +# (fifth time belt being UTC+5+1(decree time) +# / UTC+5+1(decree time)+1(summer time)) ... +# Note that time belts (numbered from 2 (Moscow) to 12 according to their +# GMT/UTC offset and having too many exceptions like regions formally +# belonging to one belt but using time from another) were replaced +# with time zones in 2011 with different numberings (there was a +# 2-hour gap between second and third zones in 2011-2014). + +# From Stepan Golosunov (2016-04-12): +# http://asozd2.duma.gov.ru/main.nsf/(SpravkaNew)?OpenAgent&RN=1006865-6 +# This bill was approved in the first reading today. It moves Tomsk oblast +# from UTC+6 to UTC+7 and is supposed to come into effect on 2016-05-29 at +# 2:00. The bill needs to be approved in the second and the third readings by +# the State Duma, approved by the Federation Council, signed by the President +# and published to become a law. Minor changes in the text are to be expected +# before the second reading (references need to be updated to account for the +# recent changes). +# +# Judging by the ultra-short one-day amendments period, recent similar laws, +# the State Duma schedule and the Federation Council schedule +# http://www.duma.gov.ru/legislative/planning/day-shedule/por_vesna_2016/ +# http://council.gov.ru/activity/meetings/schedule/63303 +# I speculate that the final text of the bill will be proposed tomorrow, the +# bill will be approved in the second and the third readings on Friday, +# approved by the Federation Council on 2016-04-20, signed by the President and +# published as a law around 2016-04-26. + +# From Matt Johnson (2016-04-26): +# http://publication.pravo.gov.ru/Document/View/0001201604260048 + +Zone Asia/Tomsk 5:39:51 - LMT 1919 Dec 22 + 6:00 - +06 1930 Jun 21 + 7:00 Russia +07/+08 1991 Mar 31 2:00s + 6:00 Russia +06/+07 1992 Jan 19 2:00s + 7:00 Russia +07/+08 2002 May 1 3:00 + 6:00 Russia +06/+07 2011 Mar 27 2:00s + 7:00 - +07 2014 Oct 26 2:00s + 6:00 - +06 2016 May 29 2:00s + 7:00 - +07 + + +# From Tim Parenti (2014-07-03): +# Asia/Novokuznetsk covers... +# 42 RU-KEM Kemerovo Oblast + +# From Alexander Krivenyshev (2009-10-13): +# Kemerovo oblast' (Kemerovo region) in Russia will change current time zone on +# March 28, 2010: +# from current Russia Zone 6 - Krasnoyarsk Time Zone (KRA) UTC +0700 +# to Russia Zone 5 - Novosibirsk Time Zone (NOV) UTC +0600 +# +# This is according to Government of Russia decree No. 740, on September +# 14, 2009 "Application in the territory of the Kemerovo region the Fifth +# time zone." ("Russia Zone 5" or old "USSR Zone 5" is GMT +0600) +# +# Russian Government web site (Russian language) +# http://www.government.ru/content/governmentactivity/rfgovernmentdecisions/archive/2009/09/14/991633.htm +# or Russian-English translation by WorldTimeZone.com with reference +# map to local region and new Russia Time Zone map after March 28, 2010 +# http://www.worldtimezone.com/dst_news/dst_news_russia03.html +# +# Thus, when Russia will switch to DST on the night of March 28, 2010 +# Kemerovo region (Kemerovo oblast') will not change the clock. + +# From Tim Parenti (2014-07-02), per Alexander Krivenyshev (2014-07-02): +# The Kemerovo region will remain at UTC+7 through the 2014-10-26 change, thus +# realigning itself with KRAT. + +Zone Asia/Novokuznetsk 5:48:48 - LMT 1924 May 1 + 6:00 - +06 1930 Jun 21 + 7:00 Russia +07/+08 1991 Mar 31 2:00s + 6:00 Russia +06/+07 1992 Jan 19 2:00s + 7:00 Russia +07/+08 2010 Mar 28 2:00s + 6:00 Russia +06/+07 2011 Mar 27 2:00s + 7:00 - +07 + +# From Tim Parenti (2014-07-03), per Oscar van Vlijmen (2001-08-25): +# Asia/Krasnoyarsk covers... +# 17 RU-TY Tuva Republic +# 19 RU-KK Khakassia, Republic of +# 24 RU-KYA Krasnoyarsk Krai +# +# Note: Effective 2007-01-01, (88) Evenk Autonomous Okrug and (84) Taymyr +# Autonomous Okrug were merged into (24, RU-KYA) Krasnoyarsk Krai. + +# Byalokoz 1919 says Krasnoyarsk was 6:11:26. + +Zone Asia/Krasnoyarsk 6:11:26 - LMT 1920 Jan 6 + 6:00 - KRAT 1930 Jun 21 # Krasnoyarsk Time + 7:00 Russia KRA%sT 1991 Mar 31 2:00s + 6:00 Russia KRA%sT 1992 Jan 19 2:00s + 7:00 Russia KRA%sT 2011 Mar 27 2:00s + 8:00 - KRAT 2014 Oct 26 2:00s + 7:00 - KRAT + + +# From Tim Parenti (2014-07-03), per Oscar van Vlijmen (2001-08-25): +# Asia/Irkutsk covers... +# 03 RU-BU Buryatia, Republic of +# 38 RU-IRK Irkutsk Oblast +# +# Note: Effective 2008-01-01, (85) Ust-Orda Buryat Autonomous Okrug was +# merged into (38, RU-IRK) Irkutsk Oblast. + +# Milne 1899 says Irkutsk was 6:57:15. +# Byalokoz 1919 says Irkutsk was 6:57:05. +# Go with Byalokoz. + +Zone Asia/Irkutsk 6:57:05 - LMT 1880 + 6:57:05 - IMT 1920 Jan 25 # Irkutsk Mean Time + 7:00 - IRKT 1930 Jun 21 # Irkutsk Time + 8:00 Russia IRK%sT 1991 Mar 31 2:00s + 7:00 Russia IRK%sT 1992 Jan 19 2:00s + 8:00 Russia IRK%sT 2011 Mar 27 2:00s + 9:00 - IRKT 2014 Oct 26 2:00s + 8:00 - IRKT + + +# From Tim Parenti (2014-07-06): +# Asia/Chita covers... +# 92 RU-ZAB Zabaykalsky Krai +# +# Note: Effective 2008-03-01, (75) Chita Oblast and (80) Agin-Buryat +# Autonomous Okrug merged to form (92, RU-ZAB) Zabaykalsky Krai. + +# From Alexander Krivenyshev (2016-01-02): +# [The] time zone in the Trans-Baikal Territory (Zabaykalsky Krai) - +# Asia/Chita [is changing] from UTC+8 to UTC+9. Effective date will +# be March 27, 2016 at 2:00am.... +# http://publication.pravo.gov.ru/Document/View/0001201512300107 + +Zone Asia/Chita 7:33:52 - LMT 1919 Dec 15 + 8:00 - YAKT 1930 Jun 21 # Yakutsk Time + 9:00 Russia YAK%sT 1991 Mar 31 2:00s + 8:00 Russia YAK%sT 1992 Jan 19 2:00s + 9:00 Russia YAK%sT 2011 Mar 27 2:00s + 10:00 - YAKT 2014 Oct 26 2:00s + 8:00 - IRKT 2016 Mar 27 2:00 + 9:00 - YAKT + + +# From Tim Parenti (2014-07-03), per Oscar van Vlijmen (2009-11-29): +# Asia/Yakutsk covers... +# 28 RU-AMU Amur Oblast +# +# ...and parts of (14, RU-SA) Sakha (Yakutia) Republic: +# 14-02 **** Aldansky District +# 14-04 **** Amginsky District +# 14-05 **** Anabarsky District +# 14-06 **** Bulunsky District +# 14-07 **** Verkhnevilyuysky District +# 14-10 **** Vilyuysky District +# 14-11 **** Gorny District +# 14-12 **** Zhigansky District +# 14-13 **** Kobyaysky District +# 14-14 **** Lensky District +# 14-15 **** Megino-Kangalassky District +# 14-16 **** Mirninsky District +# 14-18 **** Namsky District +# 14-19 **** Neryungrinsky District +# 14-21 **** Nyurbinsky District +# 14-23 **** Olenyoksky District +# 14-24 **** Olyokminsky District +# 14-26 **** Suntarsky District +# 14-27 **** Tattinsky District +# 14-29 **** Ust-Aldansky District +# 14-32 **** Khangalassky District +# 14-33 **** Churapchinsky District +# 14-34 **** Eveno-Bytantaysky National District + +# From Tim Parenti (2014-07-03): +# Our commentary seems to have lost mention of (14-19) Neryungrinsky District. +# Since the surrounding districts of Sakha are all YAKT, assume this is, too. +# Also assume its history has been the same as the rest of Asia/Yakutsk. + +# Byalokoz 1919 says Yakutsk was 8:38:58. + +Zone Asia/Yakutsk 8:38:58 - LMT 1919 Dec 15 + 8:00 - YAKT 1930 Jun 21 # Yakutsk Time + 9:00 Russia YAK%sT 1991 Mar 31 2:00s + 8:00 Russia YAK%sT 1992 Jan 19 2:00s + 9:00 Russia YAK%sT 2011 Mar 27 2:00s + 10:00 - YAKT 2014 Oct 26 2:00s + 9:00 - YAKT + + +# From Tim Parenti (2014-07-03), per Oscar van Vlijmen (2009-11-29): +# Asia/Vladivostok covers... +# 25 RU-PRI Primorsky Krai +# 27 RU-KHA Khabarovsk Krai +# 79 RU-YEV Jewish Autonomous Oblast +# +# ...and parts of (14, RU-SA) Sakha (Yakutia) Republic: +# 14-09 **** Verkhoyansky District +# 14-31 **** Ust-Yansky District + +# Milne 1899 says Vladivostok was 8:47:33.5. +# Byalokoz 1919 says Vladivostok was 8:47:31. +# Go with Byalokoz. + +Zone Asia/Vladivostok 8:47:31 - LMT 1922 Nov 15 + 9:00 - VLAT 1930 Jun 21 # Vladivostok Time + 10:00 Russia VLA%sT 1991 Mar 31 2:00s + 9:00 Russia VLA%sT 1992 Jan 19 2:00s + 10:00 Russia VLA%sT 2011 Mar 27 2:00s + 11:00 - VLAT 2014 Oct 26 2:00s + 10:00 - VLAT + + +# From Tim Parenti (2014-07-03): +# Asia/Khandyga covers parts of (14, RU-SA) Sakha (Yakutia) Republic: +# 14-28 **** Tomponsky District +# 14-30 **** Ust-Maysky District + +# From Arthur David Olson (2012-05-09): +# Tomponskij and Ust'-Majskij switched from Vladivostok time to Yakutsk time +# in 2011. + +# From Paul Eggert (2012-11-25): +# Shanks and Pottenger (2003) has Khandyga on Yakutsk time. +# Make a wild guess that it switched to Vladivostok time in 2004. +# This transition is no doubt wrong, but we have no better info. + +Zone Asia/Khandyga 9:02:13 - LMT 1919 Dec 15 + 8:00 - YAKT 1930 Jun 21 # Yakutsk Time + 9:00 Russia YAK%sT 1991 Mar 31 2:00s + 8:00 Russia YAK%sT 1992 Jan 19 2:00s + 9:00 Russia YAK%sT 2004 + 10:00 Russia VLA%sT 2011 Mar 27 2:00s + 11:00 - VLAT 2011 Sep 13 0:00s # Decree 725? + 10:00 - YAKT 2014 Oct 26 2:00s + 9:00 - YAKT + + +# From Tim Parenti (2014-07-03): +# Asia/Sakhalin covers... +# 65 RU-SAK Sakhalin Oblast +# ...with the exception of: +# 65-11 **** Severo-Kurilsky District (North Kuril Islands) + +# From Matt Johnson (2016-02-22): +# Asia/Sakhalin is moving (in entirety) from UTC+10 to UTC+11 ... +# (2016-03-09): +# http://publication.pravo.gov.ru/Document/View/0001201603090044 + +# The Zone name should be Asia/Yuzhno-Sakhalinsk, but that's too long. +Zone Asia/Sakhalin 9:30:48 - LMT 1905 Aug 23 + 9:00 - JCST 1937 Oct 1 + 9:00 - JST 1945 Aug 25 + 11:00 Russia SAK%sT 1991 Mar 31 2:00s # Sakhalin T + 10:00 Russia SAK%sT 1992 Jan 19 2:00s + 11:00 Russia SAK%sT 1997 Mar lastSun 2:00s + 10:00 Russia SAK%sT 2011 Mar 27 2:00s + 11:00 - SAKT 2014 Oct 26 2:00s + 10:00 - SAKT 2016 Mar 27 2:00s + 11:00 - SAKT + + +# From Tim Parenti (2014-07-03), per Oscar van Vlijmen (2009-11-29): +# Asia/Magadan covers... +# 49 RU-MAG Magadan Oblast + +# From Tim Parenti (2014-07-06), per Alexander Krivenyshev (2014-07-02): +# Magadan Oblast is moving from UTC+12 to UTC+10 on 2014-10-26; however, +# several districts of Sakha Republic as well as Severo-Kurilsky District of +# the Sakhalin Oblast (also known as the North Kuril Islands), represented +# until now by Asia/Magadan, will instead move to UTC+11. These regions will +# need their own zone. + +# From Alexander Krivenyshev (2016-03-27): +# ... draft bill 948300-6 to change its time zone from UTC+10 to UTC+11 ... +# will take ... effect ... on April 24, 2016 at 2 o'clock +# +# From Matt Johnson (2016-04-05): +# ... signed by the President today ... +# http://publication.pravo.gov.ru/Document/View/0001201604050038 + +Zone Asia/Magadan 10:03:12 - LMT 1924 May 2 + 10:00 - MAGT 1930 Jun 21 # Magadan Time + 11:00 Russia MAG%sT 1991 Mar 31 2:00s + 10:00 Russia MAG%sT 1992 Jan 19 2:00s + 11:00 Russia MAG%sT 2011 Mar 27 2:00s + 12:00 - MAGT 2014 Oct 26 2:00s + 10:00 - MAGT 2016 Apr 24 2:00s + 11:00 - MAGT + + +# From Tim Parenti (2014-07-06): +# Asia/Srednekolymsk covers parts of (14, RU-SA) Sakha (Yakutia) Republic: +# 14-01 **** Abyysky District +# 14-03 **** Allaikhovsky District +# 14-08 **** Verkhnekolymsky District +# 14-17 **** Momsky District +# 14-20 **** Nizhnekolymsky District +# 14-25 **** Srednekolymsky District +# +# ...and parts of (65, RU-SAK) Sakhalin Oblast: +# 65-11 **** Severo-Kurilsky District (North Kuril Islands) + +# From Tim Parenti (2014-07-02): +# Oymyakonsky District of Sakha Republic (represented by Ust-Nera), along with +# most of Sakhalin Oblast (represented by Sakhalin) will be moving to UTC+10 on +# 2014-10-26 to stay aligned with VLAT/SAKT; however, Severo-Kurilsky District +# of the Sakhalin Oblast (also known as the North Kuril Islands, represented by +# Severo-Kurilsk) will remain on UTC+11. + +# From Tim Parenti (2014-07-06): +# Assume North Kuril Islands have history like Magadan before 2011-03-27. +# There is a decent chance this is wrong, in which case a new zone +# Asia/Severo-Kurilsk would become necessary. +# +# Srednekolymsk and Zyryanka are the most populous places amongst these +# districts, but have very similar populations. In fact, Wikipedia currently +# lists them both as having 3528 people, exactly 1668 males and 1860 females +# each! (Yikes!) +# http://en.wikipedia.org/w/?title=Srednekolymsky_District&oldid=603435276 +# http://en.wikipedia.org/w/?title=Verkhnekolymsky_District&oldid=594378493 +# Assume this is a mistake, albeit an amusing one. +# +# Looking at censuses, the populations of the two municipalities seem to have +# fluctuated recently. Zyryanka was more populous than Srednekolymsk in the +# 1989 and 2002 censuses, but Srednekolymsk was more populous in the most +# recent (2010) census, 3525 to 3170. (See pages 195 and 197 of +# http://www.gks.ru/free_doc/new_site/perepis2010/croc/Documents/Vol1/pub-01-05.pdf +# in Russian.) In addition, Srednekolymsk appears to be a much older +# settlement and the population of Zyryanka seems to be declining. +# Go with Srednekolymsk. +# +# Since Magadan Oblast moves to UTC+10 on 2014-10-26, we cannot keep using MAGT +# as the abbreviation. Use SRET instead. + +Zone Asia/Srednekolymsk 10:14:52 - LMT 1924 May 2 + 10:00 - MAGT 1930 Jun 21 # Magadan Time + 11:00 Russia MAG%sT 1991 Mar 31 2:00s + 10:00 Russia MAG%sT 1992 Jan 19 2:00s + 11:00 Russia MAG%sT 2011 Mar 27 2:00s + 12:00 - MAGT 2014 Oct 26 2:00s + 11:00 - SRET # Srednekolymsk Time + + +# From Tim Parenti (2014-07-03): +# Asia/Ust-Nera covers parts of (14, RU-SA) Sakha (Yakutia) Republic: +# 14-22 **** Oymyakonsky District + +# From Arthur David Olson (2012-05-09): +# Ojmyakonskij [and the Kuril Islands] switched from +# Magadan time to Vladivostok time in 2011. +# +# From Tim Parenti (2014-07-06), per Alexander Krivenyshev (2014-07-02): +# It's unlikely that any of the Kuril Islands were involved in such a switch, +# as the South and Middle Kurils have been on UTC+11 (SAKT) with the rest of +# Sakhalin Oblast since at least 2011-09, and the North Kurils have been on +# UTC+12 since at least then, too. + +Zone Asia/Ust-Nera 9:32:54 - LMT 1919 Dec 15 + 8:00 - YAKT 1930 Jun 21 # Yakutsk Time + 9:00 Russia YAKT 1981 Apr 1 + 11:00 Russia MAG%sT 1991 Mar 31 2:00s + 10:00 Russia MAG%sT 1992 Jan 19 2:00s + 11:00 Russia MAG%sT 2011 Mar 27 2:00s + 12:00 - MAGT 2011 Sep 13 0:00s # Decree 725? + 11:00 - VLAT 2014 Oct 26 2:00s + 10:00 - VLAT + + +# From Tim Parenti (2014-07-03), per Oscar van Vlijmen (2001-08-25): +# Asia/Kamchatka covers... +# 91 RU-KAM Kamchatka Krai +# +# Note: Effective 2007-07-01, (41) Kamchatka Oblast and (82) Koryak +# Autonomous Okrug merged to form (91, RU-KAM) Kamchatka Krai. + +# The Zone name should be Asia/Petropavlovsk-Kamchatski or perhaps +# Asia/Petropavlovsk-Kamchatsky, but these are too long. +Zone Asia/Kamchatka 10:34:36 - LMT 1922 Nov 10 + 11:00 - PETT 1930 Jun 21 # P-K Time + 12:00 Russia PET%sT 1991 Mar 31 2:00s + 11:00 Russia PET%sT 1992 Jan 19 2:00s + 12:00 Russia PET%sT 2010 Mar 28 2:00s + 11:00 Russia PET%sT 2011 Mar 27 2:00s + 12:00 - PETT + + +# From Tim Parenti (2014-07-03): +# Asia/Anadyr covers... +# 87 RU-CHU Chukotka Autonomous Okrug + +Zone Asia/Anadyr 11:49:56 - LMT 1924 May 2 + 12:00 - ANAT 1930 Jun 21 # Anadyr Time + 13:00 Russia ANA%sT 1982 Apr 1 0:00s + 12:00 Russia ANA%sT 1991 Mar 31 2:00s + 11:00 Russia ANA%sT 1992 Jan 19 2:00s + 12:00 Russia ANA%sT 2010 Mar 28 2:00s + 11:00 Russia ANA%sT 2011 Mar 27 2:00s + 12:00 - ANAT + + +# San Marino +# See Europe/Rome. + +# Serbia +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Europe/Belgrade 1:22:00 - LMT 1884 + 1:00 - CET 1941 Apr 18 23:00 + 1:00 C-Eur CE%sT 1945 + 1:00 - CET 1945 May 8 2:00s + 1:00 1:00 CEST 1945 Sep 16 2:00s +# Metod Koželj reports that the legal date of +# transition to EU rules was 1982-11-27, for all of Yugoslavia at the time. +# Shanks & Pottenger don't give as much detail, so go with Koželj. + 1:00 - CET 1982 Nov 27 + 1:00 EU CE%sT +Link Europe/Belgrade Europe/Ljubljana # Slovenia +Link Europe/Belgrade Europe/Podgorica # Montenegro +Link Europe/Belgrade Europe/Sarajevo # Bosnia and Herzegovina +Link Europe/Belgrade Europe/Skopje # Macedonia +Link Europe/Belgrade Europe/Zagreb # Croatia + +# Slovakia +Link Europe/Prague Europe/Bratislava + +# Slovenia +# See Europe/Belgrade. + +# Spain +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +# For 1917-1919 Whitman gives Apr Sat>=1 - Oct Sat>=1; +# go with Shanks & Pottenger. +Rule Spain 1917 only - May 5 23:00s 1:00 S +Rule Spain 1917 1919 - Oct 6 23:00s 0 - +Rule Spain 1918 only - Apr 15 23:00s 1:00 S +Rule Spain 1919 only - Apr 5 23:00s 1:00 S +# Whitman gives 1921 Feb 28 - Oct 14; go with Shanks & Pottenger. +Rule Spain 1924 only - Apr 16 23:00s 1:00 S +# Whitman gives 1924 Oct 14; go with Shanks & Pottenger. +Rule Spain 1924 only - Oct 4 23:00s 0 - +Rule Spain 1926 only - Apr 17 23:00s 1:00 S +# Whitman says no DST in 1929; go with Shanks & Pottenger. +Rule Spain 1926 1929 - Oct Sat>=1 23:00s 0 - +Rule Spain 1927 only - Apr 9 23:00s 1:00 S +Rule Spain 1928 only - Apr 14 23:00s 1:00 S +Rule Spain 1929 only - Apr 20 23:00s 1:00 S +# Whitman gives 1937 Jun 16, 1938 Apr 16, 1940 Apr 13; +# go with Shanks & Pottenger. +Rule Spain 1937 only - May 22 23:00s 1:00 S +Rule Spain 1937 1939 - Oct Sat>=1 23:00s 0 - +Rule Spain 1938 only - Mar 22 23:00s 1:00 S +Rule Spain 1939 only - Apr 15 23:00s 1:00 S +Rule Spain 1940 only - Mar 16 23:00s 1:00 S +# Whitman says no DST 1942-1945; go with Shanks & Pottenger. +Rule Spain 1942 only - May 2 22:00s 2:00 M # Midsummer +Rule Spain 1942 only - Sep 1 22:00s 1:00 S +Rule Spain 1943 1946 - Apr Sat>=13 22:00s 2:00 M +Rule Spain 1943 only - Oct 3 22:00s 1:00 S +Rule Spain 1944 only - Oct 10 22:00s 1:00 S +Rule Spain 1945 only - Sep 30 1:00 1:00 S +Rule Spain 1946 only - Sep 30 0:00 0 - +Rule Spain 1949 only - Apr 30 23:00 1:00 S +Rule Spain 1949 only - Sep 30 1:00 0 - +Rule Spain 1974 1975 - Apr Sat>=13 23:00 1:00 S +Rule Spain 1974 1975 - Oct Sun>=1 1:00 0 - +Rule Spain 1976 only - Mar 27 23:00 1:00 S +Rule Spain 1976 1977 - Sep lastSun 1:00 0 - +Rule Spain 1977 1978 - Apr 2 23:00 1:00 S +Rule Spain 1978 only - Oct 1 1:00 0 - +# The following rules are copied from Morocco from 1967 through 1978. +Rule SpainAfrica 1967 only - Jun 3 12:00 1:00 S +Rule SpainAfrica 1967 only - Oct 1 0:00 0 - +Rule SpainAfrica 1974 only - Jun 24 0:00 1:00 S +Rule SpainAfrica 1974 only - Sep 1 0:00 0 - +Rule SpainAfrica 1976 1977 - May 1 0:00 1:00 S +Rule SpainAfrica 1976 only - Aug 1 0:00 0 - +Rule SpainAfrica 1977 only - Sep 28 0:00 0 - +Rule SpainAfrica 1978 only - Jun 1 0:00 1:00 S +Rule SpainAfrica 1978 only - Aug 4 0:00 0 - +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Europe/Madrid -0:14:44 - LMT 1901 Jan 1 0:00s + 0:00 Spain WE%sT 1946 Sep 30 + 1:00 Spain CE%sT 1979 + 1:00 EU CE%sT +Zone Africa/Ceuta -0:21:16 - LMT 1901 + 0:00 - WET 1918 May 6 23:00 + 0:00 1:00 WEST 1918 Oct 7 23:00 + 0:00 - WET 1924 + 0:00 Spain WE%sT 1929 + 0:00 SpainAfrica WE%sT 1984 Mar 16 + 1:00 - CET 1986 + 1:00 EU CE%sT +Zone Atlantic/Canary -1:01:36 - LMT 1922 Mar # Las Palmas de Gran C. + -1:00 - CANT 1946 Sep 30 1:00 # Canaries T + 0:00 - WET 1980 Apr 6 0:00s + 0:00 1:00 WEST 1980 Sep 28 1:00u + 0:00 EU WE%sT +# IATA SSIM (1996-09) says the Canaries switch at 2:00u, not 1:00u. +# Ignore this for now, as the Canaries are part of the EU. + +# Sweden + +# From Ivan Nilsson (2001-04-13), superseding Shanks & Pottenger: +# +# The law "Svensk författningssamling 1878, no 14" about standard time in 1879: +# From the beginning of 1879 (that is 01-01 00:00) the time for all +# places in the country is "the mean solar time for the meridian at +# three degrees, or twelve minutes of time, to the west of the +# meridian of the Observatory of Stockholm". The law is dated 1878-05-31. +# +# The observatory at that time had the meridian 18 degrees 03' 30" +# eastern longitude = 01:12:14 in time. Less 12 minutes gives the +# national standard time as 01:00:14 ahead of GMT.... +# +# About the beginning of CET in Sweden. The lawtext ("Svensk +# författningssamling 1899, no 44") states, that "from the beginning +# of 1900... ... the same as the mean solar time for the meridian at +# the distance of one hour of time from the meridian of the English +# observatory at Greenwich, or at 12 minutes 14 seconds to the west +# from the meridian of the Observatory of Stockholm". The law is dated +# 1899-06-16. In short: At 1900-01-01 00:00:00 the new standard time +# in Sweden is 01:00:00 ahead of GMT. +# +# 1916: The lawtext ("Svensk författningssamling 1916, no 124") states +# that "1916-05-15 is considered to begin one hour earlier". It is +# pretty obvious that at 05-14 23:00 the clocks are set to 05-15 00:00.... +# Further the law says, that "1916-09-30 is considered to end one hour later". +# +# The laws regulating [DST] are available on the site of the Swedish +# Parliament beginning with 1985 - the laws regulating 1980/1984 are +# not available on the site (to my knowledge they are only available +# in Swedish): <http://www.riksdagen.se/english/work/sfst.asp> (type +# "sommartid" without the quotes in the field "Fritext" and then click +# the Sök-button). +# +# (2001-05-13): +# +# I have now found a newspaper stating that at 1916-10-01 01:00 +# summertime the church-clocks etc were set back one hour to show +# 1916-10-01 00:00 standard time. The article also reports that some +# people thought the switch to standard time would take place already +# at 1916-10-01 00:00 summer time, but they had to wait for another +# hour before the event took place. +# +# Source: The newspaper "Dagens Nyheter", 1916-10-01, page 7 upper left. + +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Europe/Stockholm 1:12:12 - LMT 1879 Jan 1 + 1:00:14 - SET 1900 Jan 1 # Swedish Time + 1:00 - CET 1916 May 14 23:00 + 1:00 1:00 CEST 1916 Oct 1 1:00 + 1:00 - CET 1980 + 1:00 EU CE%sT + +# Switzerland +# From Howse: +# By the end of the 18th century clocks and watches became commonplace +# and their performance improved enormously. Communities began to keep +# mean time in preference to apparent time - Geneva from 1780 .... +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +# From Whitman (who writes "Midnight?"): +# Rule Swiss 1940 only - Nov 2 0:00 1:00 S +# Rule Swiss 1940 only - Dec 31 0:00 0 - +# From Shanks & Pottenger: +# Rule Swiss 1941 1942 - May Sun>=1 2:00 1:00 S +# Rule Swiss 1941 1942 - Oct Sun>=1 0:00 0 - + +# From Alois Treindl (2008-12-17): +# I have researched the DST usage in Switzerland during the 1940ies. +# +# As I wrote in an earlier message, I suspected the current tzdata values +# to be wrong. This is now verified. +# +# I have found copies of the original ruling by the Swiss Federal +# government, in 'Eidgenössische Gesetzessammlung 1941 and 1942' (Swiss +# federal law collection)... +# +# DST began on Monday 5 May 1941, 1:00 am by shifting the clocks to 2:00 am +# DST ended on Monday 6 Oct 1941, 2:00 am by shifting the clocks to 1:00 am. +# +# DST began on Monday, 4 May 1942 at 01:00 am +# DST ended on Monday, 5 Oct 1942 at 02:00 am +# +# There was no DST in 1940, I have checked the law collection carefully. +# It is also indicated by the fact that the 1942 entry in the law +# collection points back to 1941 as a reference, but no reference to any +# other years are made. +# +# Newspaper articles I have read in the archives on 6 May 1941 reported +# about the introduction of DST (Sommerzeit in German) during the previous +# night as an absolute novelty, because this was the first time that such +# a thing had happened in Switzerland. +# +# I have also checked 1916, because one book source (Gabriel, Traité de +# l'heure dans le monde) claims that Switzerland had DST in 1916. This is +# false, no official document could be found. Probably Gabriel got misled +# by references to Germany, which introduced DST in 1916 for the first time. +# +# The tzdata rules for Switzerland must be changed to: +# Rule Swiss 1941 1942 - May Mon>=1 1:00 1:00 S +# Rule Swiss 1941 1942 - Oct Mon>=1 2:00 0 - +# +# The 1940 rules must be deleted. +# +# One further detail for Switzerland, which is probably out of scope for +# most users of tzdata: The [Europe/Zurich zone] ... +# describes all of Switzerland correctly, with the exception of +# the Canton de Genève (Geneva, Genf). Between 1848 and 1894 Geneva did not +# follow Bern Mean Time but kept its own local mean time. +# To represent this, an extra zone would be needed. +# +# From Alois Treindl (2013-09-11): +# The Federal regulations say +# http://www.admin.ch/opc/de/classified-compilation/20071096/index.html +# ... the meridian for Bern mean time ... is 7 degrees 26' 22.50". +# Expressed in time, it is 0h29m45.5s. + +# From Pierre-Yves Berger (2013-09-11): +# the "Circulaire du conseil fédéral" (December 11 1893) +# http://www.amtsdruckschriften.bar.admin.ch/viewOrigDoc.do?id=10071353 +# clearly states that the [1894-06-01] change should be done at midnight +# but if no one is present after 11 at night, could be postponed until one +# hour before the beginning of service. + +# From Paul Eggert (2013-09-11): +# Round BMT to the nearest even second, 0:29:46. +# +# We can find no reliable source for Shanks's assertion that all of Switzerland +# except Geneva switched to Bern Mean Time at 00:00 on 1848-09-12. This book: +# +# Jakob Messerli. Gleichmässig, pünktlich, schnell. Zeiteinteilung und +# Zeitgebrauch in der Schweiz im 19. Jahrhundert. Chronos, Zurich 1995, +# ISBN 3-905311-68-2, OCLC 717570797. +# +# suggests that the transition was more gradual, and that the Swiss did not +# agree about civil time during the transition. The timekeeping it gives the +# most detail for is postal and telegraph time: here, federal legislation (the +# "Bundesgesetz über die Erstellung von elektrischen Telegraphen") passed on +# 1851-11-23, and an official implementation notice was published 1853-07-16 +# (Bundesblatt 1853, Bd. II, S. 859). On p 72 Messerli writes that in +# practice since July 1853 Bernese time was used in "all postal and telegraph +# offices in Switzerland from Geneva to St. Gallen and Basel to Chiasso" +# (Google translation). For now, model this transition as occurring on +# 1853-07-16, though it probably occurred at some other date in Zurich, and +# legal civil time probably changed at still some other transition date. + +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Swiss 1941 1942 - May Mon>=1 1:00 1:00 S +Rule Swiss 1941 1942 - Oct Mon>=1 2:00 0 - +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Europe/Zurich 0:34:08 - LMT 1853 Jul 16 # See above comment. + 0:29:46 - BMT 1894 Jun # Bern Mean Time + 1:00 Swiss CE%sT 1981 + 1:00 EU CE%sT + +# Turkey + +# From Amar Devegowda (2007-01-03): +# The time zone rules for Istanbul, Turkey have not been changed for years now. +# ... The latest rules are available at: +# http://www.timeanddate.com/worldclock/timezone.html?n=107 +# From Steffen Thorsen (2007-01-03): +# I have been able to find press records back to 1996 which all say that +# DST started 01:00 local time and end at 02:00 local time. I am not sure +# what happened before that. One example for each year from 1996 to 2001: +# http://newspot.byegm.gov.tr/arsiv/1996/21/N4.htm +# http://www.byegm.gov.tr/YAYINLARIMIZ/CHR/ING97/03/97X03X25.TXT +# http://www.byegm.gov.tr/YAYINLARIMIZ/CHR/ING98/03/98X03X02.HTM +# http://www.byegm.gov.tr/YAYINLARIMIZ/CHR/ING99/10/99X10X26.HTM#%2016 +# http://www.byegm.gov.tr/YAYINLARIMIZ/CHR/ING2000/03/00X03X06.HTM#%2021 +# http://www.byegm.gov.tr/YAYINLARIMIZ/CHR/ING2001/03/23x03x01.HTM#%2027 +# From Paul Eggert (2007-01-03): +# Prefer the above source to Shanks & Pottenger for time stamps after 1990. + +# From Steffen Thorsen (2007-03-09): +# Starting 2007 though, it seems that they are adopting EU's 1:00 UTC +# start/end time, according to the following page (2007-03-07): +# http://www.ntvmsnbc.com/news/402029.asp +# The official document is located here - it is in Turkish...: +# http://rega.basbakanlik.gov.tr/eskiler/2007/03/20070307-7.htm +# I was able to locate the following seemingly official document +# (on a non-government server though) describing dates between 2002 and 2006: +# http://www.alomaliye.com/bkk_2002_3769.htm + +# From Gökdeniz Karadağ (2011-03-10): +# According to the articles linked below, Turkey will change into summer +# time zone (GMT+3) on March 28, 2011 at 3:00 a.m. instead of March 27. +# This change is due to a nationwide exam on 27th. +# http://www.worldbulletin.net/?aType=haber&ArticleID=70872 +# Turkish: +# http://www.hurriyet.com.tr/ekonomi/17230464.asp?gid=373 + +# From Faruk Pasin (2014-02-14): +# The DST for Turkey has been changed for this year because of the +# Turkish Local election.... +# http://www.sabah.com.tr/Ekonomi/2014/02/12/yaz-saatinde-onemli-degisiklik +# ... so Turkey will move clocks forward one hour on March 31 at 3:00 a.m. +# From Randal L. Schwartz (2014-04-15): +# Having landed on a flight from the states to Istanbul (via AMS) on March 31, +# I can tell you that NOBODY (even the airlines) respected this timezone DST +# change delay. Maybe the word just didn't get out in time. +# From Paul Eggert (2014-06-15): +# The press reported massive confusion, as election officials obeyed the rule +# change but cell phones (and airline baggage systems) did not. See: +# Kostidis M. Eventful elections in Turkey. Balkan News Agency +# http://www.balkaneu.com/eventful-elections-turkey/ 2014-03-30. +# I guess the best we can do is document the official time. + +# From Fatih (2015-09-29): +# It's officially announced now by the Ministry of Energy. +# Turkey delays winter time to 8th of November 04:00 +# http://www.aa.com.tr/tr/turkiye/yaz-saati-uygulamasi-8-kasimda-sona-erecek/362217 +# +# From BBC News (2015-10-25): +# Confused Turks are asking "what's the time?" after automatic clocks defied a +# government decision ... "For the next two weeks #Turkey is on EEST... Erdogan +# Engineered Standard Time," said Twitter user @aysekarahasan. +# http://www.bbc.com/news/world-europe-34631326 + +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Turkey 1916 only - May 1 0:00 1:00 S +Rule Turkey 1916 only - Oct 1 0:00 0 - +Rule Turkey 1920 only - Mar 28 0:00 1:00 S +Rule Turkey 1920 only - Oct 25 0:00 0 - +Rule Turkey 1921 only - Apr 3 0:00 1:00 S +Rule Turkey 1921 only - Oct 3 0:00 0 - +Rule Turkey 1922 only - Mar 26 0:00 1:00 S +Rule Turkey 1922 only - Oct 8 0:00 0 - +# Whitman gives 1923 Apr 28 - Sep 16 and no DST in 1924-1925; +# go with Shanks & Pottenger. +Rule Turkey 1924 only - May 13 0:00 1:00 S +Rule Turkey 1924 1925 - Oct 1 0:00 0 - +Rule Turkey 1925 only - May 1 0:00 1:00 S +Rule Turkey 1940 only - Jun 30 0:00 1:00 S +Rule Turkey 1940 only - Oct 5 0:00 0 - +Rule Turkey 1940 only - Dec 1 0:00 1:00 S +Rule Turkey 1941 only - Sep 21 0:00 0 - +Rule Turkey 1942 only - Apr 1 0:00 1:00 S +# Whitman omits the next two transition and gives 1945 Oct 1; +# go with Shanks & Pottenger. +Rule Turkey 1942 only - Nov 1 0:00 0 - +Rule Turkey 1945 only - Apr 2 0:00 1:00 S +Rule Turkey 1945 only - Oct 8 0:00 0 - +Rule Turkey 1946 only - Jun 1 0:00 1:00 S +Rule Turkey 1946 only - Oct 1 0:00 0 - +Rule Turkey 1947 1948 - Apr Sun>=16 0:00 1:00 S +Rule Turkey 1947 1950 - Oct Sun>=2 0:00 0 - +Rule Turkey 1949 only - Apr 10 0:00 1:00 S +Rule Turkey 1950 only - Apr 19 0:00 1:00 S +Rule Turkey 1951 only - Apr 22 0:00 1:00 S +Rule Turkey 1951 only - Oct 8 0:00 0 - +Rule Turkey 1962 only - Jul 15 0:00 1:00 S +Rule Turkey 1962 only - Oct 8 0:00 0 - +Rule Turkey 1964 only - May 15 0:00 1:00 S +Rule Turkey 1964 only - Oct 1 0:00 0 - +Rule Turkey 1970 1972 - May Sun>=2 0:00 1:00 S +Rule Turkey 1970 1972 - Oct Sun>=2 0:00 0 - +Rule Turkey 1973 only - Jun 3 1:00 1:00 S +Rule Turkey 1973 only - Nov 4 3:00 0 - +Rule Turkey 1974 only - Mar 31 2:00 1:00 S +Rule Turkey 1974 only - Nov 3 5:00 0 - +Rule Turkey 1975 only - Mar 30 0:00 1:00 S +Rule Turkey 1975 1976 - Oct lastSun 0:00 0 - +Rule Turkey 1976 only - Jun 1 0:00 1:00 S +Rule Turkey 1977 1978 - Apr Sun>=1 0:00 1:00 S +Rule Turkey 1977 only - Oct 16 0:00 0 - +Rule Turkey 1979 1980 - Apr Sun>=1 3:00 1:00 S +Rule Turkey 1979 1982 - Oct Mon>=11 0:00 0 - +Rule Turkey 1981 1982 - Mar lastSun 3:00 1:00 S +Rule Turkey 1983 only - Jul 31 0:00 1:00 S +Rule Turkey 1983 only - Oct 2 0:00 0 - +Rule Turkey 1985 only - Apr 20 0:00 1:00 S +Rule Turkey 1985 only - Sep 28 0:00 0 - +Rule Turkey 1986 1990 - Mar lastSun 2:00s 1:00 S +Rule Turkey 1986 1990 - Sep lastSun 2:00s 0 - +Rule Turkey 1991 2006 - Mar lastSun 1:00s 1:00 S +Rule Turkey 1991 1995 - Sep lastSun 1:00s 0 - +Rule Turkey 1996 2006 - Oct lastSun 1:00s 0 - +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Europe/Istanbul 1:55:52 - LMT 1880 + 1:56:56 - IMT 1910 Oct # Istanbul Mean Time? + 2:00 Turkey EE%sT 1978 Oct 15 + 3:00 Turkey TR%sT 1985 Apr 20 # Turkey Time + 2:00 Turkey EE%sT 2007 + 2:00 EU EE%sT 2011 Mar 27 1:00u + 2:00 - EET 2011 Mar 28 1:00u + 2:00 EU EE%sT 2014 Mar 30 1:00u + 2:00 - EET 2014 Mar 31 1:00u + 2:00 EU EE%sT 2015 Oct 25 1:00u + 2:00 1:00 EEST 2015 Nov 8 1:00u + 2:00 EU EE%sT +Link Europe/Istanbul Asia/Istanbul # Istanbul is in both continents. + +# Ukraine +# +# From Igor Karpov, who works for the Ukrainian Ministry of Justice, +# via Garrett Wollman (2003-01-27): +# BTW, I've found the official document on this matter. It's government +# regulations No. 509, May 13, 1996. In my poor translation it says: +# "Time in Ukraine is set to second timezone (Kiev time). Each last Sunday +# of March at 3am the time is changing to 4am and each last Sunday of +# October the time at 4am is changing to 3am" + +# From Alexander Krivenyshev (2011-09-20): +# On September 20, 2011 the deputies of the Verkhovna Rada agreed to +# abolish the transfer clock to winter time. +# +# Bill No. 8330 of MP from the Party of Regions Oleg Nadoshi got +# approval from 266 deputies. +# +# Ukraine abolishes transfer back to the winter time (in Russian) +# http://news.mail.ru/politics/6861560/ +# +# The Ukrainians will no longer change the clock (in Russian) +# http://www.segodnya.ua/news/14290482.html +# +# Deputies cancelled the winter time (in Russian) +# http://www.pravda.com.ua/rus/news/2011/09/20/6600616/ +# +# From Philip Pizzey (2011-10-18): +# Today my Ukrainian colleagues have informed me that the +# Ukrainian parliament have decided that they will go to winter +# time this year after all. +# +# From Udo Schwedt (2011-10-18): +# As far as I understand, the recent change to the Ukrainian time zone +# (Europe/Kiev) to introduce permanent daylight saving time (similar +# to Russia) was reverted today: +# http://portal.rada.gov.ua/rada/control/en/publish/article/info_left?art_id=287324&cat_id=105995 +# +# Also reported by Alexander Bokovoy (2011-10-18) who also noted: +# The law documents themselves are at +# http://w1.c1.rada.gov.ua/pls/zweb_n/webproc4_1?id=&pf3511=41484 + +# From Vladimir in Moscow via Alois Treindl re Kiev time 1991/2 (2014-02-28): +# First in Ukraine they changed Time zone from UTC+3 to UTC+2 with DST: +# 03 25 1990 02:00 -03.00 1 Time Zone 3 with DST +# 07 01 1990 02:00 -02.00 1 Time Zone 2 with DST +# * Ukrainian Government's Resolution of 18.06.1990, No. 134. +# http://search.ligazakon.ua/l_doc2.nsf/link1/T001500.html +# +# They did not end DST in September, 1990 (according to the law, +# "summer time" was still in action): +# 09 30 1990 03:00 -02.00 1 Time Zone 2 with DST +# * Ukrainian Government's Resolution of 21.09.1990, No. 272. +# http://search.ligazakon.ua/l_doc2.nsf/link1/KP900272.html +# +# Again no change in March, 1991 ("summer time" in action): +# 03 31 1991 02:00 -02.00 1 Time Zone 2 with DST +# +# DST ended in September 1991 ("summer time" ended): +# 09 29 1991 03:00 -02.00 0 Time Zone 2, no DST +# * Ukrainian Government's Resolution of 25.09.1991, No. 225. +# http://www.uazakon.com/documents/date_21/pg_iwgdoc.htm +# This is an answer. +# +# Since 1992 they had normal DST procedure: +# 03 29 1992 02:00 -02.00 1 DST started +# 09 27 1992 03:00 -02.00 0 DST ended +# * Ukrainian Government's Resolution of 20.03.1992, No. 139. +# http://www.uazakon.com/documents/date_8u/pg_grcasa.htm + +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Most of Ukraine since 1970 has been like Kiev. +# "Kyiv" is the transliteration of the Ukrainian name, but +# "Kiev" is more common in English. +Zone Europe/Kiev 2:02:04 - LMT 1880 + 2:02:04 - KMT 1924 May 2 # Kiev Mean Time + 2:00 - EET 1930 Jun 21 + 3:00 - MSK 1941 Sep 20 + 1:00 C-Eur CE%sT 1943 Nov 6 + 3:00 Russia MSK/MSD 1990 Jul 1 2:00 + 2:00 1:00 EEST 1991 Sep 29 3:00 + 2:00 E-Eur EE%sT 1995 + 2:00 EU EE%sT +# Ruthenia used CET 1990/1991. +# "Uzhhorod" is the transliteration of the Rusyn/Ukrainian pronunciation, but +# "Uzhgorod" is more common in English. +Zone Europe/Uzhgorod 1:29:12 - LMT 1890 Oct + 1:00 - CET 1940 + 1:00 C-Eur CE%sT 1944 Oct + 1:00 1:00 CEST 1944 Oct 26 + 1:00 - CET 1945 Jun 29 + 3:00 Russia MSK/MSD 1990 + 3:00 - MSK 1990 Jul 1 2:00 + 1:00 - CET 1991 Mar 31 3:00 + 2:00 - EET 1992 + 2:00 E-Eur EE%sT 1995 + 2:00 EU EE%sT +# Zaporozh'ye and eastern Lugansk oblasts observed DST 1990/1991. +# "Zaporizhia" is the transliteration of the Ukrainian name, but +# "Zaporozh'ye" is more common in English. Use the common English +# spelling, except omit the apostrophe as it is not allowed in +# portable Posix file names. +Zone Europe/Zaporozhye 2:20:40 - LMT 1880 + 2:20 - CUT 1924 May 2 # Central Ukraine T + 2:00 - EET 1930 Jun 21 + 3:00 - MSK 1941 Aug 25 + 1:00 C-Eur CE%sT 1943 Oct 25 + 3:00 Russia MSK/MSD 1991 Mar 31 2:00 + 2:00 E-Eur EE%sT 1995 + 2:00 EU EE%sT + +# Vatican City +# See Europe/Rome. + +############################################################################### + +# One source shows that Bulgaria, Cyprus, Finland, and Greece observe DST from +# the last Sunday in March to the last Sunday in September in 1986. +# The source shows Romania changing a day later than everybody else. +# +# According to Bernard Sieloff's source, Poland is in the MET time zone but +# uses the WE DST rules. The Western USSR uses EET+1 and ME DST rules. +# Bernard Sieloff's source claims Romania switches on the same day, but at +# 00:00 standard time (i.e., 01:00 DST). It also claims that Turkey +# switches on the same day, but switches on at 01:00 standard time +# and off at 00:00 standard time (i.e., 01:00 DST) + +# ... +# Date: Wed, 28 Jan 87 16:56:27 -0100 +# From: Tom Hofmann +# ... +# +# ...the European time rules are...standardized since 1981, when +# most European countries started DST. Before that year, only +# a few countries (UK, France, Italy) had DST, each according +# to own national rules. In 1981, however, DST started on +# 'Apr firstSun', and not on 'Mar lastSun' as in the following +# years... +# But also since 1981 there are some more national exceptions +# than listed in 'europe': Switzerland, for example, joined DST +# one year later, Denmark ended DST on 'Oct 1' instead of 'Sep +# lastSun' in 1981 - I don't know how they handle now. +# +# Finally, DST ist always from 'Apr 1' to 'Oct 1' in the +# Soviet Union (as far as I know). +# +# Tom Hofmann, Scientific Computer Center, CIBA-GEIGY AG, +# 4002 Basle, Switzerland +# ... + +# ... +# Date: Wed, 4 Feb 87 22:35:22 +0100 +# From: Dik T. Winter +# ... +# +# The information from Tom Hofmann is (as far as I know) not entirely correct. +# After a request from chongo at amdahl I tried to retrieve all information +# about DST in Europe. I was able to find all from about 1969. +# +# ...standardization on DST in Europe started in about 1977 with switches on +# first Sunday in April and last Sunday in September... +# In 1981 UK joined Europe insofar that +# the starting day for both shifted to last Sunday in March. And from 1982 +# the whole of Europe used DST, with switch dates April 1 and October 1 in +# the Sov[i]et Union. In 1985 the SU reverted to standard Europe[a]n switch +# dates... +# +# It should also be remembered that time-zones are not constants; e.g. +# Portugal switched in 1976 from MET (or CET) to WET with DST... +# Note also that though there were rules for switch dates not +# all countries abided to these dates, and many individual deviations +# occurred, though not since 1982 I believe. Another note: it is always +# assumed that DST is 1 hour ahead of normal time, this need not be the +# case; at least in the Netherlands there have been times when DST was 2 hours +# in advance of normal time. +# +# ... +# dik t. winter, cwi, amsterdam, nederland +# ... + +# From Bob Devine (1988-01-28): +# ... +# Greece: Last Sunday in April to last Sunday in September (iffy on dates). +# Since 1978. Change at midnight. +# ... +# Monaco: has same DST as France. +# ... diff --git a/tz/factory b/tz/factory new file mode 100644 index 0000000..4304f7c --- /dev/null +++ b/tz/factory @@ -0,0 +1,9 @@ +# This file is in the public domain, so clarified as of +# 2009-05-17 by Arthur David Olson. + +# For companies who don't want to put time zone specification in +# their installation procedures. When users run date, they'll get the message. +# Also useful for the "comp.sources" version. + +# Zone NAME GMTOFF RULES FORMAT +Zone Factory 0 - "Local time zone must be set--see zic manual page" diff --git a/tz/iso3166.tab b/tz/iso3166.tab new file mode 100644 index 0000000..7a8df2c --- /dev/null +++ b/tz/iso3166.tab @@ -0,0 +1,274 @@ +# ISO 3166 alpha-2 country codes +# +# This file is in the public domain, so clarified as of +# 2009-05-17 by Arthur David Olson. +# +# From Paul Eggert (2015-05-02): +# This file contains a table of two-letter country codes. Columns are +# separated by a single tab. Lines beginning with '#' are comments. +# All text uses UTF-8 encoding. The columns of the table are as follows: +# +# 1. ISO 3166-1 alpha-2 country code, current as of +# ISO 3166-1 Newsletter VI-16 (2013-07-11). See: Updates on ISO 3166 +# http://www.iso.org/iso/home/standards/country_codes/updates_on_iso_3166.htm +# 2. The usual English name for the coded region, +# chosen so that alphabetic sorting of subsets produces helpful lists. +# This is not the same as the English name in the ISO 3166 tables. +# +# The table is sorted by country code. +# +# This table is intended as an aid for users, to help them select time +# zone data appropriate for their practical needs. It is not intended +# to take or endorse any position on legal or territorial claims. +# +#country- +#code name of country, territory, area, or subdivision +AD Andorra +AE United Arab Emirates +AF Afghanistan +AG Antigua & Barbuda +AI Anguilla +AL Albania +AM Armenia +AO Angola +AQ Antarctica +AR Argentina +AS Samoa (American) +AT Austria +AU Australia +AW Aruba +AX Åland Islands +AZ Azerbaijan +BA Bosnia & Herzegovina +BB Barbados +BD Bangladesh +BE Belgium +BF Burkina Faso +BG Bulgaria +BH Bahrain +BI Burundi +BJ Benin +BL St Barthelemy +BM Bermuda +BN Brunei +BO Bolivia +BQ Caribbean NL +BR Brazil +BS Bahamas +BT Bhutan +BV Bouvet Island +BW Botswana +BY Belarus +BZ Belize +CA Canada +CC Cocos (Keeling) Islands +CD Congo (Dem. Rep.) +CF Central African Rep. +CG Congo (Rep.) +CH Switzerland +CI Côte d'Ivoire +CK Cook Islands +CL Chile +CM Cameroon +CN China +CO Colombia +CR Costa Rica +CU Cuba +CV Cape Verde +CW Curacao +CX Christmas Island +CY Cyprus +CZ Czech Republic +DE Germany +DJ Djibouti +DK Denmark +DM Dominica +DO Dominican Republic +DZ Algeria +EC Ecuador +EE Estonia +EG Egypt +EH Western Sahara +ER Eritrea +ES Spain +ET Ethiopia +FI Finland +FJ Fiji +FK Falkland Islands +FM Micronesia +FO Faroe Islands +FR France +GA Gabon +GB Britain (UK) +GD Grenada +GE Georgia +GF French Guiana +GG Guernsey +GH Ghana +GI Gibraltar +GL Greenland +GM Gambia +GN Guinea +GP Guadeloupe +GQ Equatorial Guinea +GR Greece +GS South Georgia & the South Sandwich Islands +GT Guatemala +GU Guam +GW Guinea-Bissau +GY Guyana +HK Hong Kong +HM Heard Island & McDonald Islands +HN Honduras +HR Croatia +HT Haiti +HU Hungary +ID Indonesia +IE Ireland +IL Israel +IM Isle of Man +IN India +IO British Indian Ocean Territory +IQ Iraq +IR Iran +IS Iceland +IT Italy +JE Jersey +JM Jamaica +JO Jordan +JP Japan +KE Kenya +KG Kyrgyzstan +KH Cambodia +KI Kiribati +KM Comoros +KN St Kitts & Nevis +KP Korea (North) +KR Korea (South) +KW Kuwait +KY Cayman Islands +KZ Kazakhstan +LA Laos +LB Lebanon +LC St Lucia +LI Liechtenstein +LK Sri Lanka +LR Liberia +LS Lesotho +LT Lithuania +LU Luxembourg +LV Latvia +LY Libya +MA Morocco +MC Monaco +MD Moldova +ME Montenegro +MF St Martin (French) +MG Madagascar +MH Marshall Islands +MK Macedonia +ML Mali +MM Myanmar (Burma) +MN Mongolia +MO Macau +MP Northern Mariana Islands +MQ Martinique +MR Mauritania +MS Montserrat +MT Malta +MU Mauritius +MV Maldives +MW Malawi +MX Mexico +MY Malaysia +MZ Mozambique +NA Namibia +NC New Caledonia +NE Niger +NF Norfolk Island +NG Nigeria +NI Nicaragua +NL Netherlands +NO Norway +NP Nepal +NR Nauru +NU Niue +NZ New Zealand +OM Oman +PA Panama +PE Peru +PF French Polynesia +PG Papua New Guinea +PH Philippines +PK Pakistan +PL Poland +PM St Pierre & Miquelon +PN Pitcairn +PR Puerto Rico +PS Palestine +PT Portugal +PW Palau +PY Paraguay +QA Qatar +RE Réunion +RO Romania +RS Serbia +RU Russia +RW Rwanda +SA Saudi Arabia +SB Solomon Islands +SC Seychelles +SD Sudan +SE Sweden +SG Singapore +SH St Helena +SI Slovenia +SJ Svalbard & Jan Mayen +SK Slovakia +SL Sierra Leone +SM San Marino +SN Senegal +SO Somalia +SR Suriname +SS South Sudan +ST Sao Tome & Principe +SV El Salvador +SX St Maarten (Dutch) +SY Syria +SZ Swaziland +TC Turks & Caicos Is +TD Chad +TF French Southern & Antarctic Lands +TG Togo +TH Thailand +TJ Tajikistan +TK Tokelau +TL East Timor +TM Turkmenistan +TN Tunisia +TO Tonga +TR Turkey +TT Trinidad & Tobago +TV Tuvalu +TW Taiwan +TZ Tanzania +UA Ukraine +UG Uganda +UM US minor outlying islands +US United States +UY Uruguay +UZ Uzbekistan +VA Vatican City +VC St Vincent +VE Venezuela +VG Virgin Islands (UK) +VI Virgin Islands (US) +VN Vietnam +VU Vanuatu +WF Wallis & Futuna +WS Samoa (western) +YE Yemen +YT Mayotte +ZA South Africa +ZM Zambia +ZW Zimbabwe diff --git a/tz/leap-seconds.list b/tz/leap-seconds.list new file mode 100644 index 0000000..7552796 --- /dev/null +++ b/tz/leap-seconds.list @@ -0,0 +1,249 @@ +# +# In the following text, the symbol '#' introduces +# a comment, which continues from that symbol until +# the end of the line. A plain comment line has a +# whitespace character following the comment indicator. +# There are also special comment lines defined below. +# A special comment will always have a non-whitespace +# character in column 2. +# +# A blank line should be ignored. +# +# The following table shows the corrections that must +# be applied to compute International Atomic Time (TAI) +# from the Coordinated Universal Time (UTC) values that +# are transmitted by almost all time services. +# +# The first column shows an epoch as a number of seconds +# since 1 January 1900, 00:00:00 (1900.0 is also used to +# indicate the same epoch.) Both of these time stamp formats +# ignore the complexities of the time scales that were +# used before the current definition of UTC at the start +# of 1972. (See note 3 below.) +# The second column shows the number of seconds that +# must be added to UTC to compute TAI for any timestamp +# at or after that epoch. The value on each line is +# valid from the indicated initial instant until the +# epoch given on the next one or indefinitely into the +# future if there is no next line. +# (The comment on each line shows the representation of +# the corresponding initial epoch in the usual +# day-month-year format. The epoch always begins at +# 00:00:00 UTC on the indicated day. See Note 5 below.) +# +# Important notes: +# +# 1. Coordinated Universal Time (UTC) is often referred to +# as Greenwich Mean Time (GMT). The GMT time scale is no +# longer used, and the use of GMT to designate UTC is +# discouraged. +# +# 2. The UTC time scale is realized by many national +# laboratories and timing centers. Each laboratory +# identifies its realization with its name: Thus +# UTC(NIST), UTC(USNO), etc. The differences among +# these different realizations are typically on the +# order of a few nanoseconds (i.e., 0.000 000 00x s) +# and can be ignored for many purposes. These differences +# are tabulated in Circular T, which is published monthly +# by the International Bureau of Weights and Measures +# (BIPM). See www.bipm.org for more information. +# +# 3. The current definition of the relationship between UTC +# and TAI dates from 1 January 1972. A number of different +# time scales were in use before that epoch, and it can be +# quite difficult to compute precise timestamps and time +# intervals in those "prehistoric" days. For more information, +# consult: +# +# The Explanatory Supplement to the Astronomical +# Ephemeris. +# or +# Terry Quinn, "The BIPM and the Accurate Measurement +# of Time," Proc. of the IEEE, Vol. 79, pp. 894-905, +# July, 1991. +# +# 4. The decision to insert a leap second into UTC is currently +# the responsibility of the International Earth Rotation and +# Reference Systems Service. (The name was changed from the +# International Earth Rotation Service, but the acronym IERS +# is still used.) +# +# Leap seconds are announced by the IERS in its Bulletin C. +# +# See www.iers.org for more details. +# +# Every national laboratory and timing center uses the +# data from the BIPM and the IERS to construct UTC(lab), +# their local realization of UTC. +# +# Although the definition also includes the possibility +# of dropping seconds ("negative" leap seconds), this has +# never been done and is unlikely to be necessary in the +# foreseeable future. +# +# 5. If your system keeps time as the number of seconds since +# some epoch (e.g., NTP timestamps), then the algorithm for +# assigning a UTC time stamp to an event that happens during a positive +# leap second is not well defined. The official name of that leap +# second is 23:59:60, but there is no way of representing that time +# in these systems. +# Many systems of this type effectively stop the system clock for +# one second during the leap second and use a time that is equivalent +# to 23:59:59 UTC twice. For these systems, the corresponding TAI +# timestamp would be obtained by advancing to the next entry in the +# following table when the time equivalent to 23:59:59 UTC +# is used for the second time. Thus the leap second which +# occurred on 30 June 1972 at 23:59:59 UTC would have TAI +# timestamps computed as follows: +# +# ... +# 30 June 1972 23:59:59 (2287785599, first time): TAI= UTC + 10 seconds +# 30 June 1972 23:59:60 (2287785599,second time): TAI= UTC + 11 seconds +# 1 July 1972 00:00:00 (2287785600) TAI= UTC + 11 seconds +# ... +# +# If your system realizes the leap second by repeating 00:00:00 UTC twice +# (this is possible but not usual), then the advance to the next entry +# in the table must occur the second time that a time equivalent to +# 00:00:00 UTC is used. Thus, using the same example as above: +# +# ... +# 30 June 1972 23:59:59 (2287785599): TAI= UTC + 10 seconds +# 30 June 1972 23:59:60 (2287785600, first time): TAI= UTC + 10 seconds +# 1 July 1972 00:00:00 (2287785600,second time): TAI= UTC + 11 seconds +# ... +# +# in both cases the use of timestamps based on TAI produces a smooth +# time scale with no discontinuity in the time interval. However, +# although the long-term behavior of the time scale is correct in both +# methods, the second method is technically not correct because it adds +# the extra second to the wrong day. +# +# This complexity would not be needed for negative leap seconds (if they +# are ever used). The UTC time would skip 23:59:59 and advance from +# 23:59:58 to 00:00:00 in that case. The TAI offset would decrease by +# 1 second at the same instant. This is a much easier situation to deal +# with, since the difficulty of unambiguously representing the epoch +# during the leap second does not arise. +# +# Some systems implement leap seconds by amortizing the leap second +# over the last few minutes of the day. The frequency of the local +# clock is decreased (or increased) to realize the positive (or +# negative) leap second. This method removes the time step described +# above. Although the long-term behavior of the time scale is correct +# in this case, this method introduces an error during the adjustment +# period both in time and in frequency with respect to the official +# definition of UTC. +# +# Questions or comments to: +# Judah Levine +# Time and Frequency Division +# NIST +# Boulder, Colorado +# Judah.Levine@nist.gov +# +# Last Update of leap second values: 5 January 2015 +# +# The following line shows this last update date in NTP timestamp +# format. This is the date on which the most recent change to +# the leap second data was added to the file. This line can +# be identified by the unique pair of characters in the first two +# columns as shown below. +# +#$ 3629404800 +# +# The NTP timestamps are in units of seconds since the NTP epoch, +# which is 1 January 1900, 00:00:00. The Modified Julian Day number +# corresponding to the NTP time stamp, X, can be computed as +# +# X/86400 + 15020 +# +# where the first term converts seconds to days and the second +# term adds the MJD corresponding to the time origin defined above. +# The integer portion of the result is the integer MJD for that +# day, and any remainder is the time of day, expressed as the +# fraction of the day since 0 hours UTC. The conversion from day +# fraction to seconds or to hours, minutes, and seconds may involve +# rounding or truncation, depending on the method used in the +# computation. +# +# The data in this file will be updated periodically as new leap +# seconds are announced. In addition to being entered on the line +# above, the update time (in NTP format) will be added to the basic +# file name leap-seconds to form the name leap-seconds.<NTP TIME>. +# In addition, the generic name leap-seconds.list will always point to +# the most recent version of the file. +# +# This update procedure will be performed only when a new leap second +# is announced. +# +# The following entry specifies the expiration date of the data +# in this file in units of seconds since the origin at the instant +# 1 January 1900, 00:00:00. This expiration date will be changed +# at least twice per year whether or not a new leap second is +# announced. These semi-annual changes will be made no later +# than 1 June and 1 December of each year to indicate what +# action (if any) is to be taken on 30 June and 31 December, +# respectively. (These are the customary effective dates for new +# leap seconds.) This expiration date will be identified by a +# unique pair of characters in columns 1 and 2 as shown below. +# In the unlikely event that a leap second is announced with an +# effective date other than 30 June or 31 December, then this +# file will be edited to include that leap second as soon as it is +# announced or at least one month before the effective date +# (whichever is later). +# If an announcement by the IERS specifies that no leap second is +# scheduled, then only the expiration date of the file will +# be advanced to show that the information in the file is still +# current -- the update time stamp, the data and the name of the file +# will not change. +# +# Updated through IERS Bulletin C51 +# File expires on: 28 December 2016 +# +#@ 3691872000 +# +2272060800 10 # 1 Jan 1972 +2287785600 11 # 1 Jul 1972 +2303683200 12 # 1 Jan 1973 +2335219200 13 # 1 Jan 1974 +2366755200 14 # 1 Jan 1975 +2398291200 15 # 1 Jan 1976 +2429913600 16 # 1 Jan 1977 +2461449600 17 # 1 Jan 1978 +2492985600 18 # 1 Jan 1979 +2524521600 19 # 1 Jan 1980 +2571782400 20 # 1 Jul 1981 +2603318400 21 # 1 Jul 1982 +2634854400 22 # 1 Jul 1983 +2698012800 23 # 1 Jul 1985 +2776982400 24 # 1 Jan 1988 +2840140800 25 # 1 Jan 1990 +2871676800 26 # 1 Jan 1991 +2918937600 27 # 1 Jul 1992 +2950473600 28 # 1 Jul 1993 +2982009600 29 # 1 Jul 1994 +3029443200 30 # 1 Jan 1996 +3076704000 31 # 1 Jul 1997 +3124137600 32 # 1 Jan 1999 +3345062400 33 # 1 Jan 2006 +3439756800 34 # 1 Jan 2009 +3550089600 35 # 1 Jul 2012 +3644697600 36 # 1 Jul 2015 +# +# the following special comment contains the +# hash value of the data in this file computed +# use the secure hash algorithm as specified +# by FIPS 180-1. See the files in ~/pub/sha for +# the details of how this hash value is +# computed. Note that the hash computation +# ignores comments and whitespace characters +# in data lines. It includes the NTP values +# of both the last modification time and the +# expiration time of the file, but not the +# white space on those lines. +# the hash line is also ignored in the +# computation. +# +#h afc03691 8ff53838 42080ba1 cdd22f1 48192c10 diff --git a/tz/leapseconds.awk b/tz/leapseconds.awk new file mode 100644 index 0000000..21fe540 --- /dev/null +++ b/tz/leapseconds.awk @@ -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 +} diff --git a/tz/localtime.c b/tz/localtime.c new file mode 100644 index 0000000..276ce34 --- /dev/null +++ b/tz/localtime.c @@ -0,0 +1,2271 @@ +/* +** This file is in the public domain, so clarified as of +** 1996-06-05 by Arthur David Olson. +*/ + +/* +** Leap second handling from Bradley White. +** POSIX-style TZ environment variable handling from Guy Harris. +*/ + +/*LINTLIBRARY*/ + +#define LOCALTIME_IMPLEMENTATION +#include "private.h" + +#include "tzfile.h" +#include "fcntl.h" + +#if THREAD_SAFE +# include <pthread.h> +static pthread_mutex_t locallock = PTHREAD_MUTEX_INITIALIZER; +static int lock(void) { return pthread_mutex_lock(&locallock); } +static void unlock(void) { pthread_mutex_unlock(&locallock); } +#else +static int lock(void) { return 0; } +static void unlock(void) { } +#endif + +/* NETBSD_INSPIRED_EXTERN functions are exported to callers if + NETBSD_INSPIRED is defined, and are private otherwise. */ +#if NETBSD_INSPIRED +# define NETBSD_INSPIRED_EXTERN +#else +# define NETBSD_INSPIRED_EXTERN static +#endif + +#ifndef TZ_ABBR_MAX_LEN +#define TZ_ABBR_MAX_LEN 16 +#endif /* !defined TZ_ABBR_MAX_LEN */ + +#ifndef TZ_ABBR_CHAR_SET +#define TZ_ABBR_CHAR_SET \ + "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 :+-._" +#endif /* !defined TZ_ABBR_CHAR_SET */ + +#ifndef TZ_ABBR_ERR_CHAR +#define TZ_ABBR_ERR_CHAR '_' +#endif /* !defined TZ_ABBR_ERR_CHAR */ + +/* +** SunOS 4.1.1 headers lack O_BINARY. +*/ + +#ifdef O_BINARY +#define OPEN_MODE (O_RDONLY | O_BINARY) +#endif /* defined O_BINARY */ +#ifndef O_BINARY +#define OPEN_MODE O_RDONLY +#endif /* !defined O_BINARY */ + +#ifndef WILDABBR +/* +** Someone might make incorrect use of a time zone abbreviation: +** 1. They might reference tzname[0] before calling tzset (explicitly +** or implicitly). +** 2. They might reference tzname[1] before calling tzset (explicitly +** or implicitly). +** 3. They might reference tzname[1] after setting to a time zone +** in which Daylight Saving Time is never observed. +** 4. They might reference tzname[0] after setting to a time zone +** in which Standard Time is never observed. +** 5. They might reference tm.TM_ZONE after calling offtime. +** What's best to do in the above cases is open to debate; +** for now, we just set things up so that in any of the five cases +** WILDABBR is used. Another possibility: initialize tzname[0] to the +** string "tzname[0] used before set", and similarly for the other cases. +** And another: initialize tzname[0] to "ERA", with an explanation in the +** manual page of what this "time zone abbreviation" means (doing this so +** that tzname[0] has the "normal" length of three characters). +*/ +#define WILDABBR " " +#endif /* !defined WILDABBR */ + +static const char wildabbr[] = WILDABBR; + +static const char gmt[] = "GMT"; + +/* +** The DST rules to use if TZ has no rules and we can't load TZDEFRULES. +** We default to US rules as of 1999-08-17. +** POSIX 1003.1 section 8.1.1 says that the default DST rules are +** implementation dependent; for historical reasons, US rules are a +** common default. +*/ +#ifndef TZDEFRULESTRING +#define TZDEFRULESTRING ",M4.1.0,M10.5.0" +#endif /* !defined TZDEFDST */ + +struct ttinfo { /* time type information */ + int_fast32_t tt_gmtoff; /* UT offset in seconds */ + bool tt_isdst; /* used to set tm_isdst */ + int tt_abbrind; /* abbreviation list index */ + bool tt_ttisstd; /* transition is std time */ + bool tt_ttisgmt; /* transition is UT */ +}; + +struct lsinfo { /* leap second information */ + time_t ls_trans; /* transition time */ + int_fast64_t ls_corr; /* correction to apply */ +}; + +#define SMALLEST(a, b) (((a) < (b)) ? (a) : (b)) +#define BIGGEST(a, b) (((a) > (b)) ? (a) : (b)) + +#ifdef TZNAME_MAX +#define MY_TZNAME_MAX TZNAME_MAX +#endif /* defined TZNAME_MAX */ +#ifndef TZNAME_MAX +#define MY_TZNAME_MAX 255 +#endif /* !defined TZNAME_MAX */ + +struct state { + int leapcnt; + int timecnt; + int typecnt; + int charcnt; + bool goback; + bool goahead; + time_t ats[TZ_MAX_TIMES]; + unsigned char types[TZ_MAX_TIMES]; + struct ttinfo ttis[TZ_MAX_TYPES]; + char chars[BIGGEST(BIGGEST(TZ_MAX_CHARS + 1, sizeof gmt), + (2 * (MY_TZNAME_MAX + 1)))]; + struct lsinfo lsis[TZ_MAX_LEAPS]; + int defaulttype; /* for early times or if no transitions */ +}; + +enum r_type { + JULIAN_DAY, /* Jn = Julian day */ + DAY_OF_YEAR, /* n = day of year */ + MONTH_NTH_DAY_OF_WEEK /* Mm.n.d = month, week, day of week */ +}; + +struct rule { + enum r_type r_type; /* type of rule */ + int r_day; /* day number of rule */ + int r_week; /* week number of rule */ + int r_mon; /* month number of rule */ + int_fast32_t r_time; /* transition time of rule */ +}; + +static struct tm *gmtsub(struct state const *, time_t const *, int_fast32_t, + struct tm *); +static bool increment_overflow(int *, int); +static bool increment_overflow_time(time_t *, int_fast32_t); +static bool normalize_overflow32(int_fast32_t *, int *, int); +static struct tm *timesub(time_t const *, int_fast32_t, struct state const *, + struct tm *); +static bool typesequiv(struct state const *, int, int); +static bool tzparse(char const *, struct state *, bool); + +#ifdef ALL_STATE +static struct state * lclptr; +static struct state * gmtptr; +#endif /* defined ALL_STATE */ + +#ifndef ALL_STATE +static struct state lclmem; +static struct state gmtmem; +#define lclptr (&lclmem) +#define gmtptr (&gmtmem) +#endif /* State Farm */ + +#ifndef TZ_STRLEN_MAX +#define TZ_STRLEN_MAX 255 +#endif /* !defined TZ_STRLEN_MAX */ + +static char lcl_TZname[TZ_STRLEN_MAX + 1]; +static int lcl_is_set; + +/* +** Section 4.12.3 of X3.159-1989 requires that +** Except for the strftime function, these functions [asctime, +** ctime, gmtime, localtime] return values in one of two static +** objects: a broken-down time structure and an array of char. +** Thanks to Paul Eggert for noting this. +*/ + +static struct tm tm; + +#if !HAVE_POSIX_DECLS +char * tzname[2] = { + (char *) wildabbr, + (char *) wildabbr +}; +# ifdef USG_COMPAT +long timezone; +int daylight; +# endif +#endif + +#ifdef ALTZONE +long altzone; +#endif /* defined ALTZONE */ + +/* Initialize *S to a value based on GMTOFF, ISDST, and ABBRIND. */ +static void +init_ttinfo(struct ttinfo *s, int_fast32_t gmtoff, bool isdst, int abbrind) +{ + s->tt_gmtoff = gmtoff; + s->tt_isdst = isdst; + s->tt_abbrind = abbrind; + s->tt_ttisstd = false; + s->tt_ttisgmt = false; +} + +static int_fast32_t +detzcode(const char *const codep) +{ + register int_fast32_t result; + register int i; + int_fast32_t one = 1; + int_fast32_t halfmaxval = one << (32 - 2); + int_fast32_t maxval = halfmaxval - 1 + halfmaxval; + int_fast32_t minval = -1 - maxval; + + result = codep[0] & 0x7f; + for (i = 1; i < 4; ++i) + result = (result << 8) | (codep[i] & 0xff); + + if (codep[0] & 0x80) { + /* Do two's-complement negation even on non-two's-complement machines. + If the result would be minval - 1, return minval. */ + result -= !TWOS_COMPLEMENT(int_fast32_t) && result != 0; + result += minval; + } + return result; +} + +static int_fast64_t +detzcode64(const char *const codep) +{ + register uint_fast64_t result; + register int i; + int_fast64_t one = 1; + int_fast64_t halfmaxval = one << (64 - 2); + int_fast64_t maxval = halfmaxval - 1 + halfmaxval; + int_fast64_t minval = -TWOS_COMPLEMENT(int_fast64_t) - maxval; + + result = codep[0] & 0x7f; + for (i = 1; i < 8; ++i) + result = (result << 8) | (codep[i] & 0xff); + + if (codep[0] & 0x80) { + /* Do two's-complement negation even on non-two's-complement machines. + If the result would be minval - 1, return minval. */ + result -= !TWOS_COMPLEMENT(int_fast64_t) && result != 0; + result += minval; + } + return result; +} + +static void +update_tzname_etc(struct state const *sp, struct ttinfo const *ttisp) +{ + tzname[ttisp->tt_isdst] = (char *) &sp->chars[ttisp->tt_abbrind]; +#ifdef USG_COMPAT + if (!ttisp->tt_isdst) + timezone = - ttisp->tt_gmtoff; +#endif +#ifdef ALTZONE + if (ttisp->tt_isdst) + altzone = - ttisp->tt_gmtoff; +#endif +} + +static void +settzname(void) +{ + register struct state * const sp = lclptr; + register int i; + + tzname[0] = tzname[1] = (char *) wildabbr; +#ifdef USG_COMPAT + daylight = 0; + timezone = 0; +#endif /* defined USG_COMPAT */ +#ifdef ALTZONE + altzone = 0; +#endif /* defined ALTZONE */ + if (sp == NULL) { + tzname[0] = tzname[1] = (char *) gmt; + return; + } + /* + ** And to get the latest zone names into tzname. . . + */ + for (i = 0; i < sp->typecnt; ++i) { + register const struct ttinfo * const ttisp = &sp->ttis[i]; + update_tzname_etc(sp, ttisp); + } + for (i = 0; i < sp->timecnt; ++i) { + register const struct ttinfo * const ttisp = + &sp->ttis[ + sp->types[i]]; + update_tzname_etc(sp, ttisp); +#ifdef USG_COMPAT + if (ttisp->tt_isdst) + daylight = 1; +#endif /* defined USG_COMPAT */ + } +} + +static void +scrub_abbrs(struct state *sp) +{ + int i; + /* + ** First, replace bogus characters. + */ + for (i = 0; i < sp->charcnt; ++i) + if (strchr(TZ_ABBR_CHAR_SET, sp->chars[i]) == NULL) + sp->chars[i] = TZ_ABBR_ERR_CHAR; + /* + ** Second, truncate long abbreviations. + */ + for (i = 0; i < sp->typecnt; ++i) { + register const struct ttinfo * const ttisp = &sp->ttis[i]; + register char * cp = &sp->chars[ttisp->tt_abbrind]; + + if (strlen(cp) > TZ_ABBR_MAX_LEN && + strcmp(cp, GRANDPARENTED) != 0) + *(cp + TZ_ABBR_MAX_LEN) = '\0'; + } +} + +static bool +differ_by_repeat(const time_t t1, const time_t t0) +{ + if (TYPE_BIT(time_t) - TYPE_SIGNED(time_t) < SECSPERREPEAT_BITS) + return 0; + return t1 - t0 == SECSPERREPEAT; +} + +/* Input buffer for data read from a compiled tz file. */ +union input_buffer { + /* The first part of the buffer, interpreted as a header. */ + struct tzhead tzhead; + + /* The entire buffer. */ + char buf[2 * sizeof(struct tzhead) + 2 * sizeof (struct state) + + 4 * TZ_MAX_TIMES]; +}; + +/* Local storage needed for 'tzloadbody'. */ +union local_storage { + /* The file name to be opened. */ + char fullname[FILENAME_MAX + 1]; + + /* The results of analyzing the file's contents after it is opened. */ + struct { + /* The input buffer. */ + union input_buffer u; + + /* A temporary state used for parsing a TZ string in the file. */ + struct state st; + } u; +}; + +/* Load tz data from the file named NAME into *SP. Read extended + format if DOEXTEND. Use *LSP for temporary storage. Return 0 on + success, an errno value on failure. */ +static int +tzloadbody(char const *name, struct state *sp, bool doextend, + union local_storage *lsp) +{ + register int i; + register int fid; + register int stored; + register ssize_t nread; + register bool doaccess; + register char *fullname = lsp->fullname; + register union input_buffer *up = &lsp->u.u; + register int tzheadsize = sizeof (struct tzhead); + + sp->goback = sp->goahead = false; + + if (! name) { + name = TZDEFAULT; + if (! name) + return EINVAL; + } + + if (name[0] == ':') + ++name; + doaccess = name[0] == '/'; + if (!doaccess) { + char const *p = TZDIR; + if (! p) + return EINVAL; + if (sizeof lsp->fullname - 1 <= strlen(p) + strlen(name)) + return ENAMETOOLONG; + strcpy(fullname, p); + strcat(fullname, "/"); + strcat(fullname, name); + /* Set doaccess if '.' (as in "../") shows up in name. */ + if (strchr(name, '.')) + doaccess = true; + name = fullname; + } + if (doaccess && access(name, R_OK) != 0) + return errno; + fid = open(name, OPEN_MODE); + if (fid < 0) + return errno; + + nread = read(fid, up->buf, sizeof up->buf); + if (nread < tzheadsize) { + int err = nread < 0 ? errno : EINVAL; + close(fid); + return err; + } + if (close(fid) < 0) + return errno; + for (stored = 4; stored <= 8; stored *= 2) { + int_fast32_t ttisstdcnt = detzcode(up->tzhead.tzh_ttisstdcnt); + int_fast32_t ttisgmtcnt = detzcode(up->tzhead.tzh_ttisgmtcnt); + int_fast32_t leapcnt = detzcode(up->tzhead.tzh_leapcnt); + int_fast32_t timecnt = detzcode(up->tzhead.tzh_timecnt); + int_fast32_t typecnt = detzcode(up->tzhead.tzh_typecnt); + int_fast32_t charcnt = detzcode(up->tzhead.tzh_charcnt); + char const *p = up->buf + tzheadsize; + if (! (0 <= leapcnt && leapcnt < TZ_MAX_LEAPS + && 0 < typecnt && typecnt < TZ_MAX_TYPES + && 0 <= timecnt && timecnt < TZ_MAX_TIMES + && 0 <= charcnt && charcnt < TZ_MAX_CHARS + && (ttisstdcnt == typecnt || ttisstdcnt == 0) + && (ttisgmtcnt == typecnt || ttisgmtcnt == 0))) + return EINVAL; + if (nread + < (tzheadsize /* struct tzhead */ + + timecnt * stored /* ats */ + + timecnt /* types */ + + typecnt * 6 /* ttinfos */ + + charcnt /* chars */ + + leapcnt * (stored + 4) /* lsinfos */ + + ttisstdcnt /* ttisstds */ + + ttisgmtcnt)) /* ttisgmts */ + return EINVAL; + sp->leapcnt = leapcnt; + sp->timecnt = timecnt; + sp->typecnt = typecnt; + sp->charcnt = charcnt; + + /* Read transitions, discarding those out of time_t range. + But pretend the last transition before time_t_min + occurred at time_t_min. */ + timecnt = 0; + for (i = 0; i < sp->timecnt; ++i) { + int_fast64_t at + = stored == 4 ? detzcode(p) : detzcode64(p); + sp->types[i] = at <= time_t_max; + if (sp->types[i]) { + time_t attime + = ((TYPE_SIGNED(time_t) ? at < time_t_min : at < 0) + ? time_t_min : at); + if (timecnt && attime <= sp->ats[timecnt - 1]) { + if (attime < sp->ats[timecnt - 1]) + return EINVAL; + sp->types[i - 1] = 0; + timecnt--; + } + sp->ats[timecnt++] = attime; + } + p += stored; + } + + timecnt = 0; + for (i = 0; i < sp->timecnt; ++i) { + unsigned char typ = *p++; + if (sp->typecnt <= typ) + return EINVAL; + if (sp->types[i]) + sp->types[timecnt++] = typ; + } + sp->timecnt = timecnt; + for (i = 0; i < sp->typecnt; ++i) { + register struct ttinfo * ttisp; + unsigned char isdst, abbrind; + + ttisp = &sp->ttis[i]; + ttisp->tt_gmtoff = detzcode(p); + p += 4; + isdst = *p++; + if (! (isdst < 2)) + return EINVAL; + ttisp->tt_isdst = isdst; + abbrind = *p++; + if (! (abbrind < sp->charcnt)) + return EINVAL; + ttisp->tt_abbrind = abbrind; + } + for (i = 0; i < sp->charcnt; ++i) + sp->chars[i] = *p++; + sp->chars[i] = '\0'; /* ensure '\0' at end */ + + /* Read leap seconds, discarding those out of time_t range. */ + leapcnt = 0; + for (i = 0; i < sp->leapcnt; ++i) { + int_fast64_t tr = stored == 4 ? detzcode(p) : detzcode64(p); + int_fast32_t corr = detzcode(p + stored); + p += stored + 4; + if (tr <= time_t_max) { + time_t trans + = ((TYPE_SIGNED(time_t) ? tr < time_t_min : tr < 0) + ? time_t_min : tr); + if (leapcnt && trans <= sp->lsis[leapcnt - 1].ls_trans) { + if (trans < sp->lsis[leapcnt - 1].ls_trans) + return EINVAL; + leapcnt--; + } + sp->lsis[leapcnt].ls_trans = trans; + sp->lsis[leapcnt].ls_corr = corr; + leapcnt++; + } + } + sp->leapcnt = leapcnt; + + for (i = 0; i < sp->typecnt; ++i) { + register struct ttinfo * ttisp; + + ttisp = &sp->ttis[i]; + if (ttisstdcnt == 0) + ttisp->tt_ttisstd = false; + else { + if (*p != true && *p != false) + return EINVAL; + ttisp->tt_ttisstd = *p++; + } + } + for (i = 0; i < sp->typecnt; ++i) { + register struct ttinfo * ttisp; + + ttisp = &sp->ttis[i]; + if (ttisgmtcnt == 0) + ttisp->tt_ttisgmt = false; + else { + if (*p != true && *p != false) + return EINVAL; + ttisp->tt_ttisgmt = *p++; + } + } + /* + ** If this is an old file, we're done. + */ + if (up->tzhead.tzh_version[0] == '\0') + break; + nread -= p - up->buf; + memmove(up->buf, p, nread); + } + if (doextend && nread > 2 && + up->buf[0] == '\n' && up->buf[nread - 1] == '\n' && + sp->typecnt + 2 <= TZ_MAX_TYPES) { + struct state *ts = &lsp->u.st; + + up->buf[nread - 1] = '\0'; + if (tzparse(&up->buf[1], ts, false) + && ts->typecnt == 2) { + + /* Attempt to reuse existing abbreviations. + Without this, America/Anchorage would stop + working after 2037 when TZ_MAX_CHARS is 50, as + sp->charcnt equals 42 (for LMT CAT CAWT CAPT AHST + AHDT YST AKDT AKST) and ts->charcnt equals 10 + (for AKST AKDT). Reusing means sp->charcnt can + stay 42 in this example. */ + int gotabbr = 0; + int charcnt = sp->charcnt; + for (i = 0; i < 2; i++) { + char *tsabbr = ts->chars + ts->ttis[i].tt_abbrind; + int j; + for (j = 0; j < charcnt; j++) + if (strcmp(sp->chars + j, tsabbr) == 0) { + ts->ttis[i].tt_abbrind = j; + gotabbr++; + break; + } + if (! (j < charcnt)) { + int tsabbrlen = strlen(tsabbr); + if (j + tsabbrlen < TZ_MAX_CHARS) { + strcpy(sp->chars + j, tsabbr); + charcnt = j + tsabbrlen + 1; + ts->ttis[i].tt_abbrind = j; + gotabbr++; + } + } + } + if (gotabbr == 2) { + sp->charcnt = charcnt; + for (i = 0; i < ts->timecnt; i++) + if (sp->ats[sp->timecnt - 1] < ts->ats[i]) + break; + while (i < ts->timecnt + && sp->timecnt < TZ_MAX_TIMES) { + sp->ats[sp->timecnt] = ts->ats[i]; + sp->types[sp->timecnt] = (sp->typecnt + + ts->types[i]); + sp->timecnt++; + i++; + } + sp->ttis[sp->typecnt++] = ts->ttis[0]; + sp->ttis[sp->typecnt++] = ts->ttis[1]; + } + } + } + if (sp->timecnt > 1) { + for (i = 1; i < sp->timecnt; ++i) + if (typesequiv(sp, sp->types[i], sp->types[0]) && + differ_by_repeat(sp->ats[i], sp->ats[0])) { + sp->goback = true; + break; + } + for (i = sp->timecnt - 2; i >= 0; --i) + if (typesequiv(sp, sp->types[sp->timecnt - 1], + sp->types[i]) && + differ_by_repeat(sp->ats[sp->timecnt - 1], + sp->ats[i])) { + sp->goahead = true; + break; + } + } + /* + ** If type 0 is is unused in transitions, + ** it's the type to use for early times. + */ + for (i = 0; i < sp->timecnt; ++i) + if (sp->types[i] == 0) + break; + i = i < sp->timecnt ? -1 : 0; + /* + ** Absent the above, + ** if there are transition times + ** and the first transition is to a daylight time + ** find the standard type less than and closest to + ** the type of the first transition. + */ + if (i < 0 && sp->timecnt > 0 && sp->ttis[sp->types[0]].tt_isdst) { + i = sp->types[0]; + while (--i >= 0) + if (!sp->ttis[i].tt_isdst) + break; + } + /* + ** If no result yet, find the first standard type. + ** If there is none, punt to type zero. + */ + if (i < 0) { + i = 0; + while (sp->ttis[i].tt_isdst) + if (++i >= sp->typecnt) { + i = 0; + break; + } + } + sp->defaulttype = i; + return 0; +} + +/* Load tz data from the file named NAME into *SP. Read extended + format if DOEXTEND. Return 0 on success, an errno value on failure. */ +static int +tzload(char const *name, struct state *sp, bool doextend) +{ +#ifdef ALL_STATE + union local_storage *lsp = malloc(sizeof *lsp); + if (!lsp) + return errno; + else { + int err = tzloadbody(name, sp, doextend, lsp); + free(lsp); + return err; + } +#else + union local_storage ls; + return tzloadbody(name, sp, doextend, &ls); +#endif +} + +static bool +typesequiv(const struct state *sp, int a, int b) +{ + register bool result; + + if (sp == NULL || + a < 0 || a >= sp->typecnt || + b < 0 || b >= sp->typecnt) + result = false; + else { + register const struct ttinfo * ap = &sp->ttis[a]; + register const struct ttinfo * bp = &sp->ttis[b]; + result = ap->tt_gmtoff == bp->tt_gmtoff && + ap->tt_isdst == bp->tt_isdst && + ap->tt_ttisstd == bp->tt_ttisstd && + ap->tt_ttisgmt == bp->tt_ttisgmt && + strcmp(&sp->chars[ap->tt_abbrind], + &sp->chars[bp->tt_abbrind]) == 0; + } + return result; +} + +static const int mon_lengths[2][MONSPERYEAR] = { + { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }, + { 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 } +}; + +static const int year_lengths[2] = { + DAYSPERNYEAR, DAYSPERLYEAR +}; + +/* +** Given a pointer into a time zone string, scan until a character that is not +** a valid character in a zone name is found. Return a pointer to that +** character. +*/ + +static const char * ATTRIBUTE_PURE +getzname(register const char *strp) +{ + register char c; + + while ((c = *strp) != '\0' && !is_digit(c) && c != ',' && c != '-' && + c != '+') + ++strp; + return strp; +} + +/* +** Given a pointer into an extended time zone string, scan until the ending +** delimiter of the zone name is located. Return a pointer to the delimiter. +** +** As with getzname above, the legal character set is actually quite +** restricted, with other characters producing undefined results. +** We don't do any checking here; checking is done later in common-case code. +*/ + +static const char * ATTRIBUTE_PURE +getqzname(register const char *strp, const int delim) +{ + register int c; + + while ((c = *strp) != '\0' && c != delim) + ++strp; + return strp; +} + +/* +** Given a pointer into a time zone string, extract a number from that string. +** Check that the number is within a specified range; if it is not, return +** NULL. +** Otherwise, return a pointer to the first character not part of the number. +*/ + +static const char * +getnum(register const char *strp, int *const nump, const int min, const int max) +{ + register char c; + register int num; + + if (strp == NULL || !is_digit(c = *strp)) + return NULL; + num = 0; + do { + num = num * 10 + (c - '0'); + if (num > max) + return NULL; /* illegal value */ + c = *++strp; + } while (is_digit(c)); + if (num < min) + return NULL; /* illegal value */ + *nump = num; + return strp; +} + +/* +** Given a pointer into a time zone string, extract a number of seconds, +** in hh[:mm[:ss]] form, from the string. +** If any error occurs, return NULL. +** Otherwise, return a pointer to the first character not part of the number +** of seconds. +*/ + +static const char * +getsecs(register const char *strp, int_fast32_t *const secsp) +{ + int num; + + /* + ** 'HOURSPERDAY * DAYSPERWEEK - 1' allows quasi-Posix rules like + ** "M10.4.6/26", which does not conform to Posix, + ** but which specifies the equivalent of + ** "02:00 on the first Sunday on or after 23 Oct". + */ + strp = getnum(strp, &num, 0, HOURSPERDAY * DAYSPERWEEK - 1); + if (strp == NULL) + return NULL; + *secsp = num * (int_fast32_t) SECSPERHOUR; + if (*strp == ':') { + ++strp; + strp = getnum(strp, &num, 0, MINSPERHOUR - 1); + if (strp == NULL) + return NULL; + *secsp += num * SECSPERMIN; + if (*strp == ':') { + ++strp; + /* 'SECSPERMIN' allows for leap seconds. */ + strp = getnum(strp, &num, 0, SECSPERMIN); + if (strp == NULL) + return NULL; + *secsp += num; + } + } + return strp; +} + +/* +** Given a pointer into a time zone string, extract an offset, in +** [+-]hh[:mm[:ss]] form, from the string. +** If any error occurs, return NULL. +** Otherwise, return a pointer to the first character not part of the time. +*/ + +static const char * +getoffset(register const char *strp, int_fast32_t *const offsetp) +{ + register bool neg = false; + + if (*strp == '-') { + neg = true; + ++strp; + } else if (*strp == '+') + ++strp; + strp = getsecs(strp, offsetp); + if (strp == NULL) + return NULL; /* illegal time */ + if (neg) + *offsetp = -*offsetp; + return strp; +} + +/* +** Given a pointer into a time zone string, extract a rule in the form +** date[/time]. See POSIX section 8 for the format of "date" and "time". +** If a valid rule is not found, return NULL. +** Otherwise, return a pointer to the first character not part of the rule. +*/ + +static const char * +getrule(const char *strp, register struct rule *const rulep) +{ + if (*strp == 'J') { + /* + ** Julian day. + */ + rulep->r_type = JULIAN_DAY; + ++strp; + strp = getnum(strp, &rulep->r_day, 1, DAYSPERNYEAR); + } else if (*strp == 'M') { + /* + ** Month, week, day. + */ + rulep->r_type = MONTH_NTH_DAY_OF_WEEK; + ++strp; + strp = getnum(strp, &rulep->r_mon, 1, MONSPERYEAR); + if (strp == NULL) + return NULL; + if (*strp++ != '.') + return NULL; + strp = getnum(strp, &rulep->r_week, 1, 5); + if (strp == NULL) + return NULL; + if (*strp++ != '.') + return NULL; + strp = getnum(strp, &rulep->r_day, 0, DAYSPERWEEK - 1); + } else if (is_digit(*strp)) { + /* + ** Day of year. + */ + rulep->r_type = DAY_OF_YEAR; + strp = getnum(strp, &rulep->r_day, 0, DAYSPERLYEAR - 1); + } else return NULL; /* invalid format */ + if (strp == NULL) + return NULL; + if (*strp == '/') { + /* + ** Time specified. + */ + ++strp; + strp = getoffset(strp, &rulep->r_time); + } else rulep->r_time = 2 * SECSPERHOUR; /* default = 2:00:00 */ + return strp; +} + +/* +** Given a year, a rule, and the offset from UT at the time that rule takes +** effect, calculate the year-relative time that rule takes effect. +*/ + +static int_fast32_t ATTRIBUTE_PURE +transtime(const int year, register const struct rule *const rulep, + const int_fast32_t offset) +{ + register bool leapyear; + register int_fast32_t value; + register int i; + int d, m1, yy0, yy1, yy2, dow; + + INITIALIZE(value); + leapyear = isleap(year); + switch (rulep->r_type) { + + case JULIAN_DAY: + /* + ** Jn - Julian day, 1 == January 1, 60 == March 1 even in leap + ** years. + ** In non-leap years, or if the day number is 59 or less, just + ** add SECSPERDAY times the day number-1 to the time of + ** January 1, midnight, to get the day. + */ + value = (rulep->r_day - 1) * SECSPERDAY; + if (leapyear && rulep->r_day >= 60) + value += SECSPERDAY; + break; + + case DAY_OF_YEAR: + /* + ** n - day of year. + ** Just add SECSPERDAY times the day number to the time of + ** January 1, midnight, to get the day. + */ + value = rulep->r_day * SECSPERDAY; + break; + + case MONTH_NTH_DAY_OF_WEEK: + /* + ** Mm.n.d - nth "dth day" of month m. + */ + + /* + ** Use Zeller's Congruence to get day-of-week of first day of + ** month. + */ + m1 = (rulep->r_mon + 9) % 12 + 1; + yy0 = (rulep->r_mon <= 2) ? (year - 1) : year; + yy1 = yy0 / 100; + yy2 = yy0 % 100; + dow = ((26 * m1 - 2) / 10 + + 1 + yy2 + yy2 / 4 + yy1 / 4 - 2 * yy1) % 7; + if (dow < 0) + dow += DAYSPERWEEK; + + /* + ** "dow" is the day-of-week of the first day of the month. Get + ** the day-of-month (zero-origin) of the first "dow" day of the + ** month. + */ + d = rulep->r_day - dow; + if (d < 0) + d += DAYSPERWEEK; + for (i = 1; i < rulep->r_week; ++i) { + if (d + DAYSPERWEEK >= + mon_lengths[leapyear][rulep->r_mon - 1]) + break; + d += DAYSPERWEEK; + } + + /* + ** "d" is the day-of-month (zero-origin) of the day we want. + */ + value = d * SECSPERDAY; + for (i = 0; i < rulep->r_mon - 1; ++i) + value += mon_lengths[leapyear][i] * SECSPERDAY; + break; + } + + /* + ** "value" is the year-relative time of 00:00:00 UT on the day in + ** question. To get the year-relative time of the specified local + ** time on that day, add the transition time and the current offset + ** from UT. + */ + return value + rulep->r_time + offset; +} + +/* +** Given a POSIX section 8-style TZ string, fill in the rule tables as +** appropriate. +*/ + +static bool +tzparse(const char *name, struct state *sp, bool lastditch) +{ + const char * stdname; + const char * dstname; + size_t stdlen; + size_t dstlen; + size_t charcnt; + int_fast32_t stdoffset; + int_fast32_t dstoffset; + register char * cp; + register bool load_ok; + + stdname = name; + if (lastditch) { + stdlen = sizeof gmt - 1; + name += stdlen; + stdoffset = 0; + } else { + if (*name == '<') { + name++; + stdname = name; + name = getqzname(name, '>'); + if (*name != '>') + return false; + stdlen = name - stdname; + name++; + } else { + name = getzname(name); + stdlen = name - stdname; + } + if (!stdlen) + return false; + name = getoffset(name, &stdoffset); + if (name == NULL) + return false; + } + charcnt = stdlen + 1; + if (sizeof sp->chars < charcnt) + return false; + load_ok = tzload(TZDEFRULES, sp, false) == 0; + if (!load_ok) + sp->leapcnt = 0; /* so, we're off a little */ + if (*name != '\0') { + if (*name == '<') { + dstname = ++name; + name = getqzname(name, '>'); + if (*name != '>') + return false; + dstlen = name - dstname; + name++; + } else { + dstname = name; + name = getzname(name); + dstlen = name - dstname; /* length of DST zone name */ + } + if (!dstlen) + return false; + charcnt += dstlen + 1; + if (sizeof sp->chars < charcnt) + return false; + if (*name != '\0' && *name != ',' && *name != ';') { + name = getoffset(name, &dstoffset); + if (name == NULL) + return false; + } else dstoffset = stdoffset - SECSPERHOUR; + if (*name == '\0' && !load_ok) + name = TZDEFRULESTRING; + if (*name == ',' || *name == ';') { + struct rule start; + struct rule end; + register int year; + register int yearlim; + register int timecnt; + time_t janfirst; + + ++name; + if ((name = getrule(name, &start)) == NULL) + return false; + if (*name++ != ',') + return false; + if ((name = getrule(name, &end)) == NULL) + return false; + if (*name != '\0') + return false; + sp->typecnt = 2; /* standard time and DST */ + /* + ** Two transitions per year, from EPOCH_YEAR forward. + */ + init_ttinfo(&sp->ttis[0], -dstoffset, true, stdlen + 1); + init_ttinfo(&sp->ttis[1], -stdoffset, false, 0); + sp->defaulttype = 0; + timecnt = 0; + janfirst = 0; + yearlim = EPOCH_YEAR + YEARSPERREPEAT; + for (year = EPOCH_YEAR; year < yearlim; year++) { + int_fast32_t + starttime = transtime(year, &start, stdoffset), + endtime = transtime(year, &end, dstoffset); + int_fast32_t + yearsecs = (year_lengths[isleap(year)] + * SECSPERDAY); + bool reversed = endtime < starttime; + if (reversed) { + int_fast32_t swap = starttime; + starttime = endtime; + endtime = swap; + } + if (reversed + || (starttime < endtime + && (endtime - starttime + < (yearsecs + + (stdoffset - dstoffset))))) { + if (TZ_MAX_TIMES - 2 < timecnt) + break; + yearlim = year + YEARSPERREPEAT + 1; + sp->ats[timecnt] = janfirst; + if (increment_overflow_time + (&sp->ats[timecnt], starttime)) + break; + sp->types[timecnt++] = reversed; + sp->ats[timecnt] = janfirst; + if (increment_overflow_time + (&sp->ats[timecnt], endtime)) + break; + sp->types[timecnt++] = !reversed; + } + if (increment_overflow_time(&janfirst, yearsecs)) + break; + } + sp->timecnt = timecnt; + if (!timecnt) + sp->typecnt = 1; /* Perpetual DST. */ + } else { + register int_fast32_t theirstdoffset; + register int_fast32_t theirdstoffset; + register int_fast32_t theiroffset; + register bool isdst; + register int i; + register int j; + + if (*name != '\0') + return false; + /* + ** Initial values of theirstdoffset and theirdstoffset. + */ + theirstdoffset = 0; + for (i = 0; i < sp->timecnt; ++i) { + j = sp->types[i]; + if (!sp->ttis[j].tt_isdst) { + theirstdoffset = + -sp->ttis[j].tt_gmtoff; + break; + } + } + theirdstoffset = 0; + for (i = 0; i < sp->timecnt; ++i) { + j = sp->types[i]; + if (sp->ttis[j].tt_isdst) { + theirdstoffset = + -sp->ttis[j].tt_gmtoff; + break; + } + } + /* + ** Initially we're assumed to be in standard time. + */ + isdst = false; + theiroffset = theirstdoffset; + /* + ** Now juggle transition times and types + ** tracking offsets as you do. + */ + for (i = 0; i < sp->timecnt; ++i) { + j = sp->types[i]; + sp->types[i] = sp->ttis[j].tt_isdst; + if (sp->ttis[j].tt_ttisgmt) { + /* No adjustment to transition time */ + } else { + /* + ** If summer time is in effect, and the + ** transition time was not specified as + ** standard time, add the summer time + ** offset to the transition time; + ** otherwise, add the standard time + ** offset to the transition time. + */ + /* + ** Transitions from DST to DDST + ** will effectively disappear since + ** POSIX provides for only one DST + ** offset. + */ + if (isdst && !sp->ttis[j].tt_ttisstd) { + sp->ats[i] += dstoffset - + theirdstoffset; + } else { + sp->ats[i] += stdoffset - + theirstdoffset; + } + } + theiroffset = -sp->ttis[j].tt_gmtoff; + if (sp->ttis[j].tt_isdst) + theirdstoffset = theiroffset; + else theirstdoffset = theiroffset; + } + /* + ** Finally, fill in ttis. + */ + init_ttinfo(&sp->ttis[0], -stdoffset, false, 0); + init_ttinfo(&sp->ttis[1], -dstoffset, true, stdlen + 1); + sp->typecnt = 2; + sp->defaulttype = 0; + } + } else { + dstlen = 0; + sp->typecnt = 1; /* only standard time */ + sp->timecnt = 0; + init_ttinfo(&sp->ttis[0], -stdoffset, false, 0); + sp->defaulttype = 0; + } + sp->charcnt = charcnt; + cp = sp->chars; + memcpy(cp, stdname, stdlen); + cp += stdlen; + *cp++ = '\0'; + if (dstlen != 0) { + memcpy(cp, dstname, dstlen); + *(cp + dstlen) = '\0'; + } + return true; +} + +static void +gmtload(struct state *const sp) +{ + if (tzload(gmt, sp, true) != 0) + tzparse(gmt, sp, true); +} + +/* Initialize *SP to a value appropriate for the TZ setting NAME. + Return 0 on success, an errno value on failure. */ +static int +zoneinit(struct state *sp, char const *name) +{ + if (name && ! name[0]) { + /* + ** User wants it fast rather than right. + */ + sp->leapcnt = 0; /* so, we're off a little */ + sp->timecnt = 0; + sp->typecnt = 0; + sp->charcnt = 0; + sp->goback = sp->goahead = false; + init_ttinfo(&sp->ttis[0], 0, false, 0); + strcpy(sp->chars, gmt); + sp->defaulttype = 0; + return 0; + } else { + int err = tzload(name, sp, true); + if (err != 0 && name && name[0] != ':' && tzparse(name, sp, false)) + err = 0; + if (err == 0) + scrub_abbrs(sp); + return err; + } +} + +static void +tzsetlcl(char const *name) +{ + struct state *sp = lclptr; + int lcl = name ? strlen(name) < sizeof lcl_TZname : -1; + if (lcl < 0 + ? lcl_is_set < 0 + : 0 < lcl_is_set && strcmp(lcl_TZname, name) == 0) + return; +#ifdef ALL_STATE + if (! sp) + lclptr = sp = malloc(sizeof *lclptr); +#endif /* defined ALL_STATE */ + if (sp) { + if (zoneinit(sp, name) != 0) + zoneinit(sp, ""); + if (0 < lcl) + strcpy(lcl_TZname, name); + } + settzname(); + lcl_is_set = lcl; +} + +#ifdef STD_INSPIRED +void +tzsetwall(void) +{ + if (lock() != 0) + return; + tzsetlcl(NULL); + unlock(); +} +#endif + +static void +tzset_unlocked(void) +{ + tzsetlcl(getenv("TZ")); +} + +void +tzset(void) +{ + if (lock() != 0) + return; + tzset_unlocked(); + unlock(); +} + +static void +gmtcheck(void) +{ + static bool gmt_is_set; + if (lock() != 0) + return; + if (! gmt_is_set) { +#ifdef ALL_STATE + gmtptr = malloc(sizeof *gmtptr); +#endif + if (gmtptr) + gmtload(gmtptr); + gmt_is_set = true; + } + unlock(); +} + +#if NETBSD_INSPIRED + +timezone_t +tzalloc(char const *name) +{ + timezone_t sp = malloc(sizeof *sp); + if (sp) { + int err = zoneinit(sp, name); + if (err != 0) { + free(sp); + errno = err; + return NULL; + } + } + return sp; +} + +void +tzfree(timezone_t sp) +{ + free(sp); +} + +/* +** NetBSD 6.1.4 has ctime_rz, but omit it because POSIX says ctime and +** ctime_r are obsolescent and have potential security problems that +** ctime_rz would share. Callers can instead use localtime_rz + strftime. +** +** NetBSD 6.1.4 has tzgetname, but omit it because it doesn't work +** in zones with three or more time zone abbreviations. +** Callers can instead use localtime_rz + strftime. +*/ + +#endif + +/* +** The easy way to behave "as if no library function calls" localtime +** is to not call it, so we drop its guts into "localsub", which can be +** freely called. (And no, the PANS doesn't require the above behavior, +** but it *is* desirable.) +** +** If successful and SETNAME is nonzero, +** set the applicable parts of tzname, timezone and altzone; +** however, it's OK to omit this step if the time zone is POSIX-compatible, +** since in that case tzset should have already done this step correctly. +** SETNAME's type is intfast32_t for compatibility with gmtsub, +** but it is actually a boolean and its value should be 0 or 1. +*/ + +/*ARGSUSED*/ +static struct tm * +localsub(struct state const *sp, time_t const *timep, int_fast32_t setname, + struct tm *const tmp) +{ + register const struct ttinfo * ttisp; + register int i; + register struct tm * result; + const time_t t = *timep; + + if (sp == NULL) { + /* Don't bother to set tzname etc.; tzset has already done it. */ + return gmtsub(gmtptr, timep, 0, tmp); + } + if ((sp->goback && t < sp->ats[0]) || + (sp->goahead && t > sp->ats[sp->timecnt - 1])) { + time_t newt = t; + register time_t seconds; + register time_t years; + + if (t < sp->ats[0]) + seconds = sp->ats[0] - t; + else seconds = t - sp->ats[sp->timecnt - 1]; + --seconds; + years = (seconds / SECSPERREPEAT + 1) * YEARSPERREPEAT; + seconds = years * AVGSECSPERYEAR; + if (t < sp->ats[0]) + newt += seconds; + else newt -= seconds; + if (newt < sp->ats[0] || + newt > sp->ats[sp->timecnt - 1]) + return NULL; /* "cannot happen" */ + result = localsub(sp, &newt, setname, tmp); + if (result) { + register int_fast64_t newy; + + newy = result->tm_year; + if (t < sp->ats[0]) + newy -= years; + else newy += years; + if (! (INT_MIN <= newy && newy <= INT_MAX)) + return NULL; + result->tm_year = newy; + } + return result; + } + if (sp->timecnt == 0 || t < sp->ats[0]) { + i = sp->defaulttype; + } else { + register int lo = 1; + register int hi = sp->timecnt; + + while (lo < hi) { + register int mid = (lo + hi) >> 1; + + if (t < sp->ats[mid]) + hi = mid; + else lo = mid + 1; + } + i = (int) sp->types[lo - 1]; + } + ttisp = &sp->ttis[i]; + /* + ** To get (wrong) behavior that's compatible with System V Release 2.0 + ** you'd replace the statement below with + ** t += ttisp->tt_gmtoff; + ** timesub(&t, 0L, sp, tmp); + */ + result = timesub(&t, ttisp->tt_gmtoff, sp, tmp); + if (result) { + result->tm_isdst = ttisp->tt_isdst; +#ifdef TM_ZONE + result->TM_ZONE = (char *) &sp->chars[ttisp->tt_abbrind]; +#endif /* defined TM_ZONE */ + if (setname) + update_tzname_etc(sp, ttisp); + } + return result; +} + +#if NETBSD_INSPIRED + +struct tm * +localtime_rz(struct state *sp, time_t const *timep, struct tm *tmp) +{ + return localsub(sp, timep, 0, tmp); +} + +#endif + +static struct tm * +localtime_tzset(time_t const *timep, struct tm *tmp, bool setname) +{ + int err = lock(); + if (err) { + errno = err; + return NULL; + } + if (setname || !lcl_is_set) + tzset_unlocked(); + tmp = localsub(lclptr, timep, setname, tmp); + unlock(); + return tmp; +} + +struct tm * +localtime(const time_t *timep) +{ + return localtime_tzset(timep, &tm, true); +} + +struct tm * +localtime_r(const time_t *timep, struct tm *tmp) +{ + return localtime_tzset(timep, tmp, false); +} + +/* +** gmtsub is to gmtime as localsub is to localtime. +*/ + +static struct tm * +gmtsub(struct state const *sp, time_t const *timep, int_fast32_t offset, + struct tm *tmp) +{ + register struct tm * result; + + result = timesub(timep, offset, gmtptr, tmp); +#ifdef TM_ZONE + /* + ** Could get fancy here and deliver something such as + ** "UT+xxxx" or "UT-xxxx" if offset is non-zero, + ** but this is no time for a treasure hunt. + */ + tmp->TM_ZONE = ((char *) + (offset ? wildabbr : gmtptr ? gmtptr->chars : gmt)); +#endif /* defined TM_ZONE */ + return result; +} + +/* +* Re-entrant version of gmtime. +*/ + +struct tm * +gmtime_r(const time_t *timep, struct tm *tmp) +{ + gmtcheck(); + return gmtsub(gmtptr, timep, 0, tmp); +} + +struct tm * +gmtime(const time_t *timep) +{ + return gmtime_r(timep, &tm); +} + +#ifdef STD_INSPIRED + +struct tm * +offtime(const time_t *timep, long offset) +{ + gmtcheck(); + return gmtsub(gmtptr, timep, offset, &tm); +} + +#endif /* defined STD_INSPIRED */ + +/* +** Return the number of leap years through the end of the given year +** where, to make the math easy, the answer for year zero is defined as zero. +*/ + +static int ATTRIBUTE_PURE +leaps_thru_end_of(register const int y) +{ + return (y >= 0) ? (y / 4 - y / 100 + y / 400) : + -(leaps_thru_end_of(-(y + 1)) + 1); +} + +static struct tm * +timesub(const time_t *timep, int_fast32_t offset, + const struct state *sp, struct tm *tmp) +{ + register const struct lsinfo * lp; + register time_t tdays; + register int idays; /* unsigned would be so 2003 */ + register int_fast64_t rem; + int y; + register const int * ip; + register int_fast64_t corr; + register bool hit; + register int i; + + corr = 0; + hit = false; + i = (sp == NULL) ? 0 : sp->leapcnt; + while (--i >= 0) { + lp = &sp->lsis[i]; + if (*timep >= lp->ls_trans) { + if (*timep == lp->ls_trans) { + hit = ((i == 0 && lp->ls_corr > 0) || + lp->ls_corr > sp->lsis[i - 1].ls_corr); + if (hit) + while (i > 0 && + sp->lsis[i].ls_trans == + sp->lsis[i - 1].ls_trans + 1 && + sp->lsis[i].ls_corr == + sp->lsis[i - 1].ls_corr + 1) { + ++hit; + --i; + } + } + corr = lp->ls_corr; + break; + } + } + y = EPOCH_YEAR; + tdays = *timep / SECSPERDAY; + rem = *timep % SECSPERDAY; + while (tdays < 0 || tdays >= year_lengths[isleap(y)]) { + int newy; + register time_t tdelta; + register int idelta; + register int leapdays; + + tdelta = tdays / DAYSPERLYEAR; + if (! ((! TYPE_SIGNED(time_t) || INT_MIN <= tdelta) + && tdelta <= INT_MAX)) + goto out_of_range; + idelta = tdelta; + if (idelta == 0) + idelta = (tdays < 0) ? -1 : 1; + newy = y; + if (increment_overflow(&newy, idelta)) + goto out_of_range; + leapdays = leaps_thru_end_of(newy - 1) - + leaps_thru_end_of(y - 1); + tdays -= ((time_t) newy - y) * DAYSPERNYEAR; + tdays -= leapdays; + y = newy; + } + /* + ** Given the range, we can now fearlessly cast... + */ + idays = tdays; + rem += offset - corr; + while (rem < 0) { + rem += SECSPERDAY; + --idays; + } + while (rem >= SECSPERDAY) { + rem -= SECSPERDAY; + ++idays; + } + while (idays < 0) { + if (increment_overflow(&y, -1)) + goto out_of_range; + idays += year_lengths[isleap(y)]; + } + while (idays >= year_lengths[isleap(y)]) { + idays -= year_lengths[isleap(y)]; + if (increment_overflow(&y, 1)) + goto out_of_range; + } + tmp->tm_year = y; + if (increment_overflow(&tmp->tm_year, -TM_YEAR_BASE)) + goto out_of_range; + tmp->tm_yday = idays; + /* + ** The "extra" mods below avoid overflow problems. + */ + tmp->tm_wday = EPOCH_WDAY + + ((y - EPOCH_YEAR) % DAYSPERWEEK) * + (DAYSPERNYEAR % DAYSPERWEEK) + + leaps_thru_end_of(y - 1) - + leaps_thru_end_of(EPOCH_YEAR - 1) + + idays; + tmp->tm_wday %= DAYSPERWEEK; + if (tmp->tm_wday < 0) + tmp->tm_wday += DAYSPERWEEK; + tmp->tm_hour = (int) (rem / SECSPERHOUR); + rem %= SECSPERHOUR; + tmp->tm_min = (int) (rem / SECSPERMIN); + /* + ** A positive leap second requires a special + ** representation. This uses "... ??:59:60" et seq. + */ + tmp->tm_sec = (int) (rem % SECSPERMIN) + hit; + ip = mon_lengths[isleap(y)]; + for (tmp->tm_mon = 0; idays >= ip[tmp->tm_mon]; ++(tmp->tm_mon)) + idays -= ip[tmp->tm_mon]; + tmp->tm_mday = (int) (idays + 1); + tmp->tm_isdst = 0; +#ifdef TM_GMTOFF + tmp->TM_GMTOFF = offset; +#endif /* defined TM_GMTOFF */ + return tmp; + + out_of_range: + errno = EOVERFLOW; + return NULL; +} + +char * +ctime(const time_t *timep) +{ +/* +** Section 4.12.3.2 of X3.159-1989 requires that +** The ctime function converts the calendar time pointed to by timer +** to local time in the form of a string. It is equivalent to +** asctime(localtime(timer)) +*/ + struct tm *tmp = localtime(timep); + return tmp ? asctime(tmp) : NULL; +} + +char * +ctime_r(const time_t *timep, char *buf) +{ + struct tm mytm; + struct tm *tmp = localtime_r(timep, &mytm); + return tmp ? asctime_r(tmp, buf) : NULL; +} + +/* +** Adapted from code provided by Robert Elz, who writes: +** The "best" way to do mktime I think is based on an idea of Bob +** Kridle's (so its said...) from a long time ago. +** It does a binary search of the time_t space. Since time_t's are +** just 32 bits, its a max of 32 iterations (even at 64 bits it +** would still be very reasonable). +*/ + +#ifndef WRONG +#define WRONG (-1) +#endif /* !defined WRONG */ + +/* +** Normalize logic courtesy Paul Eggert. +*/ + +static bool +increment_overflow(int *ip, int j) +{ + register int const i = *ip; + + /* + ** If i >= 0 there can only be overflow if i + j > INT_MAX + ** or if j > INT_MAX - i; given i >= 0, INT_MAX - i cannot overflow. + ** If i < 0 there can only be overflow if i + j < INT_MIN + ** or if j < INT_MIN - i; given i < 0, INT_MIN - i cannot overflow. + */ + if ((i >= 0) ? (j > INT_MAX - i) : (j < INT_MIN - i)) + return true; + *ip += j; + return false; +} + +static bool +increment_overflow32(int_fast32_t *const lp, int const m) +{ + register int_fast32_t const l = *lp; + + if ((l >= 0) ? (m > INT_FAST32_MAX - l) : (m < INT_FAST32_MIN - l)) + return true; + *lp += m; + return false; +} + +static bool +increment_overflow_time(time_t *tp, int_fast32_t j) +{ + /* + ** This is like + ** 'if (! (time_t_min <= *tp + j && *tp + j <= time_t_max)) ...', + ** except that it does the right thing even if *tp + j would overflow. + */ + if (! (j < 0 + ? (TYPE_SIGNED(time_t) ? time_t_min - j <= *tp : -1 - j < *tp) + : *tp <= time_t_max - j)) + return true; + *tp += j; + return false; +} + +static bool +normalize_overflow(int *const tensptr, int *const unitsptr, const int base) +{ + register int tensdelta; + + tensdelta = (*unitsptr >= 0) ? + (*unitsptr / base) : + (-1 - (-1 - *unitsptr) / base); + *unitsptr -= tensdelta * base; + return increment_overflow(tensptr, tensdelta); +} + +static bool +normalize_overflow32(int_fast32_t *tensptr, int *unitsptr, int base) +{ + register int tensdelta; + + tensdelta = (*unitsptr >= 0) ? + (*unitsptr / base) : + (-1 - (-1 - *unitsptr) / base); + *unitsptr -= tensdelta * base; + return increment_overflow32(tensptr, tensdelta); +} + +static int +tmcomp(register const struct tm *const atmp, + register const struct tm *const btmp) +{ + register int result; + + if (atmp->tm_year != btmp->tm_year) + return atmp->tm_year < btmp->tm_year ? -1 : 1; + if ((result = (atmp->tm_mon - btmp->tm_mon)) == 0 && + (result = (atmp->tm_mday - btmp->tm_mday)) == 0 && + (result = (atmp->tm_hour - btmp->tm_hour)) == 0 && + (result = (atmp->tm_min - btmp->tm_min)) == 0) + result = atmp->tm_sec - btmp->tm_sec; + return result; +} + +static time_t +time2sub(struct tm *const tmp, + struct tm *(*funcp)(struct state const *, time_t const *, + int_fast32_t, struct tm *), + struct state const *sp, + const int_fast32_t offset, + bool *okayp, + bool do_norm_secs) +{ + register int dir; + register int i, j; + register int saved_seconds; + register int_fast32_t li; + register time_t lo; + register time_t hi; + int_fast32_t y; + time_t newt; + time_t t; + struct tm yourtm, mytm; + + *okayp = false; + yourtm = *tmp; + if (do_norm_secs) { + if (normalize_overflow(&yourtm.tm_min, &yourtm.tm_sec, + SECSPERMIN)) + return WRONG; + } + if (normalize_overflow(&yourtm.tm_hour, &yourtm.tm_min, MINSPERHOUR)) + return WRONG; + if (normalize_overflow(&yourtm.tm_mday, &yourtm.tm_hour, HOURSPERDAY)) + return WRONG; + y = yourtm.tm_year; + if (normalize_overflow32(&y, &yourtm.tm_mon, MONSPERYEAR)) + return WRONG; + /* + ** Turn y into an actual year number for now. + ** It is converted back to an offset from TM_YEAR_BASE later. + */ + if (increment_overflow32(&y, TM_YEAR_BASE)) + return WRONG; + while (yourtm.tm_mday <= 0) { + if (increment_overflow32(&y, -1)) + return WRONG; + li = y + (1 < yourtm.tm_mon); + yourtm.tm_mday += year_lengths[isleap(li)]; + } + while (yourtm.tm_mday > DAYSPERLYEAR) { + li = y + (1 < yourtm.tm_mon); + yourtm.tm_mday -= year_lengths[isleap(li)]; + if (increment_overflow32(&y, 1)) + return WRONG; + } + for ( ; ; ) { + i = mon_lengths[isleap(y)][yourtm.tm_mon]; + if (yourtm.tm_mday <= i) + break; + yourtm.tm_mday -= i; + if (++yourtm.tm_mon >= MONSPERYEAR) { + yourtm.tm_mon = 0; + if (increment_overflow32(&y, 1)) + return WRONG; + } + } + if (increment_overflow32(&y, -TM_YEAR_BASE)) + return WRONG; + if (! (INT_MIN <= y && y <= INT_MAX)) + return WRONG; + yourtm.tm_year = y; + if (yourtm.tm_sec >= 0 && yourtm.tm_sec < SECSPERMIN) + saved_seconds = 0; + else if (y + TM_YEAR_BASE < EPOCH_YEAR) { + /* + ** We can't set tm_sec to 0, because that might push the + ** time below the minimum representable time. + ** Set tm_sec to 59 instead. + ** This assumes that the minimum representable time is + ** not in the same minute that a leap second was deleted from, + ** which is a safer assumption than using 58 would be. + */ + if (increment_overflow(&yourtm.tm_sec, 1 - SECSPERMIN)) + return WRONG; + saved_seconds = yourtm.tm_sec; + yourtm.tm_sec = SECSPERMIN - 1; + } else { + saved_seconds = yourtm.tm_sec; + yourtm.tm_sec = 0; + } + /* + ** Do a binary search (this works whatever time_t's type is). + */ + lo = time_t_min; + hi = time_t_max; + for ( ; ; ) { + t = lo / 2 + hi / 2; + if (t < lo) + t = lo; + else if (t > hi) + t = hi; + if (! funcp(sp, &t, offset, &mytm)) { + /* + ** Assume that t is too extreme to be represented in + ** a struct tm; arrange things so that it is less + ** extreme on the next pass. + */ + dir = (t > 0) ? 1 : -1; + } else dir = tmcomp(&mytm, &yourtm); + if (dir != 0) { + if (t == lo) { + if (t == time_t_max) + return WRONG; + ++t; + ++lo; + } else if (t == hi) { + if (t == time_t_min) + return WRONG; + --t; + --hi; + } + if (lo > hi) + return WRONG; + if (dir > 0) + hi = t; + else lo = t; + continue; + } +#if defined TM_GMTOFF && ! UNINIT_TRAP + if (mytm.TM_GMTOFF != yourtm.TM_GMTOFF + && (yourtm.TM_GMTOFF < 0 + ? (-SECSPERDAY <= yourtm.TM_GMTOFF + && (mytm.TM_GMTOFF <= + (SMALLEST (INT_FAST32_MAX, LONG_MAX) + + yourtm.TM_GMTOFF))) + : (yourtm.TM_GMTOFF <= SECSPERDAY + && ((BIGGEST (INT_FAST32_MIN, LONG_MIN) + + yourtm.TM_GMTOFF) + <= mytm.TM_GMTOFF)))) { + /* MYTM matches YOURTM except with the wrong UTC offset. + YOURTM.TM_GMTOFF is plausible, so try it instead. + It's OK if YOURTM.TM_GMTOFF contains uninitialized data, + since the guess gets checked. */ + time_t altt = t; + int_fast32_t diff = mytm.TM_GMTOFF - yourtm.TM_GMTOFF; + if (!increment_overflow_time(&altt, diff)) { + struct tm alttm; + if (funcp(sp, &altt, offset, &alttm) + && alttm.tm_isdst == mytm.tm_isdst + && alttm.TM_GMTOFF == yourtm.TM_GMTOFF + && tmcomp(&alttm, &yourtm) == 0) { + t = altt; + mytm = alttm; + } + } + } +#endif + if (yourtm.tm_isdst < 0 || mytm.tm_isdst == yourtm.tm_isdst) + break; + /* + ** Right time, wrong type. + ** Hunt for right time, right type. + ** It's okay to guess wrong since the guess + ** gets checked. + */ + if (sp == NULL) + return WRONG; + for (i = sp->typecnt - 1; i >= 0; --i) { + if (sp->ttis[i].tt_isdst != yourtm.tm_isdst) + continue; + for (j = sp->typecnt - 1; j >= 0; --j) { + if (sp->ttis[j].tt_isdst == yourtm.tm_isdst) + continue; + newt = t + sp->ttis[j].tt_gmtoff - + sp->ttis[i].tt_gmtoff; + if (! funcp(sp, &newt, offset, &mytm)) + continue; + if (tmcomp(&mytm, &yourtm) != 0) + continue; + if (mytm.tm_isdst != yourtm.tm_isdst) + continue; + /* + ** We have a match. + */ + t = newt; + goto label; + } + } + return WRONG; + } +label: + newt = t + saved_seconds; + if ((newt < t) != (saved_seconds < 0)) + return WRONG; + t = newt; + if (funcp(sp, &t, offset, tmp)) + *okayp = true; + return t; +} + +static time_t +time2(struct tm * const tmp, + struct tm *(*funcp)(struct state const *, time_t const *, + int_fast32_t, struct tm *), + struct state const *sp, + const int_fast32_t offset, + bool *okayp) +{ + time_t t; + + /* + ** First try without normalization of seconds + ** (in case tm_sec contains a value associated with a leap second). + ** If that fails, try with normalization of seconds. + */ + t = time2sub(tmp, funcp, sp, offset, okayp, false); + return *okayp ? t : time2sub(tmp, funcp, sp, offset, okayp, true); +} + +static time_t +time1(struct tm *const tmp, + struct tm *(*funcp) (struct state const *, time_t const *, + int_fast32_t, struct tm *), + struct state const *sp, + const int_fast32_t offset) +{ + register time_t t; + register int samei, otheri; + register int sameind, otherind; + register int i; + register int nseen; + char seen[TZ_MAX_TYPES]; + unsigned char types[TZ_MAX_TYPES]; + bool okay; + + if (tmp == NULL) { + errno = EINVAL; + return WRONG; + } + if (tmp->tm_isdst > 1) + tmp->tm_isdst = 1; + t = time2(tmp, funcp, sp, offset, &okay); + if (okay) + return t; + if (tmp->tm_isdst < 0) +#ifdef PCTS + /* + ** POSIX Conformance Test Suite code courtesy Grant Sullivan. + */ + tmp->tm_isdst = 0; /* reset to std and try again */ +#else + return t; +#endif /* !defined PCTS */ + /* + ** We're supposed to assume that somebody took a time of one type + ** and did some math on it that yielded a "struct tm" that's bad. + ** We try to divine the type they started from and adjust to the + ** type they need. + */ + if (sp == NULL) + return WRONG; + for (i = 0; i < sp->typecnt; ++i) + seen[i] = false; + nseen = 0; + for (i = sp->timecnt - 1; i >= 0; --i) + if (!seen[sp->types[i]]) { + seen[sp->types[i]] = true; + types[nseen++] = sp->types[i]; + } + for (sameind = 0; sameind < nseen; ++sameind) { + samei = types[sameind]; + if (sp->ttis[samei].tt_isdst != tmp->tm_isdst) + continue; + for (otherind = 0; otherind < nseen; ++otherind) { + otheri = types[otherind]; + if (sp->ttis[otheri].tt_isdst == tmp->tm_isdst) + continue; + tmp->tm_sec += sp->ttis[otheri].tt_gmtoff - + sp->ttis[samei].tt_gmtoff; + tmp->tm_isdst = !tmp->tm_isdst; + t = time2(tmp, funcp, sp, offset, &okay); + if (okay) + return t; + tmp->tm_sec -= sp->ttis[otheri].tt_gmtoff - + sp->ttis[samei].tt_gmtoff; + tmp->tm_isdst = !tmp->tm_isdst; + } + } + return WRONG; +} + +static time_t +mktime_tzname(struct state *sp, struct tm *tmp, bool setname) +{ + if (sp) + return time1(tmp, localsub, sp, setname); + else { + gmtcheck(); + return time1(tmp, gmtsub, gmtptr, 0); + } +} + +#if NETBSD_INSPIRED + +time_t +mktime_z(struct state *sp, struct tm *tmp) +{ + return mktime_tzname(sp, tmp, false); +} + +#endif + +time_t +mktime(struct tm *tmp) +{ + time_t t; + int err = lock(); + if (err) { + errno = err; + return -1; + } + tzset_unlocked(); + t = mktime_tzname(lclptr, tmp, true); + unlock(); + return t; +} + +#ifdef STD_INSPIRED + +time_t +timelocal(struct tm *tmp) +{ + if (tmp != NULL) + tmp->tm_isdst = -1; /* in case it wasn't initialized */ + return mktime(tmp); +} + +time_t +timegm(struct tm *tmp) +{ + return timeoff(tmp, 0); +} + +time_t +timeoff(struct tm *tmp, long offset) +{ + if (tmp) + tmp->tm_isdst = 0; + gmtcheck(); + return time1(tmp, gmtsub, gmtptr, offset); +} + +#endif /* defined STD_INSPIRED */ + +/* +** XXX--is the below the right way to conditionalize?? +*/ + +#ifdef STD_INSPIRED + +/* +** IEEE Std 1003.1-1988 (POSIX) legislates that 536457599 +** shall correspond to "Wed Dec 31 23:59:59 UTC 1986", which +** is not the case if we are accounting for leap seconds. +** So, we provide the following conversion routines for use +** when exchanging timestamps with POSIX conforming systems. +*/ + +static int_fast64_t +leapcorr(struct state const *sp, time_t t) +{ + register struct lsinfo const * lp; + register int i; + + i = sp->leapcnt; + while (--i >= 0) { + lp = &sp->lsis[i]; + if (t >= lp->ls_trans) + return lp->ls_corr; + } + return 0; +} + +NETBSD_INSPIRED_EXTERN time_t ATTRIBUTE_PURE +time2posix_z(struct state *sp, time_t t) +{ + return t - leapcorr(sp, t); +} + +time_t +time2posix(time_t t) +{ + int err = lock(); + if (err) { + errno = err; + return -1; + } + if (!lcl_is_set) + tzset_unlocked(); + if (lclptr) + t = time2posix_z(lclptr, t); + unlock(); + return t; +} + +NETBSD_INSPIRED_EXTERN time_t ATTRIBUTE_PURE +posix2time_z(struct state *sp, time_t t) +{ + time_t x; + time_t y; + /* + ** For a positive leap second hit, the result + ** is not unique. For a negative leap second + ** hit, the corresponding time doesn't exist, + ** so we return an adjacent second. + */ + x = t + leapcorr(sp, t); + y = x - leapcorr(sp, x); + if (y < t) { + do { + x++; + y = x - leapcorr(sp, x); + } while (y < t); + x -= y != t; + } else if (y > t) { + do { + --x; + y = x - leapcorr(sp, x); + } while (y > t); + x += y != t; + } + return x; +} + +time_t +posix2time(time_t t) +{ + int err = lock(); + if (err) { + errno = err; + return -1; + } + if (!lcl_is_set) + tzset_unlocked(); + if (lclptr) + t = posix2time_z(lclptr, t); + unlock(); + return t; +} + +#endif /* defined STD_INSPIRED */ + +#ifdef time_tz + +/* Convert from the underlying system's time_t to the ersatz time_tz, + which is called 'time_t' in this file. */ + +time_t +time(time_t *p) +{ + time_t r = sys_time(0); + if (p) + *p = r; + return r; +} + +#endif diff --git a/tz/newctime.3 b/tz/newctime.3 new file mode 100644 index 0000000..6667e0d --- /dev/null +++ b/tz/newctime.3 @@ -0,0 +1,306 @@ +.TH NEWCTIME 3 +.SH NAME +asctime, ctime, difftime, gmtime, localtime, mktime \- convert date and time +.SH SYNOPSIS +.nf +.ie \n(.g .ds - \f(CW-\fP +.el ds - \- +.B #include <time.h> +.PP +.B extern char *tzname[2]; +.PP +.B char *ctime(time_t const *clock); +.PP +.B char *ctime_r(time_t const *clock, char *buf); +.PP +.B double difftime(time_t time1, time_t time0); +.PP +.B char *asctime(struct tm const *tm); +.PP +.B "char *asctime_r(struct tm const *restrict tm," +.B " char *restrict result);" +.PP +.B struct tm *localtime(time_t const *clock); +.PP +.B "struct tm *localtime_r(time_t const *restrict clock," +.B " struct tm *restrict result);" +.PP +.B "struct tm *localtime_rz(timezone_t restrict zone," +.B " time_t const *restrict clock," +.B " struct tm *restrict result);" +.PP +.B struct tm *gmtime(time_t const *clock); +.PP +.B "struct tm *gmtime_r(time_t const *restrict clock," +.B " struct tm *restrict result);" +.PP +.B time_t mktime(struct tm *tm); +.PP +.B "time_t mktime_z(timezone_t restrict zone," +.B " struct tm *restrict tm);" +.PP +.B cc ... \*-ltz +.fi +.SH DESCRIPTION +.ie '\(en'' .ds en \- +.el .ds en \(en +.ie '\(lq'' .ds lq \&"\" +.el .ds lq \(lq\" +.ie '\(rq'' .ds rq \&"\" +.el .ds rq \(rq\" +.de q +\\$3\*(lq\\$1\*(rq\\$2 +.. +.I Ctime +converts a long integer, pointed to by +.IR clock , +and returns a pointer to a +string of the form +.br +.ce +.eo +Thu Nov 24 18:22:48 1986\n\0 +.br +.ec +Years requiring fewer than four characters are padded with leading zeroes. +For years longer than four characters, the string is of the form +.br +.ce +.eo +Thu Nov 24 18:22:48 81986\n\0 +.ec +.br +with five spaces before the year. +These unusual formats are designed to make it less likely that older +software that expects exactly 26 bytes of output will mistakenly output +misleading values for out-of-range years. +.PP +The +.BI * clock +time stamp represents the time in seconds since 1970-01-01 00:00:00 +Coordinated Universal Time (UTC). +The POSIX standard says that time stamps must be nonnegative +and must ignore leap seconds. +Many implementations extend POSIX by allowing negative time stamps, +and can therefore represent time stamps that predate the +introduction of UTC and are some other flavor of Universal Time (UT). +Some implementations support leap seconds, in contradiction to POSIX. +.PP +.I Localtime +and +.I gmtime +return pointers to +.q "tm" +structures, described below. +.I Localtime +corrects for the time zone and any time zone adjustments +(such as Daylight Saving Time in the United States). +After filling in the +.q "tm" +structure, +.I localtime +sets the +.BR tm_isdst 'th +element of +.B tzname +to a pointer to a string that's the time zone abbreviation to be used with +.IR localtime 's +return value. +.PP +.I Gmtime +converts to Coordinated Universal Time. +.PP +.I Asctime +converts a time value contained in a +.q "tm" +structure to a string, +as shown in the above example, +and returns a pointer to the string. +.PP +.I Mktime +converts the broken-down time, +expressed as local time, +in the structure pointed to by +.I tm +into a calendar time value with the same encoding as that of the values +returned by the +.I time +function. +The original values of the +.B tm_wday +and +.B tm_yday +components of the structure are ignored, +and the original values of the other components are not restricted +to their normal ranges. +(A positive or zero value for +.B tm_isdst +causes +.I mktime +to presume initially that summer time (for example, Daylight Saving Time +in the U.S.A.) +respectively, +is or is not in effect for the specified time. +A negative value for +.B tm_isdst +causes the +.I mktime +function to attempt to divine whether summer time is in effect +for the specified time; in this case it does not use a consistent +rule and may give a different answer when later +presented with the same argument.) +On successful completion, the values of the +.B tm_wday +and +.B tm_yday +components of the structure are set appropriately, +and the other components are set to represent the specified calendar time, +but with their values forced to their normal ranges; the final value of +.B tm_mday +is not set until +.B tm_mon +and +.B tm_year +are determined. +.I Mktime +returns the specified calendar time; +If the calendar time cannot be represented, +it returns \-1. +.PP +.I Difftime +returns the difference between two calendar times, +.RI ( time1 +\- +.IR time0 ), +expressed in seconds. +.PP +.IR Ctime_r , +.IR localtime_r , +.IR gmtime_r , +and +.I asctime_r +are like their unsuffixed counterparts, except that they accept an +additional argument specifying where to store the result if successful. +.PP +.IR Localtime_rz +and +.I mktime_z +are like their unsuffixed counterparts, except that they accept an +extra initial +.B zone +argument specifying the time zone to be used for conversion. +If +.B zone +is null, UTC is used; otherwise, +.B zone +should be have been allocated by +.I tzalloc +and should not be freed until after all uses (e.g., by calls to +.IR strftime ) +of the filled-in +.B tm_zone +fields. +.PP +Declarations of all the functions and externals, and the +.q "tm" +structure, +are in the +.B <time.h> +header file. +The structure (of type) +.B struct tm +includes the following fields: +.RS +.PP +.nf +.ta .5i +\w'long tm_gmtoff;\0\0'u + int tm_sec; /\(** seconds (0\*(en60) \(**/ + int tm_min; /\(** minutes (0\*(en59) \(**/ + int tm_hour; /\(** hours (0\*(en23) \(**/ + int tm_mday; /\(** day of month (1\*(en31) \(**/ + int tm_mon; /\(** month of year (0\*(en11) \(**/ + int tm_year; /\(** year \- 1900 \(**/ + int tm_wday; /\(** day of week (Sunday = 0) \(**/ + int tm_yday; /\(** day of year (0\*(en365) \(**/ + int tm_isdst; /\(** is summer time in effect? \(**/ + char \(**tm_zone; /\(** abbreviation of time zone name \(**/ + long tm_gmtoff; /\(** offset from UT in seconds \(**/ +.fi +.RE +.PP +The +.I tm_zone +and +.I tm_gmtoff +fields exist, and are filled in, only if arrangements to do +so were made when the library containing these functions was +created. +There is no guarantee that these fields will continue to exist +in this form in future releases of this code. +.PP +.I Tm_isdst +is non-zero if summer time is in effect. +.PP +.I Tm_gmtoff +is the offset (in seconds) of the time represented +from UT, with positive values indicating east +of the Prime Meridian. +The field's name is derived from Greenwich Mean Time, a precursor of UT. +.SH FILES +.ta \w'/usr/local/etc/zoneinfo/posixrules\0\0'u +/usr/local/etc/zoneinfo time zone information directory +.br +/usr/local/etc/zoneinfo/localtime local time zone file +.br +/usr/local/etc/zoneinfo/posixrules used with POSIX-style TZ's +.br +/usr/local/etc/zoneinfo/GMT for UTC leap seconds +.sp +If +.B /usr/local/etc/zoneinfo/GMT +is absent, +UTC leap seconds are loaded from +.BR /usr/local/etc/zoneinfo/posixrules . +.SH SEE ALSO +getenv(3), +newstrftime(3), +newtzset(3), +time(2), +tzfile(5) +.SH NOTES +The return values of +.IR asctime , +.IR ctime , +.IR gmtime , +and +.I localtime +point to static data +overwritten by each call. +The +.B tm_zone +field of a returned +.B "struct tm" +points to a static array of characters, which +can be overwritten by later calls to +.IR tzset . +The remaining functions and data are thread-safe. +.PP +.IR Asctime , +.IR asctime_r , +.IR ctime , +and +.I ctime_r +behave strangely for years before 1000 or after 9999. +The 1989 and 1999 editions of the C Standard say +that years from \-99 through 999 are converted without +extra spaces, but this conflicts with longstanding +tradition and with this implementation. +The 2011 edition says that the behavior +is undefined if the year is before 1000 or after 9999. +Traditional implementations of these two functions are +restricted to years in the range 1900 through 2099. +To avoid this portability mess, new programs should use +.I strftime +instead. +.\" This file is in the public domain, so clarified as of +.\" 2009-05-17 by Arthur David Olson. diff --git a/tz/newstrftime.3 b/tz/newstrftime.3 new file mode 100644 index 0000000..9a60ee3 --- /dev/null +++ b/tz/newstrftime.3 @@ -0,0 +1,226 @@ +.\" Based on the UCB file whose copyright information appears below. +.\" Copyright (c) 1989, 1991 The Regents of the University of California. +.\" All rights reserved. +.\" +.\" This code is derived from software contributed to Berkeley by +.\" the American National Standards Committee X3, on Information +.\" Processing Systems. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" 3. Neither the name of the University nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS" AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" from: @(#)strftime.3 5.12 (Berkeley) 6/29/91 +.\" $Id: strftime.3,v 1.4 1993/12/15 20:33:00 jtc Exp $ +.\" +.TH NEWSTRFTIME 3 +.SH NAME +strftime \- format date and time +.SH SYNOPSIS +.nf +.ie \n(.g .ds - \f(CW-\fP +.el ds - \- +.B #include <time.h> +.PP +.B "size_t strftime(char *restrict buf, size_t maxsize," +.B " char const *restrict format, struct tm const *restrict timeptr);" +.PP +.B cc ... \-ltz +.fi +.SH DESCRIPTION +.ie '\(en'' .ds en \- +.el .ds en \(en +The +.I strftime +function formats the information from +.I timeptr +into the buffer +.I buf +according to the string pointed to by +.IR format . +.PP +The +.I format +string consists of zero or more conversion specifications and +ordinary characters. +All ordinary characters are copied directly into the buffer. +A conversion specification consists of a percent sign +.Ql % +and one other character. +.PP +No more than +.I maxsize +characters are placed into the array. +If the total number of resulting characters, including the terminating +null character, is not more than +.IR maxsize , +.I strftime +returns the number of characters in the array, not counting the +terminating null. +Otherwise, zero is returned. +.PP +Each conversion specification is replaced by the characters as +follows which are then copied into the buffer. +.TP +%A +is replaced by the locale's full weekday name. +.TP +%a +is replaced by the locale's abbreviated weekday name. +.TP +%B +is replaced by the locale's full month name. +.TP +%b or %h +is replaced by the locale's abbreviated month name. +.TP +%C +is replaced by the century (a year divided by 100 and truncated to an integer) +as a decimal number (00\*(en99). +.TP +%c +is replaced by the locale's appropriate date and time representation. +.TP +%D +is replaced by the date in the format %m/%d/%y. +.TP +%d +is replaced by the day of the month as a decimal number (01\*(en31). +.TP +%e +is replaced by the day of month as a decimal number (1\*(en31); +single digits are preceded by a blank. +.TP +%F +is replaced by the date in the format %Y\*-%m\*-%d. +.TP +%G +is replaced by the ISO 8601 year with century as a decimal number. +.TP +%g +is replaced by the ISO 8601 year without century as a decimal number (00\*(en99). +.TP +%H +is replaced by the hour (24-hour clock) as a decimal number (00\*(en23). +.TP +%I +is replaced by the hour (12-hour clock) as a decimal number (01\*(en12). +.TP +%j +is replaced by the day of the year as a decimal number (001\*(en366). +.TP +%k +is replaced by the hour (24-hour clock) as a decimal number (0\*(en23); +single digits are preceded by a blank. +.TP +%l +is replaced by the hour (12-hour clock) as a decimal number (1\*(en12); +single digits are preceded by a blank. +.TP +%M +is replaced by the minute as a decimal number (00\*(en59). +.TP +%m +is replaced by the month as a decimal number (01\*(en12). +.TP +%n +is replaced by a newline. +.TP +%p +is replaced by the locale's equivalent of either AM or PM. +.TP +%R +is replaced by the time in the format %H:%M. +.TP +%r +is replaced by the locale's representation of 12-hour clock time +using AM/PM notation. +.TP +%S +is replaced by the second as a decimal number (00\*(en60). +.TP +%s +is replaced by the number of seconds since the Epoch (see newctime(3)). +.TP +%T +is replaced by the time in the format %H:%M:%S. +.TP +%t +is replaced by a tab. +.TP +%U +is replaced by the week number of the year (Sunday as the first day of +the week) as a decimal number (00\*(en53). +.TP +%u +is replaced by the weekday (Monday as the first day of the week) +as a decimal number (1\*(en7). +.TP +%V +is replaced by the week number of the year (Monday as the first day of +the week) as a decimal number (01\*(en53). If the week containing January +1 has four or more days in the new year, then it is week 1; otherwise +it is week 53 of the previous year, and the next week is week 1. +.TP +%W +is replaced by the week number of the year (Monday as the first day of +the week) as a decimal number (00\*(en53). +.TP +%w +is replaced by the weekday (Sunday as the first day of the week) +as a decimal number (0\*(en6). +.TP +%X +is replaced by the locale's appropriate time representation. +.TP +%x +is replaced by the locale's appropriate date representation. +.TP +%Y +is replaced by the year with century as a decimal number. +.TP +%y +is replaced by the year without century as a decimal number (00\*(en99). +.TP +%Z +is replaced by the time zone name, +or by the empty string if this is not determinable. +.TP +%z +is replaced by the offset from the Prime Meridian +in the format +HHMM or \*-HHMM as appropriate, +with positive values representing locations east of Greenwich, +or by the empty string if this is not determinable. +.TP +%% +is replaced by a single %. +.TP +%+ +is replaced by the date and time in date(1) format. +.SH SEE ALSO +date(1), +getenv(3), +newctime(3), +newtzset(3), +time(2), +tzfile(5) diff --git a/tz/newtzset.3 b/tz/newtzset.3 new file mode 100644 index 0000000..62277f7 --- /dev/null +++ b/tz/newtzset.3 @@ -0,0 +1,326 @@ +.TH NEWTZSET 3 +.SH NAME +tzset \- initialize time conversion information +.SH SYNOPSIS +.nf +.ie \n(.g .ds - \f(CW-\fP +.el ds - \- +.B #include <time.h> +.PP +.B timezone_t tzalloc(char const *TZ); +.PP +.B void tzfree(timezone_t tz); +.PP +.B void tzset(void); +.PP +.B cc ... \*-ltz +.fi +.SH DESCRIPTION +.ie '\(en'' .ds en \- +.el .ds en \(en +.ie '\(lq'' .ds lq \&"\" +.el .ds lq \(lq\" +.ie '\(rq'' .ds rq \&"\" +.el .ds rq \(rq\" +.de q +\\$3\*(lq\\$1\*(rq\\$2 +.. +.I Tzalloc +allocates and returns a time zone object described by +.BR TZ . +If +.B TZ +is not a valid time zone description, or if the object cannot be allocated, +.I tzalloc +returns a null pointer and sets +.BR errno . +.PP +.I Tzfree +frees a time zone object +.BR tz , +which should have been successfully allocated by +.IR tzalloc . +This invalidates any +.B tm_zone +pointers that +.B tz +was used to set. +.PP +.I Tzset +acts like +.BR tzalloc(getenv("TZ")) , +except it saves any resulting time zone object into internal +storage that is accessed by +.IR localtime , +.IR localtime_r , +and +.IR mktime . +The anonymous shared time zone object is freed by the next call to +.IR tzset . +If the implied call to +.B tzalloc +fails, +.I tzset +falls back on UTC. +.PP +If +.B TZ +is null, the best available approximation to local wall +clock time, as specified by the +.IR tzfile (5)-format +file +.B localtime +in the system time conversion information directory, is used. +If +.B TZ +is the empty string, +Universal Time (UT) is used, with the abbreviation "UTC" +and without leap second correction; please see +.IR newctime (3) +for more about UT, UTC, and leap seconds. If +.B TZ +is nonnull and nonempty: +.IP +if the value begins with a colon, it is used as a pathname of a file +from which to read the time conversion information; +.IP +if the value does not begin with a colon, it is first used as the +pathname of a file from which to read the time conversion information, +and, if that file cannot be read, is used directly as a specification of +the time conversion information. +.PP +When +.B TZ +is used as a pathname, if it begins with a slash, +it is used as an absolute pathname; otherwise, +it is used as a pathname relative to a system time conversion information +directory. +The file must be in the format specified in +.IR tzfile (5). +.PP +When +.B TZ +is used directly as a specification of the time conversion information, +it must have the following syntax (spaces inserted for clarity): +.IP +\fIstd\|offset\fR[\fIdst\fR[\fIoffset\fR][\fB,\fIrule\fR]] +.PP +Where: +.RS +.TP 15 +.IR std " and " dst +Three or more bytes that are the designation for the standard +.RI ( std ) +or summer +.RI ( dst ) +time zone. Only +.I std +is required; if +.I dst +is missing, then summer time does not apply in this locale. +Upper- and lowercase letters are explicitly allowed. Any characters +except a leading colon +.RB ( : ), +digits, comma +.RB ( , ), +ASCII minus +.RB ( \*- ), +ASCII plus +.RB ( + ), +and NUL bytes are allowed. +.TP +.I offset +Indicates the value one must add to the local time to arrive at +Coordinated Universal Time. The +.I offset +has the form: +.RS +.IP +\fIhh\fR[\fB:\fImm\fR[\fB:\fIss\fR]] +.RE +.IP +The minutes +.RI ( mm ) +and seconds +.RI ( ss ) +are optional. The hour +.RI ( hh ) +is required and may be a single digit. The +.I offset +following +.I std +is required. If no +.I offset +follows +.IR dst , +summer time is assumed to be one hour ahead of standard time. One or +more digits may be used; the value is always interpreted as a decimal +number. The hour must be between zero and 24, and the minutes (and +seconds) \*(en if present \*(en between zero and 59. If preceded by a +.q "\*-" , +the time zone shall be east of the Prime Meridian; otherwise it shall be +west (which may be indicated by an optional preceding +.q "+" . +.TP +.I rule +Indicates when to change to and back from summer time. The +.I rule +has the form: +.RS +.IP +\fIdate\fB/\fItime\fB,\fIdate\fB/\fItime\fR +.RE +.IP +where the first +.I date +describes when the change from standard to summer time occurs and the +second +.I date +describes when the change back happens. Each +.I time +field describes when, in current local time, the change to the other +time is made. +As an extension to POSIX, daylight saving is assumed to be in effect +all year if it begins January 1 at 00:00 and ends December 31 at +24:00 plus the difference between daylight saving and standard time, +leaving no room for standard time in the calendar. +.IP +The format of +.I date +is one of the following: +.RS +.TP 10 +.BI J n +The Julian day +.I n +.RI "(1\ \(<=" "\ n\ " "\(<=\ 365). +Leap days are not counted; that is, in all years \*(en including leap +years \*(en February 28 is day 59 and March 1 is day 60. It is +impossible to explicitly refer to the occasional February 29. +.TP +.I n +The zero-based Julian day +.RI "(0\ \(<=" "\ n\ " "\(<=\ 365). +Leap days are counted, and it is possible to refer to February 29. +.TP +.BI M m . n . d +The +.IR d' th +day +.RI "(0\ \(<=" "\ d\ " "\(<=\ 6) +of week +.I n +of month +.I m +of the year +.RI "(1\ \(<=" "\ n\ " "\(<=\ 5, +.RI "1\ \(<=" "\ m\ " "\(<=\ 12, +where week 5 means +.q "the last \fId\fP day in month \fIm\fP" +which may occur in either the fourth or the fifth week). Week 1 is the +first week in which the +.IR d' th +day occurs. Day zero is Sunday. +.RE +.IP "" 15 +The +.I time +has the same format as +.I offset +except that POSIX does not allow a leading sign (\c +.q "\*-" +or +.q "+" ). +As an extension to POSIX, the hours part of +.I time +can range from \-167 through 167; this allows for unusual rules such +as +.q "the Saturday before the first Sunday of March" . +The default, if +.I time +is not given, is +.BR 02:00:00 . +.RE +.LP +Here are some examples of +.B TZ +values that directly specify the time zone rules; they use some of the +extensions to POSIX. +.TP +.B EST5 +stands for US Eastern Standard +Time (EST), 5 hours behind UTC, without daylight saving. +.TP +.B FJT\*-12FJST,M11.1.0,M1.3.4/75 +stands for Fiji Time (FJT) and Fiji Summer Time (FJST), 12 hours ahead +of UTC, springing forward on November's first Sunday at 02:00, and +falling back on January's third Thursday at 75:00 (i.e., 03:00 on the +first Sunday on or after January 18). +.TP +.B IST\*-2IDT,M3.4.4/26,M10.5.0 +stands for Israel Standard Time (IST) and Israel Daylight Time (IDT), +2 hours ahead of UTC, springing forward on March's fourth +Thursday at 26:00 (i.e., 02:00 on the first Friday on or after March +23), and falling back on October's last Sunday at 02:00. +.TP +.B WART4WARST,J1/0,J365/25 +stands for Western Argentina Summer Time (WARST), 3 hours behind UTC. +There is a dummy fall-back transition on December 31 at 25:00 daylight +saving time (i.e., 24:00 standard time, equivalent to January 1 at +00:00 standard time), and a simultaneous spring-forward transition on +January 1 at 00:00 standard time, so daylight saving time is in effect +all year and the initial +.B WART +is a placeholder. +.TP +.B WGT3WGST,M3.5.0/\*-2,M10.5.0/\*-1 +stands for Western Greenland Time (WGT) and Western Greenland Summer +Time (WGST), 3 hours behind UTC, where clocks follow the EU rules of +springing forward on March's last Sunday at 01:00 UTC (\-02:00 local +time) and falling back on October's last Sunday at 01:00 UTC +(\-01:00 local time). +.PP +If no +.I rule +is present in +.BR TZ , +the rules specified +by the +.IR tzfile (5)-format +file +.B posixrules +in the system time conversion information directory are used, with the +standard and summer time offsets from UTC replaced by those specified by +the +.I offset +values in +.BR TZ . +.PP +For compatibility with System V Release 3.1, a semicolon +.RB ( ; ) +may be used to separate the +.I rule +from the rest of the specification. +.SH FILES +.ta \w'/usr/local/etc/zoneinfo/posixrules\0\0'u +/usr/local/etc/zoneinfo time zone information directory +.br +/usr/local/etc/zoneinfo/localtime local time zone file +.br +/usr/local/etc/zoneinfo/posixrules used with POSIX-style TZ's +.br +/usr/local/etc/zoneinfo/GMT for UTC leap seconds +.sp +If +.B /usr/local/etc/zoneinfo/GMT +is absent, +UTC leap seconds are loaded from +.BR /usr/local/etc/zoneinfo/posixrules . +.SH SEE ALSO +getenv(3), +newctime(3), +newstrftime(3), +time(2), +tzfile(5) +.\" This file is in the public domain, so clarified as of +.\" 2009-05-17 by Arthur David Olson. diff --git a/tz/northamerica b/tz/northamerica new file mode 100644 index 0000000..6256f97 --- /dev/null +++ b/tz/northamerica @@ -0,0 +1,3306 @@ +# This file is in the public domain, so clarified as of +# 2009-05-17 by Arthur David Olson. + +# also includes Central America and the Caribbean + +# This file is by no means authoritative; if you think you know better, +# go ahead and edit the file (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 (1999-03-22): +# A reliable and entertaining source about time zones is +# Derek Howse, Greenwich time and longitude, Philip Wilson Publishers (1997). + +############################################################################### + +# United States + +# From Paul Eggert (1999-03-31): +# Howse writes (pp 121-125) that time zones were invented by +# Professor Charles Ferdinand Dowd (1825-1904), +# Principal of Temple Grove Ladies' Seminary (Saratoga Springs, NY). +# His pamphlet "A System of National Time for Railroads" (1870) +# was the result of his proposals at the Convention of Railroad Trunk Lines +# in New York City (1869-10). His 1870 proposal was based on Washington, DC, +# but in 1872-05 he moved the proposed origin to Greenwich. +# His proposal was adopted by the railroads on 1883-11-18 at 12:00, +# and the most of the country soon followed suit. + +# From Paul Eggert (2005-04-16): +# That 1883 transition occurred at 12:00 new time, not at 12:00 old time. +# See p 46 of David Prerau, Seize the daylight, Thunder's Mouth Press (2005). + +# From Paul Eggert (2006-03-22): +# A good source for time zone historical data in the US is +# Thomas G. Shanks, The American Atlas (5th edition), +# San Diego: ACS Publications, Inc. (1991). +# Make sure you have the errata sheet; the book is somewhat useless without it. +# It is the source for most of the pre-1991 US entries below. + +# From Paul Eggert (2001-03-06): +# Daylight Saving Time was first suggested as a joke by Benjamin Franklin +# in his whimsical essay "An Economical Project for Diminishing the Cost +# of Light" published in the Journal de Paris (1784-04-26). +# Not everyone is happy with the results: +# +# I don't really care how time is reckoned so long as there is some +# agreement about it, but I object to being told that I am saving +# daylight when my reason tells me that I am doing nothing of the kind. +# I even object to the implication that I am wasting something +# valuable if I stay in bed after the sun has risen. As an admirer +# of moonlight I resent the bossy insistence of those who want to +# reduce my time for enjoying it. At the back of the Daylight Saving +# scheme I detect the bony, blue-fingered hand of Puritanism, eager +# to push people into bed earlier, and get them up earlier, to make +# them healthy, wealthy and wise in spite of themselves. +# +# -- Robertson Davies, The diary of Samuel Marchbanks, +# Clarke, Irwin (1947), XIX, Sunday +# +# For more about the first ten years of DST in the United States, see +# Robert Garland, Ten years of daylight saving from the Pittsburgh standpoint +# (Carnegie Library of Pittsburgh, 1927). +# http://www.clpgh.org/exhibit/dst.html +# +# Shanks says that DST was called "War Time" in the US in 1918 and 1919. +# However, DST was imposed by the Standard Time Act of 1918, which +# was the first nationwide legal time standard, and apparently +# time was just called "Standard Time" or "Daylight Saving Time". + +# From Arthur David Olson: +# US Daylight Saving Time ended on the last Sunday of *October* in 1974. +# See, for example, the front page of the Saturday, 1974-10-26 +# and Sunday, 1974-10-27 editions of the Washington Post. + +# From Arthur David Olson: +# Before the Uniform Time Act of 1966 took effect in 1967, observance of +# Daylight Saving Time in the US was by local option, except during wartime. + +# From Arthur David Olson (2000-09-25): +# Last night I heard part of a rebroadcast of a 1945 Arch Oboler radio drama. +# In the introduction, Oboler spoke of "Eastern Peace Time." +# An AltaVista search turned up: +# http://rowayton.org/rhs/hstaug45.html +# "When the time is announced over the radio now, it is 'Eastern Peace +# Time' instead of the old familiar 'Eastern War Time.' Peace is wonderful." +# (August 1945) by way of confirmation. + +# From Joseph Gallant citing +# George H. Douglas, _The Early Days of Radio Broadcasting_ (1987): +# At 7 P.M. (Eastern War Time) [on 1945-08-14], the networks were set +# to switch to London for Attlee's address, but the American people +# never got to hear his speech live. According to one press account, +# CBS' Bob Trout was first to announce the word of Japan's surrender, +# but a few seconds later, NBC, ABC and Mutual also flashed the word +# of surrender, all of whom interrupting the bells of Big Ben in +# London which were to precede Mr. Attlee's speech. + +# From Paul Eggert (2003-02-09): It was Robert St John, not Bob Trout. From +# Myrna Oliver's obituary of St John on page B16 of today's Los Angeles Times: +# +# ... a war-weary U.S. clung to radios, awaiting word of Japan's surrender. +# Any announcement from Asia would reach St. John's New York newsroom on a +# wire service teletype machine, which had prescribed signals for major news. +# Associated Press, for example, would ring five bells before spewing out +# typed copy of an important story, and 10 bells for news "of transcendental +# importance." +# +# On Aug. 14, stalling while talking steadily into the NBC networks' open +# microphone, St. John heard five bells and waited only to hear a sixth bell, +# before announcing confidently: "Ladies and gentlemen, World War II is over. +# The Japanese have agreed to our surrender terms." +# +# He had scored a 20-second scoop on other broadcasters. + +# From Arthur David Olson (2005-08-22): +# Paul has been careful to use the "US" rules only in those locations +# that are part of the United States; this reflects the real scope of +# U.S. government action. So even though the "US" rules have changed +# in the latest release, other countries won't be affected. + +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule US 1918 1919 - Mar lastSun 2:00 1:00 D +Rule US 1918 1919 - Oct lastSun 2:00 0 S +Rule US 1942 only - Feb 9 2:00 1:00 W # War +Rule US 1945 only - Aug 14 23:00u 1:00 P # Peace +Rule US 1945 only - Sep lastSun 2:00 0 S +Rule US 1967 2006 - Oct lastSun 2:00 0 S +Rule US 1967 1973 - Apr lastSun 2:00 1:00 D +Rule US 1974 only - Jan 6 2:00 1:00 D +Rule US 1975 only - Feb 23 2:00 1:00 D +Rule US 1976 1986 - Apr lastSun 2:00 1:00 D +Rule US 1987 2006 - Apr Sun>=1 2:00 1:00 D +Rule US 2007 max - Mar Sun>=8 2:00 1:00 D +Rule US 2007 max - Nov Sun>=1 2:00 0 S + +# From Arthur David Olson, 2005-12-19 +# We generate the files specified below to guard against old files with +# obsolete information being left in the time zone binary directory. +# We limit the list to names that have appeared in previous versions of +# this time zone package. +# We do these as separate Zones rather than as Links to avoid problems if +# a particular place changes whether it observes DST. +# We put these specifications here in the northamerica file both to +# increase the chances that they'll actually get compiled and to +# avoid the need to duplicate the US rules in another file. + +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone EST -5:00 - EST +Zone MST -7:00 - MST +Zone HST -10:00 - HST +Zone EST5EDT -5:00 US E%sT +Zone CST6CDT -6:00 US C%sT +Zone MST7MDT -7:00 US M%sT +Zone PST8PDT -8:00 US P%sT + +# From Bob Devine (1988-01-28): +# ...Alaska (and Hawaii) had the timezone names changed in 1967. +# old new +# Pacific Standard Time(PST) -same- +# Yukon Standard Time(YST) -same- +# Central Alaska S.T. (CAT) Alaska-Hawaii St[an]dard Time (AHST) +# Nome Standard Time (NT) Bering Standard Time (BST) +# +# ...Alaska's timezone lines were redrawn in 1983 to give only 2 tz. +# The YST zone now covers nearly all of the state, AHST just part +# of the Aleutian islands. No DST. + +# From Paul Eggert (1995-12-19): +# The tables below use 'NST', not 'NT', for Nome Standard Time. +# I invented 'CAWT' for Central Alaska War Time. + +# From U. S. Naval Observatory (1989-01-19): +# USA EASTERN 5 H BEHIND UTC NEW YORK, WASHINGTON +# USA EASTERN 4 H BEHIND UTC APR 3 - OCT 30 +# USA CENTRAL 6 H BEHIND UTC CHICAGO, HOUSTON +# USA CENTRAL 5 H BEHIND UTC APR 3 - OCT 30 +# USA MOUNTAIN 7 H BEHIND UTC DENVER +# USA MOUNTAIN 6 H BEHIND UTC APR 3 - OCT 30 +# USA PACIFIC 8 H BEHIND UTC L.A., SAN FRANCISCO +# USA PACIFIC 7 H BEHIND UTC APR 3 - OCT 30 +# USA ALASKA STD 9 H BEHIND UTC MOST OF ALASKA (AKST) +# USA ALASKA STD 8 H BEHIND UTC APR 3 - OCT 30 (AKDT) +# USA ALEUTIAN 10 H BEHIND UTC ISLANDS WEST OF 170W +# USA " 9 H BEHIND UTC APR 3 - OCT 30 +# USA HAWAII 10 H BEHIND UTC +# USA BERING 11 H BEHIND UTC SAMOA, MIDWAY + +# From Arthur David Olson (1989-01-21): +# The above dates are for 1988. +# Note the "AKST" and "AKDT" abbreviations, the claim that there's +# no DST in Samoa, and the claim that there is DST in Alaska and the +# Aleutians. + +# From Arthur David Olson (1988-02-13): +# Legal standard time zone names, from United States Code (1982 Edition and +# Supplement III), Title 15, Chapter 6, Section 260 and forward. First, names +# up to 1967-04-01 (when most provisions of the Uniform Time Act of 1966 +# took effect), as explained in sections 263 and 261: +# (none) +# United States standard eastern time +# United States standard mountain time +# United States standard central time +# United States standard Pacific time +# (none) +# United States standard Alaska time +# (none) +# Next, names from 1967-04-01 until 1983-11-30 (the date for +# public law 98-181): +# Atlantic standard time +# eastern standard time +# central standard time +# mountain standard time +# Pacific standard time +# Yukon standard time +# Alaska-Hawaii standard time +# Bering standard time +# And after 1983-11-30: +# Atlantic standard time +# eastern standard time +# central standard time +# mountain standard time +# Pacific standard time +# Alaska standard time +# Hawaii-Aleutian standard time +# Samoa standard time +# The law doesn't give abbreviations. +# +# From Paul Eggert (2000-01-08), following a heads-up from Rives McDow: +# Public law 106-564 (2000-12-23) introduced ... "Chamorro Standard Time" +# for time in Guam and the Northern Marianas. See the file "australasia". +# +# From Paul Eggert (2015-04-17): +# HST and HDT are standardized abbreviations for Hawaii-Aleutian +# standard and daylight times. See section 9.47 (p 234) of the +# U.S. Government Printing Office Style Manual (2008) +# http://www.gpo.gov/fdsys/pkg/GPO-STYLEMANUAL-2008/pdf/GPO-STYLEMANUAL-2008.pdf + +# From Arthur David Olson, 2005-08-09 +# The following was signed into law on 2005-08-08. +# +# H.R. 6, Energy Policy Act of 2005, SEC. 110. DAYLIGHT SAVINGS. +# (a) Amendment.--Section 3(a) of the Uniform Time Act of 1966 (15 +# U.S.C. 260a(a)) is amended-- +# (1) by striking "first Sunday of April" and inserting "second +# Sunday of March"; and +# (2) by striking "last Sunday of October" and inserting "first +# Sunday of November'. +# (b) Effective Date.--Subsection (a) shall take effect 1 year after the +# date of enactment of this Act or March 1, 2007, whichever is later. +# (c) Report to Congress.--Not later than 9 months after the effective +# date stated in subsection (b), the Secretary shall report to Congress +# on the impact of this section on energy consumption in the United +# States. +# (d) Right to Revert.--Congress retains the right to revert the +# Daylight Saving Time back to the 2005 time schedules once the +# Department study is complete. + +# US eastern time, represented by New York + +# Connecticut, Delaware, District of Columbia, most of Florida, +# Georgia, southeast Indiana (Dearborn and Ohio counties), eastern Kentucky +# (except America/Kentucky/Louisville below), Maine, Maryland, Massachusetts, +# New Hampshire, New Jersey, New York, North Carolina, Ohio, +# Pennsylvania, Rhode Island, South Carolina, eastern Tennessee, +# Vermont, Virginia, West Virginia + +# From Dave Cantor (2004-11-02): +# Early this summer I had the occasion to visit the Mount Washington +# Observatory weather station atop (of course!) Mount Washington [, NH].... +# One of the staff members said that the station was on Eastern Standard Time +# and didn't change their clocks for Daylight Saving ... so that their +# reports will always have times which are 5 hours behind UTC. + +# From Paul Eggert (2005-08-26): +# According to today's Huntsville Times +# http://www.al.com/news/huntsvilletimes/index.ssf?/base/news/1125047783228320.xml&coll=1 +# a few towns on Alabama's "eastern border with Georgia, such as Phenix City +# in Russell County, Lanett in Chambers County and some towns in Lee County, +# set their watches and clocks on Eastern time." It quotes H.H. "Bubba" +# Roberts, city administrator in Phenix City. as saying "We are in the Central +# time zone, but we do go by the Eastern time zone because so many people work +# in Columbus." + +# From Paul Eggert (2014-09-06): +# Monthly Notices of the Royal Astronomical Society 44, 4 (1884-02-08), 208 +# says that New York City Hall time was 3 minutes 58.4 seconds fast of +# Eastern time (i.e., -4:56:01.6) just before the 1883 switch. Round to the +# nearest second. + +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER +Rule NYC 1920 only - Mar lastSun 2:00 1:00 D +Rule NYC 1920 only - Oct lastSun 2:00 0 S +Rule NYC 1921 1966 - Apr lastSun 2:00 1:00 D +Rule NYC 1921 1954 - Sep lastSun 2:00 0 S +Rule NYC 1955 1966 - Oct lastSun 2:00 0 S +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone America/New_York -4:56:02 - LMT 1883 Nov 18 12:03:58 + -5:00 US E%sT 1920 + -5:00 NYC E%sT 1942 + -5:00 US E%sT 1946 + -5:00 NYC E%sT 1967 + -5:00 US E%sT + +# US central time, represented by Chicago + +# Alabama, Arkansas, Florida panhandle (Bay, Calhoun, Escambia, +# Gulf, Holmes, Jackson, Okaloosa, Santa Rosa, Walton, and +# Washington counties), Illinois, western Indiana +# (Gibson, Jasper, Lake, LaPorte, Newton, Porter, Posey, Spencer, +# Vanderburgh, and Warrick counties), Iowa, most of Kansas, western +# Kentucky, Louisiana, Minnesota, Mississippi, Missouri, eastern +# Nebraska, eastern North Dakota, Oklahoma, eastern South Dakota, +# western Tennessee, most of Texas, Wisconsin + +# From Larry M. Smith (2006-04-26) re Wisconsin: +# http://www.legis.state.wi.us/statutes/Stat0175.pdf ... +# is currently enforced at the 01:00 time of change. Because the local +# "bar time" in the state corresponds to 02:00, a number of citations +# are issued for the "sale of class 'B' alcohol after prohibited +# hours" within the deviated hour of this change every year.... +# +# From Douglas R. Bomberg (2007-03-12): +# Wisconsin has enacted (nearly eleventh-hour) legislation to get WI +# Statue 175 closer in synch with the US Congress' intent.... +# http://www.legis.state.wi.us/2007/data/acts/07Act3.pdf + +# From an email administrator of the City of Fort Pierre, SD (2015-12-21): +# Fort Pierre is technically located in the Mountain time zone as is +# the rest of Stanley County. Most of Stanley County and Fort Pierre +# uses the Central time zone due to doing most of their business in +# Pierre so it simplifies schedules. I have lived in Stanley County +# all my life and it has been that way since I can remember. (43 years!) +# +# From Paul Eggert (2015-12-25): +# Assume this practice predates 1970, so Fort Pierre can use America/Chicago. + +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER +Rule Chicago 1920 only - Jun 13 2:00 1:00 D +Rule Chicago 1920 1921 - Oct lastSun 2:00 0 S +Rule Chicago 1921 only - Mar lastSun 2:00 1:00 D +Rule Chicago 1922 1966 - Apr lastSun 2:00 1:00 D +Rule Chicago 1922 1954 - Sep lastSun 2:00 0 S +Rule Chicago 1955 1966 - Oct lastSun 2:00 0 S +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone America/Chicago -5:50:36 - LMT 1883 Nov 18 12:09:24 + -6:00 US C%sT 1920 + -6:00 Chicago C%sT 1936 Mar 1 2:00 + -5:00 - EST 1936 Nov 15 2:00 + -6:00 Chicago C%sT 1942 + -6:00 US C%sT 1946 + -6:00 Chicago C%sT 1967 + -6:00 US C%sT +# Oliver County, ND switched from mountain to central time on 1992-10-25. +Zone America/North_Dakota/Center -6:45:12 - LMT 1883 Nov 18 12:14:48 + -7:00 US M%sT 1992 Oct 25 2:00 + -6:00 US C%sT +# Morton County, ND, switched from mountain to central time on +# 2003-10-26, except for the area around Mandan which was already central time. +# See <http://dmses.dot.gov/docimages/p63/135818.pdf>. +# Officially this switch also included part of Sioux County, and +# Jones, Mellette, and Todd Counties in South Dakota; +# but in practice these other counties were already observing central time. +# See <http://www.epa.gov/fedrgstr/EPA-IMPACT/2003/October/Day-28/i27056.htm>. +Zone America/North_Dakota/New_Salem -6:45:39 - LMT 1883 Nov 18 12:14:21 + -7:00 US M%sT 2003 Oct 26 2:00 + -6:00 US C%sT + +# From Josh Findley (2011-01-21): +# ...it appears that Mercer County, North Dakota, changed from the +# mountain time zone to the central time zone at the last transition from +# daylight-saving to standard time (on Nov. 7, 2010): +# http://www.gpo.gov/fdsys/pkg/FR-2010-09-29/html/2010-24376.htm +# http://www.bismarcktribune.com/news/local/article_1eb1b588-c758-11df-b472-001cc4c03286.html + +# From Andy Lipscomb (2011-01-24): +# ...according to the Census Bureau, the largest city is Beulah (although +# it's commonly referred to as Beulah-Hazen, with Hazen being the next +# largest city in Mercer County). Google Maps places Beulah's city hall +# at 47 degrees 15' 51" N, 101 degrees 46' 40" W, which yields an offset +# of 6h47'07". + +Zone America/North_Dakota/Beulah -6:47:07 - LMT 1883 Nov 18 12:12:53 + -7:00 US M%sT 2010 Nov 7 2:00 + -6:00 US C%sT + +# US mountain time, represented by Denver +# +# Colorado, far western Kansas, Montana, western +# Nebraska, Nevada border (Jackpot, Owyhee, and Mountain City), +# New Mexico, southwestern North Dakota, +# western South Dakota, far western Texas (El Paso County, Hudspeth County, +# and Pine Springs and Nickel Creek in Culberson County), Utah, Wyoming +# +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER +Rule Denver 1920 1921 - Mar lastSun 2:00 1:00 D +Rule Denver 1920 only - Oct lastSun 2:00 0 S +Rule Denver 1921 only - May 22 2:00 0 S +Rule Denver 1965 1966 - Apr lastSun 2:00 1:00 D +Rule Denver 1965 1966 - Oct lastSun 2:00 0 S +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone America/Denver -6:59:56 - LMT 1883 Nov 18 12:00:04 + -7:00 US M%sT 1920 + -7:00 Denver M%sT 1942 + -7:00 US M%sT 1946 + -7:00 Denver M%sT 1967 + -7:00 US M%sT + +# US Pacific time, represented by Los Angeles +# +# California, northern Idaho (Benewah, Bonner, Boundary, Clearwater, +# Kootenai, Latah, Lewis, Nez Perce, and Shoshone counties, Idaho county +# north of the Salmon River, and the towns of Burgdorf and Warren), +# Nevada (except West Wendover), Oregon (except the northern 3/4 of +# Malheur county), and Washington +# +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER +Rule CA 1948 only - Mar 14 2:00 1:00 D +Rule CA 1949 only - Jan 1 2:00 0 S +Rule CA 1950 1966 - Apr lastSun 2:00 1:00 D +Rule CA 1950 1961 - Sep lastSun 2:00 0 S +Rule CA 1962 1966 - Oct lastSun 2:00 0 S +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone America/Los_Angeles -7:52:58 - LMT 1883 Nov 18 12:07:02 + -8:00 US P%sT 1946 + -8:00 CA P%sT 1967 + -8:00 US P%sT + +# Alaska +# AK%sT is the modern abbreviation for -9:00 per USNO. +# +# From Paul Eggert (2001-05-30): +# Howse writes that Alaska switched from the Julian to the Gregorian calendar, +# and from east-of-GMT to west-of-GMT days, when the US bought it from Russia. +# This was on 1867-10-18, a Friday; the previous day was 1867-10-06 Julian, +# also a Friday. Include only the time zone part of this transition, +# ignoring the switch from Julian to Gregorian, since we can't represent +# the Julian calendar. +# +# As far as we know, none of the exact locations mentioned below were +# permanently inhabited in 1867 by anyone using either calendar. +# (Yakutat was colonized by the Russians in 1799, but the settlement +# was destroyed in 1805 by a Yakutat-kon war party.) However, there +# were nearby inhabitants in some cases and for our purposes perhaps +# it's best to simply use the official transition. + +# From Paul Eggert (2014-07-18): +# One opinion of the early-1980s turmoil in Alaska over time zones and +# daylight saving time appeared as graffiti on a Juneau airport wall: +# "Welcome to Juneau. Please turn your watch back to the 19th century." +# See: Turner W. Alaska's four time zones now two. NY Times 1983-11-01. +# http://www.nytimes.com/1983/11/01/us/alaska-s-four-time-zones-now-two.html +# +# Steve Ferguson (2011-01-31) referred to the following source: +# Norris F. Keeping time in Alaska: national directives, local response. +# Alaska History 2001;16(1-2). +# http://alaskahistoricalsociety.org/discover-alaska/glimpses-of-the-past/keeping-time-in-alaska/ + +# From Arthur David Olson (2011-02-01): +# Here's database-relevant material from the 2001 "Alaska History" article: +# +# On September 20 [1979]...DOT...officials decreed that on April 27, +# 1980, Juneau and other nearby communities would move to Yukon Time. +# Sitka, Petersburg, Wrangell, and Ketchikan, however, would remain on +# Pacific Time. +# +# ...on September 22, 1980, DOT Secretary Neil E. Goldschmidt rescinded the +# Department's September 1979 decision. Juneau and other communities in +# northern Southeast reverted to Pacific Time on October 26. +# +# On October 28 [1983]...the Metlakatla Indian Community Council voted +# unanimously to keep the reservation on Pacific Time. +# +# According to DOT official Joanne Petrie, Indian reservations are not +# bound to follow time zones imposed by neighboring jurisdictions. +# +# (The last is consistent with how the database now handles the Navajo +# Nation.) + +# From Arthur David Olson (2011-02-09): +# I just spoke by phone with a staff member at the Metlakatla Indian +# Community office (using contact information available at +# http://www.commerce.state.ak.us/dca/commdb/CIS.cfm?Comm_Boro_name=Metlakatla +# It's shortly after 1:00 here on the east coast of the United States; +# the staffer said it was shortly after 10:00 there. When I asked whether +# that meant they were on Pacific time, they said no - they were on their +# own time. I asked about daylight saving; they said it wasn't used. I +# did not inquire about practices in the past. + +# From Arthur David Olson (2011-08-17): +# For lack of better information, assume that Metlakatla's +# abandonment of use of daylight saving resulted from the 1983 vote. + +# From Steffen Thorsen (2015-11-09): +# It seems Metlakatla did go off PST on Sunday, November 1, changing +# their time to AKST and are going to follow Alaska's DST, switching +# between AKST and AKDT from now on.... +# http://www.krbd.org/2015/10/30/annette-island-times-they-are-a-changing/ + +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone America/Juneau 15:02:19 - LMT 1867 Oct 18 + -8:57:41 - LMT 1900 Aug 20 12:00 + -8:00 - PST 1942 + -8:00 US P%sT 1946 + -8:00 - PST 1969 + -8:00 US P%sT 1980 Apr 27 2:00 + -9:00 US Y%sT 1980 Oct 26 2:00 + -8:00 US P%sT 1983 Oct 30 2:00 + -9:00 US Y%sT 1983 Nov 30 + -9:00 US AK%sT +Zone America/Sitka 14:58:47 - LMT 1867 Oct 18 + -9:01:13 - LMT 1900 Aug 20 12:00 + -8:00 - PST 1942 + -8:00 US P%sT 1946 + -8:00 - PST 1969 + -8:00 US P%sT 1983 Oct 30 2:00 + -9:00 US Y%sT 1983 Nov 30 + -9:00 US AK%sT +Zone America/Metlakatla 15:13:42 - LMT 1867 Oct 18 + -8:46:18 - LMT 1900 Aug 20 12:00 + -8:00 - PST 1942 + -8:00 US P%sT 1946 + -8:00 - PST 1969 + -8:00 US P%sT 1983 Oct 30 2:00 + -8:00 - PST 2015 Nov 1 2:00 + -9:00 US AK%sT +Zone America/Yakutat 14:41:05 - LMT 1867 Oct 18 + -9:18:55 - LMT 1900 Aug 20 12:00 + -9:00 - YST 1942 + -9:00 US Y%sT 1946 + -9:00 - YST 1969 + -9:00 US Y%sT 1983 Nov 30 + -9:00 US AK%sT +Zone America/Anchorage 14:00:24 - LMT 1867 Oct 18 + -9:59:36 - LMT 1900 Aug 20 12:00 + -10:00 - CAT 1942 + -10:00 US CAT/CAWT 1945 Aug 14 23:00u + -10:00 US CAT/CAPT 1946 # Peace + -10:00 - CAT 1967 Apr + -10:00 - AHST 1969 + -10:00 US AH%sT 1983 Oct 30 2:00 + -9:00 US Y%sT 1983 Nov 30 + -9:00 US AK%sT +Zone America/Nome 12:58:21 - LMT 1867 Oct 18 + -11:01:38 - LMT 1900 Aug 20 12:00 + -11:00 - NST 1942 + -11:00 US N%sT 1946 + -11:00 - NST 1967 Apr + -11:00 - BST 1969 + -11:00 US B%sT 1983 Oct 30 2:00 + -9:00 US Y%sT 1983 Nov 30 + -9:00 US AK%sT +Zone America/Adak 12:13:21 - LMT 1867 Oct 18 + -11:46:38 - LMT 1900 Aug 20 12:00 + -11:00 - NST 1942 + -11:00 US N%sT 1946 + -11:00 - NST 1967 Apr + -11:00 - BST 1969 + -11:00 US B%sT 1983 Oct 30 2:00 + -10:00 US AH%sT 1983 Nov 30 + -10:00 US H%sT +# The following switches don't quite make our 1970 cutoff. +# +# Shanks writes that part of southwest Alaska (e.g. Aniak) +# switched from -11:00 to -10:00 on 1968-09-22 at 02:00, +# and another part (e.g. Akiak) made the same switch five weeks later. +# +# From David Flater (2004-11-09): +# In e-mail, 2004-11-02, Ray Hudson, historian/liaison to the Unalaska +# Historic Preservation Commission, provided this information, which +# suggests that Unalaska deviated from statutory time from early 1967 +# possibly until 1983: +# +# Minutes of the Unalaska City Council Meeting, January 10, 1967: +# "Except for St. Paul and Akutan, Unalaska is the only important +# location not on Alaska Standard Time. The following resolution was +# made by William Robinson and seconded by Henry Swanson: Be it +# resolved that the City of Unalaska hereby goes to Alaska Standard +# Time as of midnight Friday, January 13, 1967 (1 A.M. Saturday, +# January 14, Alaska Standard Time.) This resolution was passed with +# three votes for and one against." + +# Hawaii + +# From Arthur David Olson (2010-12-09): +# "Hawaiian Time" by Robert C. Schmitt and Doak C. Cox appears on pages 207-225 +# of volume 26 of The Hawaiian Journal of History (1992). As of 2010-12-09, +# the article is available at +# http://evols.library.manoa.hawaii.edu/bitstream/10524/239/2/JL26215.pdf +# and indicates that standard time was adopted effective noon, January +# 13, 1896 (page 218), that in "1933, the Legislature decreed daylight +# saving for the period between the last Sunday of each April and the +# last Sunday of each September, but less than a month later repealed the +# act," (page 220), that year-round daylight saving time was in effect +# from 1942-02-09 to 1945-09-30 (page 221, with no time of day given for +# when clocks changed) and that clocks were changed by 30 minutes +# effective the second Sunday of June, 1947 (page 219, with no time of +# day given for when clocks changed). A footnote for the 1933 changes +# cites Session Laws of Hawaii 1933, "Act. 90 (approved 26 Apr. 1933) +# and Act 163 (approved 21 May 1933)." + +# From Arthur David Olson (2011-01-19): +# The following is from "Laws of the Territory of Hawaii Passed by the +# Seventeenth Legislature: Regular Session 1933," available (as of +# 2011-01-19) at American University's Pence Law Library. Page 85: "Act +# 90...At 2 o'clock ante meridian of the last Sunday in April of each +# year, the standard time of this Territory shall be advanced one +# hour...This Act shall take effect upon its approval. Approved this 26th +# day of April, A. D. 1933. LAWRENCE M JUDD, Governor of the Territory of +# Hawaii." Page 172: "Act 163...Act 90 of the Session Laws of 1933 is +# hereby repealed...This Act shall take effect upon its approval, upon +# which date the standard time of this Territory shall be restored to +# that existing immediately prior to the taking effect of said Act 90. +# Approved this 21st day of May, A. D. 1933. LAWRENCE M. JUDD, Governor +# of the Territory of Hawaii." +# +# Note that 1933-05-21 was a Sunday. +# We're left to guess the time of day when Act 163 was approved; guess noon. + +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Pacific/Honolulu -10:31:26 - LMT 1896 Jan 13 12:00 + -10:30 - HST 1933 Apr 30 2:00 + -10:30 1:00 HDT 1933 May 21 12:00 + -10:30 - HST 1942 Feb 9 2:00 + -10:30 1:00 HDT 1945 Sep 30 2:00 + -10:30 - HST 1947 Jun 8 2:00 + -10:00 - HST +Link Pacific/Honolulu Pacific/Johnston + +# Now we turn to US areas that have diverged from the consensus since 1970. + +# Arizona mostly uses MST. + +# From Paul Eggert (2002-10-20): +# +# The information in the rest of this paragraph is derived from the +# Daylight Saving Time web page +# <http://www.dlapr.lib.az.us/links/daylight.htm> (2002-01-23) +# maintained by the Arizona State Library, Archives and Public Records. +# Between 1944-01-01 and 1944-04-01 the State of Arizona used standard +# time, but by federal law railroads, airlines, bus lines, military +# personnel, and some engaged in interstate commerce continued to +# observe war (i.e., daylight saving) time. The 1944-03-17 Phoenix +# Gazette says that was the date the law changed, and that 04-01 was +# the date the state's clocks would change. In 1945 the State of +# Arizona used standard time all year, again with exceptions only as +# mandated by federal law. Arizona observed DST in 1967, but Arizona +# Laws 1968, ch. 183 (effective 1968-03-21) repealed DST. +# +# Shanks says the 1944 experiment came to an end on 1944-03-17. +# Go with the Arizona State Library instead. + +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone America/Phoenix -7:28:18 - LMT 1883 Nov 18 11:31:42 + -7:00 US M%sT 1944 Jan 1 0:01 + -7:00 - MST 1944 Apr 1 0:01 + -7:00 US M%sT 1944 Oct 1 0:01 + -7:00 - MST 1967 + -7:00 US M%sT 1968 Mar 21 + -7:00 - MST +# From Arthur David Olson (1988-02-13): +# A writer from the Inter Tribal Council of Arizona, Inc., +# notes in private correspondence dated 1987-12-28 that "Presently, only the +# Navajo Nation participates in the Daylight Saving Time policy, due to its +# large size and location in three states." (The "only" means that other +# tribal nations don't use DST.) +# +# From Paul Eggert (2013-08-26): +# See America/Denver for a zone appropriate for the Navajo Nation. + +# Southern Idaho (Ada, Adams, Bannock, Bear Lake, Bingham, Blaine, +# Boise, Bonneville, Butte, Camas, Canyon, Caribou, Cassia, Clark, +# Custer, Elmore, Franklin, Fremont, Gem, Gooding, Jefferson, Jerome, +# Lemhi, Lincoln, Madison, Minidoka, Oneida, Owyhee, Payette, Power, +# Teton, Twin Falls, Valley, Washington counties, and the southern +# quarter of Idaho county) and eastern Oregon (most of Malheur County) +# switched four weeks late in 1974. +# +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone America/Boise -7:44:49 - LMT 1883 Nov 18 12:15:11 + -8:00 US P%sT 1923 May 13 2:00 + -7:00 US M%sT 1974 + -7:00 - MST 1974 Feb 3 2:00 + -7:00 US M%sT + +# Indiana +# +# For a map of Indiana's time zone regions, see: +# http://en.wikipedia.org/wiki/Time_in_Indiana +# +# From Paul Eggert (2007-08-17): +# Since 1970, most of Indiana has been like America/Indiana/Indianapolis, +# with the following exceptions: +# +# - Gibson, Jasper, Lake, LaPorte, Newton, Porter, Posey, Spencer, +# Vanderburgh, and Warrick counties have been like America/Chicago. +# +# - Dearborn and Ohio counties have been like America/New_York. +# +# - Clark, Floyd, and Harrison counties have been like +# America/Kentucky/Louisville. +# +# - Crawford, Daviess, Dubois, Knox, Martin, Perry, Pike, Pulaski, Starke, +# and Switzerland counties have their own time zone histories as noted below. +# +# Shanks partitioned Indiana into 345 regions, each with its own time history, +# and wrote "Even newspaper reports present contradictory information." +# Those Hoosiers! Such a flighty and changeable people! +# Fortunately, most of the complexity occurred before our cutoff date of 1970. +# +# Other than Indianapolis, the Indiana place names are so nondescript +# that they would be ambiguous if we left them at the 'America' level. +# So we reluctantly put them all in a subdirectory 'America/Indiana'. + +# From Paul Eggert (2014-06-26): +# https://www.federalregister.gov/articles/2006/01/20/06-563/standard-time-zone-boundary-in-the-state-of-indiana +# says "DOT is relocating the time zone boundary in Indiana to move Starke, +# Pulaski, Knox, Daviess, Martin, Pike, Dubois, and Perry Counties from the +# Eastern Time Zone to the Central Time Zone.... The effective date of +# this rule is 2 a.m. EST Sunday, April 2, 2006, which is the +# changeover date from standard time to Daylight Saving Time." +# Strictly speaking, this meant the affected counties changed their +# clocks twice that night, but this obviously was in error. The intent +# was that 01:59:59 EST be followed by 02:00:00 CDT. + +# From Gwillim Law (2007-02-10): +# The Associated Press has been reporting that Pulaski County, Indiana is +# going to switch from Central to Eastern Time on March 11, 2007.... +# http://www.indystar.com/apps/pbcs.dll/article?AID=/20070207/LOCAL190108/702070524/0/LOCAL + +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER +Rule Indianapolis 1941 only - Jun 22 2:00 1:00 D +Rule Indianapolis 1941 1954 - Sep lastSun 2:00 0 S +Rule Indianapolis 1946 1954 - Apr lastSun 2:00 1:00 D +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone America/Indiana/Indianapolis -5:44:38 - LMT 1883 Nov 18 12:15:22 + -6:00 US C%sT 1920 + -6:00 Indianapolis C%sT 1942 + -6:00 US C%sT 1946 + -6:00 Indianapolis C%sT 1955 Apr 24 2:00 + -5:00 - EST 1957 Sep 29 2:00 + -6:00 - CST 1958 Apr 27 2:00 + -5:00 - EST 1969 + -5:00 US E%sT 1971 + -5:00 - EST 2006 + -5:00 US E%sT +# +# Eastern Crawford County, Indiana, left its clocks alone in 1974, +# as well as from 1976 through 2005. +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER +Rule Marengo 1951 only - Apr lastSun 2:00 1:00 D +Rule Marengo 1951 only - Sep lastSun 2:00 0 S +Rule Marengo 1954 1960 - Apr lastSun 2:00 1:00 D +Rule Marengo 1954 1960 - Sep lastSun 2:00 0 S +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone America/Indiana/Marengo -5:45:23 - LMT 1883 Nov 18 12:14:37 + -6:00 US C%sT 1951 + -6:00 Marengo C%sT 1961 Apr 30 2:00 + -5:00 - EST 1969 + -5:00 US E%sT 1974 Jan 6 2:00 + -6:00 1:00 CDT 1974 Oct 27 2:00 + -5:00 US E%sT 1976 + -5:00 - EST 2006 + -5:00 US E%sT +# +# Daviess, Dubois, Knox, and Martin Counties, Indiana, +# switched from eastern to central time in April 2006, then switched back +# in November 2007. +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER +Rule Vincennes 1946 only - Apr lastSun 2:00 1:00 D +Rule Vincennes 1946 only - Sep lastSun 2:00 0 S +Rule Vincennes 1953 1954 - Apr lastSun 2:00 1:00 D +Rule Vincennes 1953 1959 - Sep lastSun 2:00 0 S +Rule Vincennes 1955 only - May 1 0:00 1:00 D +Rule Vincennes 1956 1963 - Apr lastSun 2:00 1:00 D +Rule Vincennes 1960 only - Oct lastSun 2:00 0 S +Rule Vincennes 1961 only - Sep lastSun 2:00 0 S +Rule Vincennes 1962 1963 - Oct lastSun 2:00 0 S +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone America/Indiana/Vincennes -5:50:07 - LMT 1883 Nov 18 12:09:53 + -6:00 US C%sT 1946 + -6:00 Vincennes C%sT 1964 Apr 26 2:00 + -5:00 - EST 1969 + -5:00 US E%sT 1971 + -5:00 - EST 2006 Apr 2 2:00 + -6:00 US C%sT 2007 Nov 4 2:00 + -5:00 US E%sT +# +# Perry County, Indiana, switched from eastern to central time in April 2006. +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER +Rule Perry 1946 only - Apr lastSun 2:00 1:00 D +Rule Perry 1946 only - Sep lastSun 2:00 0 S +Rule Perry 1953 1954 - Apr lastSun 2:00 1:00 D +Rule Perry 1953 1959 - Sep lastSun 2:00 0 S +Rule Perry 1955 only - May 1 0:00 1:00 D +Rule Perry 1956 1963 - Apr lastSun 2:00 1:00 D +Rule Perry 1960 only - Oct lastSun 2:00 0 S +Rule Perry 1961 only - Sep lastSun 2:00 0 S +Rule Perry 1962 1963 - Oct lastSun 2:00 0 S +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone America/Indiana/Tell_City -5:47:03 - LMT 1883 Nov 18 12:12:57 + -6:00 US C%sT 1946 + -6:00 Perry C%sT 1964 Apr 26 2:00 + -5:00 - EST 1969 + -5:00 US E%sT 1971 + -5:00 - EST 2006 Apr 2 2:00 + -6:00 US C%sT +# +# Pike County, Indiana moved from central to eastern time in 1977, +# then switched back in 2006, then switched back again in 2007. +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER +Rule Pike 1955 only - May 1 0:00 1:00 D +Rule Pike 1955 1960 - Sep lastSun 2:00 0 S +Rule Pike 1956 1964 - Apr lastSun 2:00 1:00 D +Rule Pike 1961 1964 - Oct lastSun 2:00 0 S +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone America/Indiana/Petersburg -5:49:07 - LMT 1883 Nov 18 12:10:53 + -6:00 US C%sT 1955 + -6:00 Pike C%sT 1965 Apr 25 2:00 + -5:00 - EST 1966 Oct 30 2:00 + -6:00 US C%sT 1977 Oct 30 2:00 + -5:00 - EST 2006 Apr 2 2:00 + -6:00 US C%sT 2007 Nov 4 2:00 + -5:00 US E%sT +# +# Starke County, Indiana moved from central to eastern time in 1991, +# then switched back in 2006. +# From Arthur David Olson (1991-10-28): +# An article on page A3 of the Sunday, 1991-10-27 Washington Post +# notes that Starke County switched from Central time to Eastern time as of +# 1991-10-27. +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER +Rule Starke 1947 1961 - Apr lastSun 2:00 1:00 D +Rule Starke 1947 1954 - Sep lastSun 2:00 0 S +Rule Starke 1955 1956 - Oct lastSun 2:00 0 S +Rule Starke 1957 1958 - Sep lastSun 2:00 0 S +Rule Starke 1959 1961 - Oct lastSun 2:00 0 S +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone America/Indiana/Knox -5:46:30 - LMT 1883 Nov 18 12:13:30 + -6:00 US C%sT 1947 + -6:00 Starke C%sT 1962 Apr 29 2:00 + -5:00 - EST 1963 Oct 27 2:00 + -6:00 US C%sT 1991 Oct 27 2:00 + -5:00 - EST 2006 Apr 2 2:00 + -6:00 US C%sT +# +# Pulaski County, Indiana, switched from eastern to central time in +# April 2006 and then switched back in March 2007. +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER +Rule Pulaski 1946 1960 - Apr lastSun 2:00 1:00 D +Rule Pulaski 1946 1954 - Sep lastSun 2:00 0 S +Rule Pulaski 1955 1956 - Oct lastSun 2:00 0 S +Rule Pulaski 1957 1960 - Sep lastSun 2:00 0 S +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone America/Indiana/Winamac -5:46:25 - LMT 1883 Nov 18 12:13:35 + -6:00 US C%sT 1946 + -6:00 Pulaski C%sT 1961 Apr 30 2:00 + -5:00 - EST 1969 + -5:00 US E%sT 1971 + -5:00 - EST 2006 Apr 2 2:00 + -6:00 US C%sT 2007 Mar 11 2:00 + -5:00 US E%sT +# +# Switzerland County, Indiana, did not observe DST from 1973 through 2005. +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone America/Indiana/Vevay -5:40:16 - LMT 1883 Nov 18 12:19:44 + -6:00 US C%sT 1954 Apr 25 2:00 + -5:00 - EST 1969 + -5:00 US E%sT 1973 + -5:00 - EST 2006 + -5:00 US E%sT + +# Part of Kentucky left its clocks alone in 1974. +# This also includes Clark, Floyd, and Harrison counties in Indiana. +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER +Rule Louisville 1921 only - May 1 2:00 1:00 D +Rule Louisville 1921 only - Sep 1 2:00 0 S +Rule Louisville 1941 1961 - Apr lastSun 2:00 1:00 D +Rule Louisville 1941 only - Sep lastSun 2:00 0 S +Rule Louisville 1946 only - Jun 2 2:00 0 S +Rule Louisville 1950 1955 - Sep lastSun 2:00 0 S +Rule Louisville 1956 1960 - Oct lastSun 2:00 0 S +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone America/Kentucky/Louisville -5:43:02 - LMT 1883 Nov 18 12:16:58 + -6:00 US C%sT 1921 + -6:00 Louisville C%sT 1942 + -6:00 US C%sT 1946 + -6:00 Louisville C%sT 1961 Jul 23 2:00 + -5:00 - EST 1968 + -5:00 US E%sT 1974 Jan 6 2:00 + -6:00 1:00 CDT 1974 Oct 27 2:00 + -5:00 US E%sT +# +# Wayne County, Kentucky +# +# From Lake Cumberland LIFE +# http://www.lake-cumberland.com/life/archive/news990129time.shtml +# (1999-01-29) via WKYM-101.7: +# Clinton County has joined Wayne County in asking the DoT to change from +# the Central to the Eastern time zone.... The Wayne County government made +# the same request in December. And while Russell County officials have not +# taken action, the majority of respondents to a poll conducted there in +# August indicated they would like to change to "fast time" also. +# The three Lake Cumberland counties are the farthest east of any U.S. +# location in the Central time zone. +# +# From Rich Wales (2000-08-29): +# After prolonged debate, and despite continuing deep differences of opinion, +# Wayne County (central Kentucky) is switching from Central (-0600) to Eastern +# (-0500) time. They won't "fall back" this year. See Sara Shipley, +# The difference an hour makes, Nando Times (2000-08-29 15:33 -0400). +# +# From Paul Eggert (2001-07-16): +# The final rule was published in the +# Federal Register 65, 160 (2000-08-17), pp 50154-50158. +# http://frwebgate.access.gpo.gov/cgi-bin/getdoc.cgi?dbname=2000_register&docid=fr17au00-22 +# +Zone America/Kentucky/Monticello -5:39:24 - LMT 1883 Nov 18 12:20:36 + -6:00 US C%sT 1946 + -6:00 - CST 1968 + -6:00 US C%sT 2000 Oct 29 2:00 + -5:00 US E%sT + + +# From Rives McDow (2000-08-30): +# Here ... are all the changes in the US since 1985. +# Kearny County, KS (put all of county on central; +# previously split between MST and CST) ... 1990-10 +# Starke County, IN (from CST to EST) ... 1991-10 +# Oliver County, ND (from MST to CST) ... 1992-10 +# West Wendover, NV (from PST TO MST) ... 1999-10 +# Wayne County, KY (from CST to EST) ... 2000-10 +# +# From Paul Eggert (2001-07-17): +# We don't know where the line used to be within Kearny County, KS, +# so omit that change for now. +# See America/Indiana/Knox for the Starke County, IN change. +# See America/North_Dakota/Center for the Oliver County, ND change. +# West Wendover, NV officially switched from Pacific to mountain time on +# 1999-10-31. See the +# Federal Register 64, 203 (1999-10-21), pp 56705-56707. +# http://frwebgate.access.gpo.gov/cgi-bin/getdoc.cgi?dbname=1999_register&docid=fr21oc99-15 +# However, the Federal Register says that West Wendover already operated +# on mountain time, and the rule merely made this official; +# hence a separate tz entry is not needed. + +# Michigan +# +# From Bob Devine (1988-01-28): +# Michigan didn't observe DST from 1968 to 1973. +# +# From Paul Eggert (1999-03-31): +# Shanks writes that Michigan started using standard time on 1885-09-18, +# but Howse writes (pp 124-125, referring to Popular Astronomy, 1901-01) +# that Detroit kept +# +# local time until 1900 when the City Council decreed that clocks should +# be put back twenty-eight minutes to Central Standard Time. Half the +# city obeyed, half refused. After considerable debate, the decision +# was rescinded and the city reverted to Sun time. A derisive offer to +# erect a sundial in front of the city hall was referred to the +# Committee on Sewers. Then, in 1905, Central time was adopted +# by city vote. +# +# This story is too entertaining to be false, so go with Howse over Shanks. +# +# From Paul Eggert (2001-03-06): +# Garland (1927) writes "Cleveland and Detroit advanced their clocks +# one hour in 1914." This change is not in Shanks. We have no more +# info, so omit this for now. +# +# Most of Michigan observed DST from 1973 on, but was a bit late in 1975. +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER +Rule Detroit 1948 only - Apr lastSun 2:00 1:00 D +Rule Detroit 1948 only - Sep lastSun 2:00 0 S +Rule Detroit 1967 only - Jun 14 2:00 1:00 D +Rule Detroit 1967 only - Oct lastSun 2:00 0 S +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone America/Detroit -5:32:11 - LMT 1905 + -6:00 - CST 1915 May 15 2:00 + -5:00 - EST 1942 + -5:00 US E%sT 1946 + -5:00 Detroit E%sT 1973 + -5:00 US E%sT 1975 + -5:00 - EST 1975 Apr 27 2:00 + -5:00 US E%sT +# +# Dickinson, Gogebic, Iron, and Menominee Counties, Michigan, +# switched from EST to CST/CDT in 1973. +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER +Rule Menominee 1946 only - Apr lastSun 2:00 1:00 D +Rule Menominee 1946 only - Sep lastSun 2:00 0 S +Rule Menominee 1966 only - Apr lastSun 2:00 1:00 D +Rule Menominee 1966 only - Oct lastSun 2:00 0 S +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone America/Menominee -5:50:27 - LMT 1885 Sep 18 12:00 + -6:00 US C%sT 1946 + -6:00 Menominee C%sT 1969 Apr 27 2:00 + -5:00 - EST 1973 Apr 29 2:00 + -6:00 US C%sT + +# Navassa +# administered by the US Fish and Wildlife Service +# claimed by US under the provisions of the 1856 Guano Islands Act +# also claimed by Haiti +# occupied 1857/1900 by the Navassa Phosphate Co +# US lighthouse 1917/1996-09 +# currently uninhabited +# see Mark Fineman, "An Isle Rich in Guano and Discord", +# _Los Angeles Times_ (1998-11-10), A1, A10; it cites +# Jimmy Skaggs, _The Great Guano Rush_ (1994). + +################################################################################ + + +# From Paul Eggert (2014-10-31): +# +# 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. +# +# Gwillim Law writes that a good source +# for recent time zone data is the International Air Transport +# Association's Standard Schedules Information Manual (IATA SSIM), +# published semiannually. Law sent in several helpful summaries +# of the IATA's data after 1990. Except where otherwise noted, +# IATA SSIM is the source for entries after 1990. +# +# Other sources occasionally used include: +# +# Edward W. Whitman, World Time Differences, +# Whitman Publishing Co, 2 Niagara Av, Ealing, London (undated), +# which I found in the UCLA library. +# +# William Willett, The Waste of Daylight, 19th edition +# <http://cs.ucla.edu/~eggert/The-Waste-of-Daylight-19th.pdf> +# [PDF] (1914-03) +# +# Milne J. Civil time. Geogr J. 1899 Feb;13(2):173-94 +# <http://www.jstor.org/stable/1774359>. +# +# See the 'europe' file for Greenland. + +# Canada + +# From Alain LaBonté (1994-11-14): +# I post here the time zone abbreviations standardized in Canada +# for both English and French in the CAN/CSA-Z234.4-89 standard.... +# +# UTC Standard time Daylight saving time +# offset French English French English +# -2:30 - - HAT NDT +# -3 - - HAA ADT +# -3:30 HNT NST - - +# -4 HNA AST HAE EDT +# -5 HNE EST HAC CDT +# -6 HNC CST HAR MDT +# -7 HNR MST HAP PDT +# -8 HNP PST HAY YDT +# -9 HNY YST - - +# +# HN: Heure Normale ST: Standard Time +# HA: Heure Avancée DT: Daylight saving Time +# +# A: de l'Atlantique Atlantic +# C: du Centre Central +# E: de l'Est Eastern +# M: Mountain +# N: Newfoundland +# P: du Pacifique Pacific +# R: des Rocheuses +# T: de Terre-Neuve +# Y: du Yukon Yukon +# +# From Paul Eggert (1994-11-22): +# Alas, this sort of thing must be handled by localization software. + +# Unless otherwise specified, the data entries for Canada are all from Shanks +# & Pottenger. + +# From Chris Walton (2006-04-01, 2006-04-25, 2006-06-26, 2007-01-31, +# 2007-03-01): +# The British Columbia government announced yesterday that it will +# adjust daylight savings next year to align with changes in the +# U.S. and the rest of Canada.... +# http://www2.news.gov.bc.ca/news_releases_2005-2009/2006AG0014-000330.htm +# ... +# Nova Scotia +# Daylight saving time will be extended by four weeks starting in 2007.... +# http://www.gov.ns.ca/just/regulations/rg2/2006/ma1206.pdf +# +# [For New Brunswick] the new legislation dictates that the time change is to +# be done at 02:00 instead of 00:01. +# http://www.gnb.ca/0062/acts/BBA-2006/Chap-19.pdf +# ... +# Manitoba has traditionally changed the clock every fall at 03:00. +# As of 2006, the transition is to take place one hour earlier at 02:00. +# http://web2.gov.mb.ca/laws/statutes/ccsm/o030e.php +# ... +# [Alberta, Ontario, Quebec] will follow US rules. +# http://www.qp.gov.ab.ca/documents/spring/CH03_06.CFM +# http://www.e-laws.gov.on.ca/DBLaws/Source/Regs/English/2006/R06111_e.htm +# http://www2.publicationsduquebec.gouv.qc.ca/dynamicSearch/telecharge.php?type=5&file=2006C39A.PDF +# ... +# P.E.I. will follow US rules.... +# http://www.assembly.pe.ca/bills/pdf_chapter/62/3/chapter-41.pdf +# ... +# Province of Newfoundland and Labrador.... +# http://www.hoa.gov.nl.ca/hoa/bills/Bill0634.htm +# ... +# Yukon +# http://www.gov.yk.ca/legislation/regs/oic2006_127.pdf +# ... +# N.W.T. will follow US rules. Whoever maintains the government web site +# does not seem to believe in bookmarks. To see the news release, click the +# following link and search for "Daylight Savings Time Change". Press the +# "Daylight Savings Time Change" link; it will fire off a popup using +# JavaScript. +# http://www.exec.gov.nt.ca/currentnews/currentPR.asp?mode=archive +# ... +# Nunavut +# An amendment to the Interpretation Act was registered on February 19/2007.... +# http://action.attavik.ca/home/justice-gn/attach/2007/gaz02part2.pdf + +# From Paul Eggert (2014-10-18): +# H. David Matthews and Mary Vincent's map +# "It's about TIME", _Canadian Geographic_ (September-October 1998) +# http://www.canadiangeographic.ca/Magazine/SO98/alacarte.asp +# contains detailed boundaries for regions observing nonstandard +# time and daylight saving time arrangements in Canada circa 1998. +# +# National Research Council Canada maintains info about time zones and DST. +# http://www.nrc-cnrc.gc.ca/eng/services/time/time_zones.html +# http://www.nrc-cnrc.gc.ca/eng/services/time/faq/index.html#Q5 +# Its unofficial information is often taken from Matthews and Vincent. + +# From Paul Eggert (2006-06-27): +# For now, assume all of DST-observing Canada will fall into line with the +# new US DST rules, + +# From Chris Walton (2011-12-01) +# In the first of Tammy Hardwick's articles +# http://www.ilovecreston.com/?p=articles&t=spec&ar=260 +# she quotes the Friday November 1/1918 edition of the Creston Review. +# The quote includes these two statements: +# 'Sunday the CPR went back to the old system of time...' +# '... The daylight saving scheme was dropped all over Canada at the same time,' +# These statements refer to a transition from daylight time to standard time +# that occurred nationally on Sunday October 27/1918. This transition was +# also documented in the Saturday October 26/1918 edition of the Toronto Star. + +# In light of that evidence, we alter the date from the earlier believed +# Oct 31, to Oct 27, 1918 (and Sunday is a more likely transition day +# than Thursday) in all Canadian rulesets. + +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Canada 1918 only - Apr 14 2:00 1:00 D +Rule Canada 1918 only - Oct 27 2:00 0 S +Rule Canada 1942 only - Feb 9 2:00 1:00 W # War +Rule Canada 1945 only - Aug 14 23:00u 1:00 P # Peace +Rule Canada 1945 only - Sep 30 2:00 0 S +Rule Canada 1974 1986 - Apr lastSun 2:00 1:00 D +Rule Canada 1974 2006 - Oct lastSun 2:00 0 S +Rule Canada 1987 2006 - Apr Sun>=1 2:00 1:00 D +Rule Canada 2007 max - Mar Sun>=8 2:00 1:00 D +Rule Canada 2007 max - Nov Sun>=1 2:00 0 S + + +# Newfoundland and Labrador + +# From Paul Eggert (2000-10-02): +# Matthews and Vincent (1998) write that Labrador should use NST/NDT, +# but the only part of Labrador that follows the rules is the +# southeast corner, including Port Hope Simpson and Mary's Harbour, +# but excluding, say, Black Tickle. + +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule StJohns 1917 only - Apr 8 2:00 1:00 D +Rule StJohns 1917 only - Sep 17 2:00 0 S +# Whitman gives 1919 Apr 5 and 1920 Apr 5; go with Shanks & Pottenger. +Rule StJohns 1919 only - May 5 23:00 1:00 D +Rule StJohns 1919 only - Aug 12 23:00 0 S +# For 1931-1935 Whitman gives Apr same date; go with Shanks & Pottenger. +Rule StJohns 1920 1935 - May Sun>=1 23:00 1:00 D +Rule StJohns 1920 1935 - Oct lastSun 23:00 0 S +# For 1936-1941 Whitman gives May Sun>=8 and Oct Sun>=1; go with Shanks & +# Pottenger. +Rule StJohns 1936 1941 - May Mon>=9 0:00 1:00 D +Rule StJohns 1936 1941 - Oct Mon>=2 0:00 0 S +# Whitman gives the following transitions: +# 1942 03-01/12-31, 1943 05-30/09-05, 1944 07-10/09-02, 1945 01-01/10-07 +# but go with Shanks & Pottenger and assume they used Canadian rules. +# For 1946-9 Whitman gives May 5,4,9,1 - Oct 1,5,3,2, and for 1950 he gives +# Apr 30 - Sep 24; go with Shanks & Pottenger. +Rule StJohns 1946 1950 - May Sun>=8 2:00 1:00 D +Rule StJohns 1946 1950 - Oct Sun>=2 2:00 0 S +Rule StJohns 1951 1986 - Apr lastSun 2:00 1:00 D +Rule StJohns 1951 1959 - Sep lastSun 2:00 0 S +Rule StJohns 1960 1986 - Oct lastSun 2:00 0 S +# From Paul Eggert (2000-10-02): +# INMS (2000-09-12) says that, since 1988 at least, Newfoundland switches +# at 00:01 local time. For now, assume it started in 1987. + +# From Michael Pelley (2011-09-12): +# We received today, Monday, September 12, 2011, notification that the +# changes to the Newfoundland Standard Time Act have been proclaimed. +# The change in the Act stipulates that the change from Daylight Savings +# Time to Standard Time and from Standard Time to Daylight Savings Time +# now occurs at 2:00AM. +# ... +# http://www.assembly.nl.ca/legislation/sr/annualstatutes/2011/1106.chp.htm +# ... +# MICHAEL PELLEY | Manager of Enterprise Architecture - Solution Delivery +# Office of the Chief Information Officer +# Executive Council +# Government of Newfoundland & Labrador + +Rule StJohns 1987 only - Apr Sun>=1 0:01 1:00 D +Rule StJohns 1987 2006 - Oct lastSun 0:01 0 S +Rule StJohns 1988 only - Apr Sun>=1 0:01 2:00 DD +Rule StJohns 1989 2006 - Apr Sun>=1 0:01 1:00 D +Rule StJohns 2007 2011 - Mar Sun>=8 0:01 1:00 D +Rule StJohns 2007 2010 - Nov Sun>=1 0:01 0 S +# +# St John's has an apostrophe, but Posix file names can't have apostrophes. +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone America/St_Johns -3:30:52 - LMT 1884 + -3:30:52 StJohns N%sT 1918 + -3:30:52 Canada N%sT 1919 + -3:30:52 StJohns N%sT 1935 Mar 30 + -3:30 StJohns N%sT 1942 May 11 + -3:30 Canada N%sT 1946 + -3:30 StJohns N%sT 2011 Nov + -3:30 Canada N%sT + +# most of east Labrador + +# The name 'Happy Valley-Goose Bay' is too long; use 'Goose Bay'. +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone America/Goose_Bay -4:01:40 - LMT 1884 # Happy Valley-Goose Bay + -3:30:52 - NST 1918 + -3:30:52 Canada N%sT 1919 + -3:30:52 - NST 1935 Mar 30 + -3:30 - NST 1936 + -3:30 StJohns N%sT 1942 May 11 + -3:30 Canada N%sT 1946 + -3:30 StJohns N%sT 1966 Mar 15 2:00 + -4:00 StJohns A%sT 2011 Nov + -4:00 Canada A%sT + + +# west Labrador, Nova Scotia, Prince Edward I + +# From Brian Inglis (2015-07-20): +# From the historical weather station records available at: +# https://weatherspark.com/history/28351/1971/Sydney-Nova-Scotia-Canada +# Sydney shares the same time history as Glace Bay, so was +# likely to be the same across the island.... +# Sydney, as the capital and most populous location, or Cape Breton, would +# have been better names for the zone had we known this in 1996. + +# From Paul Eggert (2015-07-20): +# Shanks & Pottenger write that since 1970 most of this region has been like +# Halifax. Many locales did not observe peacetime DST until 1972; +# the Cape Breton area, represented by Glace Bay, is the largest we know of +# (Glace Bay was perhaps not the best name choice but no point changing now). +# Shanks & Pottenger also write that Liverpool, NS was the only town +# in Canada to observe DST in 1971 but not 1970; for now we'll assume +# this is a typo. + +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Halifax 1916 only - Apr 1 0:00 1:00 D +Rule Halifax 1916 only - Oct 1 0:00 0 S +Rule Halifax 1920 only - May 9 0:00 1:00 D +Rule Halifax 1920 only - Aug 29 0:00 0 S +Rule Halifax 1921 only - May 6 0:00 1:00 D +Rule Halifax 1921 1922 - Sep 5 0:00 0 S +Rule Halifax 1922 only - Apr 30 0:00 1:00 D +Rule Halifax 1923 1925 - May Sun>=1 0:00 1:00 D +Rule Halifax 1923 only - Sep 4 0:00 0 S +Rule Halifax 1924 only - Sep 15 0:00 0 S +Rule Halifax 1925 only - Sep 28 0:00 0 S +Rule Halifax 1926 only - May 16 0:00 1:00 D +Rule Halifax 1926 only - Sep 13 0:00 0 S +Rule Halifax 1927 only - May 1 0:00 1:00 D +Rule Halifax 1927 only - Sep 26 0:00 0 S +Rule Halifax 1928 1931 - May Sun>=8 0:00 1:00 D +Rule Halifax 1928 only - Sep 9 0:00 0 S +Rule Halifax 1929 only - Sep 3 0:00 0 S +Rule Halifax 1930 only - Sep 15 0:00 0 S +Rule Halifax 1931 1932 - Sep Mon>=24 0:00 0 S +Rule Halifax 1932 only - May 1 0:00 1:00 D +Rule Halifax 1933 only - Apr 30 0:00 1:00 D +Rule Halifax 1933 only - Oct 2 0:00 0 S +Rule Halifax 1934 only - May 20 0:00 1:00 D +Rule Halifax 1934 only - Sep 16 0:00 0 S +Rule Halifax 1935 only - Jun 2 0:00 1:00 D +Rule Halifax 1935 only - Sep 30 0:00 0 S +Rule Halifax 1936 only - Jun 1 0:00 1:00 D +Rule Halifax 1936 only - Sep 14 0:00 0 S +Rule Halifax 1937 1938 - May Sun>=1 0:00 1:00 D +Rule Halifax 1937 1941 - Sep Mon>=24 0:00 0 S +Rule Halifax 1939 only - May 28 0:00 1:00 D +Rule Halifax 1940 1941 - May Sun>=1 0:00 1:00 D +Rule Halifax 1946 1949 - Apr lastSun 2:00 1:00 D +Rule Halifax 1946 1949 - Sep lastSun 2:00 0 S +Rule Halifax 1951 1954 - Apr lastSun 2:00 1:00 D +Rule Halifax 1951 1954 - Sep lastSun 2:00 0 S +Rule Halifax 1956 1959 - Apr lastSun 2:00 1:00 D +Rule Halifax 1956 1959 - Sep lastSun 2:00 0 S +Rule Halifax 1962 1973 - Apr lastSun 2:00 1:00 D +Rule Halifax 1962 1973 - Oct lastSun 2:00 0 S +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone America/Halifax -4:14:24 - LMT 1902 Jun 15 + -4:00 Halifax A%sT 1918 + -4:00 Canada A%sT 1919 + -4:00 Halifax A%sT 1942 Feb 9 2:00s + -4:00 Canada A%sT 1946 + -4:00 Halifax A%sT 1974 + -4:00 Canada A%sT +Zone America/Glace_Bay -3:59:48 - LMT 1902 Jun 15 + -4:00 Canada A%sT 1953 + -4:00 Halifax A%sT 1954 + -4:00 - AST 1972 + -4:00 Halifax A%sT 1974 + -4:00 Canada A%sT + +# New Brunswick + +# From Paul Eggert (2007-01-31): +# The Time Definition Act <http://www.gnb.ca/0062/PDF-acts/t-06.pdf> +# says they changed at 00:01 through 2006, and +# <http://www.canlii.org/nb/laws/sta/t-6/20030127/whole.html> makes it +# clear that this was the case since at least 1993. +# For now, assume it started in 1993. + +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Moncton 1933 1935 - Jun Sun>=8 1:00 1:00 D +Rule Moncton 1933 1935 - Sep Sun>=8 1:00 0 S +Rule Moncton 1936 1938 - Jun Sun>=1 1:00 1:00 D +Rule Moncton 1936 1938 - Sep Sun>=1 1:00 0 S +Rule Moncton 1939 only - May 27 1:00 1:00 D +Rule Moncton 1939 1941 - Sep Sat>=21 1:00 0 S +Rule Moncton 1940 only - May 19 1:00 1:00 D +Rule Moncton 1941 only - May 4 1:00 1:00 D +Rule Moncton 1946 1972 - Apr lastSun 2:00 1:00 D +Rule Moncton 1946 1956 - Sep lastSun 2:00 0 S +Rule Moncton 1957 1972 - Oct lastSun 2:00 0 S +Rule Moncton 1993 2006 - Apr Sun>=1 0:01 1:00 D +Rule Moncton 1993 2006 - Oct lastSun 0:01 0 S +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone America/Moncton -4:19:08 - LMT 1883 Dec 9 + -5:00 - EST 1902 Jun 15 + -4:00 Canada A%sT 1933 + -4:00 Moncton A%sT 1942 + -4:00 Canada A%sT 1946 + -4:00 Moncton A%sT 1973 + -4:00 Canada A%sT 1993 + -4:00 Moncton A%sT 2007 + -4:00 Canada A%sT + +# Quebec + +# From Paul Eggert (2015-03-24): +# See America/Toronto for most of Quebec, including Montreal. +# +# Matthews and Vincent (1998) also write that Quebec east of the -63 +# meridian is supposed to observe AST, but residents as far east as +# Natashquan use EST/EDT, and residents east of Natashquan use AST. +# The Quebec department of justice writes in +# "The situation in Minganie and Basse-Côte-Nord" +# http://www.justice.gouv.qc.ca/english/publications/generale/temps-minganie-a.htm +# that the coastal strip from just east of Natashquan to Blanc-Sablon +# observes Atlantic standard time all year round. +# http://www.assnat.qc.ca/Media/Process.aspx?MediaId=ANQ.Vigie.Bll.DocumentGenerique_8845en +# says this common practice was codified into law as of 2007. +# For lack of better info, guess this practice began around 1970, contra to +# Shanks & Pottenger who have this region observing AST/ADT. + +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone America/Blanc-Sablon -3:48:28 - LMT 1884 + -4:00 Canada A%sT 1970 + -4:00 - AST + +# Ontario + +# From Paul Eggert (2006-07-09): +# Shanks & Pottenger write that since 1970 most of Ontario has been like +# Toronto. +# Thunder Bay skipped DST in 1973. +# Many smaller locales did not observe peacetime DST until 1974; +# Nipigon (EST) and Rainy River (CST) are the largest that we know of. +# Far west Ontario is like Winnipeg; far east Quebec is like Halifax. + +# From Mark Brader (2003-07-26): +# [According to the Toronto Star] Orillia, Ontario, adopted DST +# effective Saturday, 1912-06-22, 22:00; the article mentions that +# Port Arthur (now part of Thunder Bay, Ontario) as well as Moose Jaw +# have already done so. In Orillia DST was to run until Saturday, +# 1912-08-31 (no time mentioned), but it was met with considerable +# hostility from certain segments of the public, and was revoked after +# only two weeks - I copied it as Saturday, 1912-07-07, 22:00, but +# presumably that should be -07-06. (1912-06-19, -07-12; also letters +# earlier in June). +# +# Kenora, Ontario, was to abandon DST on 1914-06-01 (-05-21). + +# From Paul Eggert (1997-10-17): +# Mark Brader writes that an article in the 1997-10-14 Toronto Star +# says that Atikokan, Ontario currently does not observe DST, +# but will vote on 11-10 whether to use EST/EDT. +# He also writes that the Ontario Time Act (1990, Chapter T.9) +# http://www.gov.on.ca/MBS/english/publications/statregs/conttext.html +# says that Ontario east of 90W uses EST/EDT, and west of 90W uses CST/CDT. +# Officially Atikokan is therefore on CST/CDT, and most likely this report +# concerns a non-official time observed as a matter of local practice. +# +# From Paul Eggert (2000-10-02): +# Matthews and Vincent (1998) write that Atikokan, Pickle Lake, and +# New Osnaburgh observe CST all year, that Big Trout Lake observes +# CST/CDT, and that Upsala and Shebandowan observe EST/EDT, all in +# violation of the official Ontario rules. +# +# From Paul Eggert (2006-07-09): +# Chris Walton (2006-07-06) mentioned an article by Stephanie MacLellan in the +# 2005-07-21 Chronicle-Journal, which said: +# +# The clocks in Atikokan stay set on standard time year-round. +# This means they spend about half the time on central time and +# the other half on eastern time. +# +# For the most part, the system works, Mayor Dennis Brown said. +# +# "The majority of businesses in Atikokan deal more with Eastern +# Canada, but there are some that deal with Western Canada," he +# said. "I don't see any changes happening here." +# +# Walton also writes "Supposedly Pickle Lake and Mishkeegogamang +# [New Osnaburgh] follow the same practice." + +# From Garry McKinnon (2006-07-14) via Chris Walton: +# I chatted with a member of my board who has an outstanding memory +# and a long history in Atikokan (and in the telecom industry) and he +# can say for certain that Atikokan has been practicing the current +# time keeping since 1952, at least. + +# From Paul Eggert (2006-07-17): +# Shanks & Pottenger say that Atikokan has agreed with Rainy River +# ever since standard time was introduced, but the information from +# McKinnon sounds more authoritative. For now, assume that Atikokan +# switched to EST immediately after WWII era daylight saving time +# ended. This matches the old (less-populous) America/Coral_Harbour +# entry since our cutoff date of 1970, so we can move +# America/Coral_Harbour to the 'backward' file. + +# From Mark Brader (2010-03-06): +# +# Currently the database has: +# +# # Ontario +# +# # From Paul Eggert (2006-07-09): +# # Shanks & Pottenger write that since 1970 most of Ontario has been like +# # Toronto. +# # Thunder Bay skipped DST in 1973. +# # Many smaller locales did not observe peacetime DST until 1974; +# # Nipigon (EST) and Rainy River (CST) are the largest that we know of. +# +# In the (Toronto) Globe and Mail for Saturday, 1955-09-24, in the bottom +# right corner of page 1, it says that Toronto will return to standard +# time at 2 am Sunday morning (which agrees with the database), and that: +# +# The one-hour setback will go into effect throughout most of Ontario, +# except in areas like Windsor which remains on standard time all year. +# +# Windsor is, of course, a lot larger than Nipigon. +# +# I only came across this incidentally. I don't know if Windsor began +# observing DST when Detroit did, or in 1974, or on some other date. +# +# By the way, the article continues by noting that: +# +# Some cities in the United States have pushed the deadline back +# three weeks and will change over from daylight saving in October. + +# From Arthur David Olson (2010-07-17): +# +# "Standard Time and Time Zones in Canada" appeared in +# The Journal of The Royal Astronomical Society of Canada, +# volume 26, number 2 (February 1932) and, as of 2010-07-17, +# was available at +# http://adsabs.harvard.edu/full/1932JRASC..26...49S +# +# It includes the text below (starting on page 57): +# +# A list of the places in Canada using daylight saving time would +# require yearly revision. From information kindly furnished by +# the provincial governments and by the postmasters in many cities +# and towns, it is found that the following places used daylight sav- +# ing in 1930. The information for the province of Quebec is definite, +# for the other provinces only approximate: +# +# Province Daylight saving time used +# Prince Edward Island Not used. +# Nova Scotia In Halifax only. +# New Brunswick In St. John only. +# Quebec In the following places: +# Montreal Lachine +# Quebec Mont-Royal +# Lévis Iberville +# St. Lambert Cap de la Madelèine +# Verdun Loretteville +# Westmount Richmond +# Outremont St. Jérôme +# Longueuil Greenfield Park +# Arvida Waterloo +# Chambly-Canton Beaulieu +# Melbourne La Tuque +# St. Théophile Buckingham +# Ontario Used generally in the cities and towns along +# the southerly part of the province. Not +# used in the northwesterly part. +# Manitoba Not used. +# Saskatchewan In Regina only. +# Alberta Not used. +# British Columbia Not used. +# +# With some exceptions, the use of daylight saving may be said to be limited +# to those cities and towns lying between Quebec city and Windsor, Ont. + +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Toronto 1919 only - Mar 30 23:30 1:00 D +Rule Toronto 1919 only - Oct 26 0:00 0 S +Rule Toronto 1920 only - May 2 2:00 1:00 D +Rule Toronto 1920 only - Sep 26 0:00 0 S +Rule Toronto 1921 only - May 15 2:00 1:00 D +Rule Toronto 1921 only - Sep 15 2:00 0 S +Rule Toronto 1922 1923 - May Sun>=8 2:00 1:00 D +# Shanks & Pottenger say 1923-09-19; assume it's a typo and that "-16" +# was meant. +Rule Toronto 1922 1926 - Sep Sun>=15 2:00 0 S +Rule Toronto 1924 1927 - May Sun>=1 2:00 1:00 D +# The 1927-to-1939 rules can be expressed more simply as +# Rule Toronto 1927 1937 - Sep Sun>=25 2:00 0 S +# Rule Toronto 1928 1937 - Apr Sun>=25 2:00 1:00 D +# Rule Toronto 1938 1940 - Apr lastSun 2:00 1:00 D +# Rule Toronto 1938 1939 - Sep lastSun 2:00 0 S +# The rules below avoid use of Sun>=25 +# (which pre-2004 versions of zic cannot handle). +Rule Toronto 1927 1932 - Sep lastSun 2:00 0 S +Rule Toronto 1928 1931 - Apr lastSun 2:00 1:00 D +Rule Toronto 1932 only - May 1 2:00 1:00 D +Rule Toronto 1933 1940 - Apr lastSun 2:00 1:00 D +Rule Toronto 1933 only - Oct 1 2:00 0 S +Rule Toronto 1934 1939 - Sep lastSun 2:00 0 S +Rule Toronto 1945 1946 - Sep lastSun 2:00 0 S +Rule Toronto 1946 only - Apr lastSun 2:00 1:00 D +Rule Toronto 1947 1949 - Apr lastSun 0:00 1:00 D +Rule Toronto 1947 1948 - Sep lastSun 0:00 0 S +Rule Toronto 1949 only - Nov lastSun 0:00 0 S +Rule Toronto 1950 1973 - Apr lastSun 2:00 1:00 D +Rule Toronto 1950 only - Nov lastSun 2:00 0 S +Rule Toronto 1951 1956 - Sep lastSun 2:00 0 S +# Shanks & Pottenger say Toronto ended DST a week early in 1971, +# namely on 1971-10-24, but Mark Brader wrote (2003-05-31) that this +# is wrong, and that he had confirmed it by checking the 1971-10-30 +# Toronto Star, which said that DST was ending 1971-10-31 as usual. +Rule Toronto 1957 1973 - Oct lastSun 2:00 0 S + +# From Paul Eggert (2003-07-27): +# Willett (1914-03) writes (p. 17) "In the Cities of Fort William, and +# Port Arthur, Ontario, the principle of the Bill has been in +# operation for the past three years, and in the City of Moose Jaw, +# Saskatchewan, for one year." + +# From David Bryan via Tory Tronrud, Director/Curator, +# Thunder Bay Museum (2003-11-12): +# There is some suggestion, however, that, by-law or not, daylight +# savings time was being practiced in Fort William and Port Arthur +# before 1909.... [I]n 1910, the line between the Eastern and Central +# Time Zones was permanently moved about two hundred miles west to +# include the Thunder Bay area.... When Canada adopted daylight +# savings time in 1916, Fort William and Port Arthur, having done so +# already, did not change their clocks.... During the Second World +# War,... [t]he cities agreed to implement DST during the summer +# months for the remainder of the war years. + +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone America/Toronto -5:17:32 - LMT 1895 + -5:00 Canada E%sT 1919 + -5:00 Toronto E%sT 1942 Feb 9 2:00s + -5:00 Canada E%sT 1946 + -5:00 Toronto E%sT 1974 + -5:00 Canada E%sT +Zone America/Thunder_Bay -5:57:00 - LMT 1895 + -6:00 - CST 1910 + -5:00 - EST 1942 + -5:00 Canada E%sT 1970 + -5:00 Toronto E%sT 1973 + -5:00 - EST 1974 + -5:00 Canada E%sT +Zone America/Nipigon -5:53:04 - LMT 1895 + -5:00 Canada E%sT 1940 Sep 29 + -5:00 1:00 EDT 1942 Feb 9 2:00s + -5:00 Canada E%sT +Zone America/Rainy_River -6:18:16 - LMT 1895 + -6:00 Canada C%sT 1940 Sep 29 + -6:00 1:00 CDT 1942 Feb 9 2:00s + -6:00 Canada C%sT +Zone America/Atikokan -6:06:28 - LMT 1895 + -6:00 Canada C%sT 1940 Sep 29 + -6:00 1:00 CDT 1942 Feb 9 2:00s + -6:00 Canada C%sT 1945 Sep 30 2:00 + -5:00 - EST + + +# Manitoba + +# From Rob Douglas (2006-04-06): +# the old Manitoba Time Act - as amended by Bill 2, assented to +# March 27, 1987 ... said ... +# "between two o'clock Central Standard Time in the morning of +# the first Sunday of April of each year and two o'clock Central +# Standard Time in the morning of the last Sunday of October next +# following, one hour in advance of Central Standard Time."... +# I believe that the English legislation [of the old time act] had +# been assented to (March 22, 1967).... +# Also, as far as I can tell, there was no order-in-council varying +# the time of Daylight Saving Time for 2005 and so the provisions of +# the 1987 version would apply - the changeover was at 2:00 Central +# Standard Time (i.e. not until 3:00 Central Daylight Time). + +# From Paul Eggert (2006-04-10): +# Shanks & Pottenger say Manitoba switched at 02:00 (not 02:00s) +# starting 1966. Since 02:00s is clearly correct for 1967 on, assume +# it was also 02:00s in 1966. + +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Winn 1916 only - Apr 23 0:00 1:00 D +Rule Winn 1916 only - Sep 17 0:00 0 S +Rule Winn 1918 only - Apr 14 2:00 1:00 D +Rule Winn 1918 only - Oct 27 2:00 0 S +Rule Winn 1937 only - May 16 2:00 1:00 D +Rule Winn 1937 only - Sep 26 2:00 0 S +Rule Winn 1942 only - Feb 9 2:00 1:00 W # War +Rule Winn 1945 only - Aug 14 23:00u 1:00 P # Peace +Rule Winn 1945 only - Sep lastSun 2:00 0 S +Rule Winn 1946 only - May 12 2:00 1:00 D +Rule Winn 1946 only - Oct 13 2:00 0 S +Rule Winn 1947 1949 - Apr lastSun 2:00 1:00 D +Rule Winn 1947 1949 - Sep lastSun 2:00 0 S +Rule Winn 1950 only - May 1 2:00 1:00 D +Rule Winn 1950 only - Sep 30 2:00 0 S +Rule Winn 1951 1960 - Apr lastSun 2:00 1:00 D +Rule Winn 1951 1958 - Sep lastSun 2:00 0 S +Rule Winn 1959 only - Oct lastSun 2:00 0 S +Rule Winn 1960 only - Sep lastSun 2:00 0 S +Rule Winn 1963 only - Apr lastSun 2:00 1:00 D +Rule Winn 1963 only - Sep 22 2:00 0 S +Rule Winn 1966 1986 - Apr lastSun 2:00s 1:00 D +Rule Winn 1966 2005 - Oct lastSun 2:00s 0 S +Rule Winn 1987 2005 - Apr Sun>=1 2:00s 1:00 D +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone America/Winnipeg -6:28:36 - LMT 1887 Jul 16 + -6:00 Winn C%sT 2006 + -6:00 Canada C%sT + + +# Saskatchewan + +# From Mark Brader (2003-07-26): +# The first actual adoption of DST in Canada was at the municipal +# level. As the [Toronto] Star put it (1912-06-07), "While people +# elsewhere have long been talking of legislation to save daylight, +# the city of Moose Jaw [Saskatchewan] has acted on its own hook." +# DST in Moose Jaw began on Saturday, 1912-06-01 (no time mentioned: +# presumably late evening, as below), and would run until "the end of +# the summer". The discrepancy between municipal time and railroad +# time was noted. + +# From Paul Eggert (2003-07-27): +# Willett (1914-03) notes that DST "has been in operation ... in the +# City of Moose Jaw, Saskatchewan, for one year." + +# From Paul Eggert (2006-03-22): +# Shanks & Pottenger say that since 1970 this region has mostly been as Regina. +# Some western towns (e.g. Swift Current) switched from MST/MDT to CST in 1972. +# Other western towns (e.g. Lloydminster) are like Edmonton. +# Matthews and Vincent (1998) write that Denare Beach and Creighton +# are like Winnipeg, in violation of Saskatchewan law. + +# From W. Jones (1992-11-06): +# The. . .below is based on information I got from our law library, the +# provincial archives, and the provincial Community Services department. +# A precise history would require digging through newspaper archives, and +# since you didn't say what you wanted, I didn't bother. +# +# Saskatchewan is split by a time zone meridian (105W) and over the years +# the boundary became pretty ragged as communities near it reevaluated +# their affiliations in one direction or the other. In 1965 a provincial +# referendum favoured legislating common time practices. +# +# On 15 April 1966 the Time Act (c. T-14, Revised Statutes of +# Saskatchewan 1978) was proclaimed, and established that the eastern +# part of Saskatchewan would use CST year round, that districts in +# northwest Saskatchewan would by default follow CST but could opt to +# follow Mountain Time rules (thus 1 hour difference in the winter and +# zero in the summer), and that districts in southwest Saskatchewan would +# by default follow MT but could opt to follow CST. +# +# It took a few years for the dust to settle (I know one story of a town +# on one time zone having its school in another, such that a mom had to +# serve her family lunch in two shifts), but presently it seems that only +# a few towns on the border with Alberta (e.g. Lloydminster) follow MT +# rules any more; all other districts appear to have used CST year round +# since sometime in the 1960s. + +# From Chris Walton (2006-06-26): +# The Saskatchewan time act which was last updated in 1996 is about 30 pages +# long and rather painful to read. +# http://www.qp.gov.sk.ca/documents/English/Statutes/Statutes/T14.pdf + +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Regina 1918 only - Apr 14 2:00 1:00 D +Rule Regina 1918 only - Oct 27 2:00 0 S +Rule Regina 1930 1934 - May Sun>=1 0:00 1:00 D +Rule Regina 1930 1934 - Oct Sun>=1 0:00 0 S +Rule Regina 1937 1941 - Apr Sun>=8 0:00 1:00 D +Rule Regina 1937 only - Oct Sun>=8 0:00 0 S +Rule Regina 1938 only - Oct Sun>=1 0:00 0 S +Rule Regina 1939 1941 - Oct Sun>=8 0:00 0 S +Rule Regina 1942 only - Feb 9 2:00 1:00 W # War +Rule Regina 1945 only - Aug 14 23:00u 1:00 P # Peace +Rule Regina 1945 only - Sep lastSun 2:00 0 S +Rule Regina 1946 only - Apr Sun>=8 2:00 1:00 D +Rule Regina 1946 only - Oct Sun>=8 2:00 0 S +Rule Regina 1947 1957 - Apr lastSun 2:00 1:00 D +Rule Regina 1947 1957 - Sep lastSun 2:00 0 S +Rule Regina 1959 only - Apr lastSun 2:00 1:00 D +Rule Regina 1959 only - Oct lastSun 2:00 0 S +# +Rule Swift 1957 only - Apr lastSun 2:00 1:00 D +Rule Swift 1957 only - Oct lastSun 2:00 0 S +Rule Swift 1959 1961 - Apr lastSun 2:00 1:00 D +Rule Swift 1959 only - Oct lastSun 2:00 0 S +Rule Swift 1960 1961 - Sep lastSun 2:00 0 S +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone America/Regina -6:58:36 - LMT 1905 Sep + -7:00 Regina M%sT 1960 Apr lastSun 2:00 + -6:00 - CST +Zone America/Swift_Current -7:11:20 - LMT 1905 Sep + -7:00 Canada M%sT 1946 Apr lastSun 2:00 + -7:00 Regina M%sT 1950 + -7:00 Swift M%sT 1972 Apr lastSun 2:00 + -6:00 - CST + + +# Alberta + +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Edm 1918 1919 - Apr Sun>=8 2:00 1:00 D +Rule Edm 1918 only - Oct 27 2:00 0 S +Rule Edm 1919 only - May 27 2:00 0 S +Rule Edm 1920 1923 - Apr lastSun 2:00 1:00 D +Rule Edm 1920 only - Oct lastSun 2:00 0 S +Rule Edm 1921 1923 - Sep lastSun 2:00 0 S +Rule Edm 1942 only - Feb 9 2:00 1:00 W # War +Rule Edm 1945 only - Aug 14 23:00u 1:00 P # Peace +Rule Edm 1945 only - Sep lastSun 2:00 0 S +Rule Edm 1947 only - Apr lastSun 2:00 1:00 D +Rule Edm 1947 only - Sep lastSun 2:00 0 S +Rule Edm 1967 only - Apr lastSun 2:00 1:00 D +Rule Edm 1967 only - Oct lastSun 2:00 0 S +Rule Edm 1969 only - Apr lastSun 2:00 1:00 D +Rule Edm 1969 only - Oct lastSun 2:00 0 S +Rule Edm 1972 1986 - Apr lastSun 2:00 1:00 D +Rule Edm 1972 2006 - Oct lastSun 2:00 0 S +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone America/Edmonton -7:33:52 - LMT 1906 Sep + -7:00 Edm M%sT 1987 + -7:00 Canada M%sT + + +# British Columbia + +# From Paul Eggert (2006-03-22): +# Shanks & Pottenger write that since 1970 most of this region has +# been like Vancouver. +# Dawson Creek uses MST. Much of east BC is like Edmonton. +# Matthews and Vincent (1998) write that Creston is like Dawson Creek. + +# It seems though that (re: Creston) is not entirely correct: + +# From Chris Walton (2011-12-01): +# There are two areas within the Canadian province of British Columbia +# that do not currently observe daylight saving: +# a) The Creston Valley (includes the town of Creston and surrounding area) +# b) The eastern half of the Peace River Regional District +# (includes the cities of Dawson Creek and Fort St. John) + +# Earlier this year I stumbled across a detailed article about the time +# keeping history of Creston; it was written by Tammy Hardwick who is the +# manager of the Creston & District Museum. The article was written in May 2009. +# http://www.ilovecreston.com/?p=articles&t=spec&ar=260 +# According to the article, Creston has not changed its clocks since June 1918. +# i.e. Creston has been stuck on UTC-7 for 93 years. +# Dawson Creek, on the other hand, changed its clocks as recently as April 1972. + +# Unfortunately the exact date for the time change in June 1918 remains +# unknown and will be difficult to ascertain. I e-mailed Tammy a few months +# ago to ask if Sunday June 2 was a reasonable guess. She said it was just +# as plausible as any other date (in June). She also said that after writing +# the article she had discovered another time change in 1916; this is the +# subject of another article which she wrote in October 2010. +# http://www.creston.museum.bc.ca/index.php?module=comments&uop=view_comment&cm+id=56 + +# Here is a summary of the three clock change events in Creston's history: +# 1. 1884 or 1885: adoption of Mountain Standard Time (GMT-7) +# Exact date unknown +# 2. Oct 1916: switch to Pacific Standard Time (GMT-8) +# Exact date in October unknown; Sunday October 1 is a reasonable guess. +# 3. June 1918: switch to Pacific Daylight Time (GMT-7) +# Exact date in June unknown; Sunday June 2 is a reasonable guess. +# note 1: +# On Oct 27/1918 when daylight saving ended in the rest of Canada, +# Creston did not change its clocks. +# note 2: +# During WWII when the Federal Government legislated a mandatory clock change, +# Creston did not oblige. +# note 3: +# There is no guarantee that Creston will remain on Mountain Standard Time +# (UTC-7) forever. +# The subject was debated at least once this year by the town Council. +# http://www.bclocalnews.com/kootenay_rockies/crestonvalleyadvance/news/116760809.html + +# During a period WWII, summer time (Daylight saying) was mandatory in Canada. +# In Creston, that was handled by shifting the area to PST (-8:00) then applying +# summer time to cause the offset to be -7:00, the same as it had been before +# the change. It can be argued that the timezone abbreviation during this +# period should be PDT rather than MST, but that doesn't seem important enough +# (to anyone) to further complicate the rules. + +# The transition dates (and times) are guesses. + +# From Matt Johnson (2015-09-21): +# Fort Nelson, BC, Canada will cancel DST this year. So while previously they +# were aligned with America/Vancouver, they're now aligned with +# America/Dawson_Creek. +# http://www.northernrockies.ca/EN/meta/news/archives/2015/northern-rockies-time-change.html +# +# From Tim Parenti (2015-09-23): +# This requires a new zone for the Northern Rockies Regional Municipality, +# America/Fort_Nelson. The resolution of 2014-12-08 was reached following a +# 2014-11-15 poll with nearly 75% support. Effectively, the municipality has +# been on MST (-0700) like Dawson Creek since it advanced its clocks on +# 2015-03-08. +# +# From Paul Eggert (2015-09-23): +# Shanks says Fort Nelson did not observe DST in 1946, unlike Vancouver. + +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Vanc 1918 only - Apr 14 2:00 1:00 D +Rule Vanc 1918 only - Oct 27 2:00 0 S +Rule Vanc 1942 only - Feb 9 2:00 1:00 W # War +Rule Vanc 1945 only - Aug 14 23:00u 1:00 P # Peace +Rule Vanc 1945 only - Sep 30 2:00 0 S +Rule Vanc 1946 1986 - Apr lastSun 2:00 1:00 D +Rule Vanc 1946 only - Oct 13 2:00 0 S +Rule Vanc 1947 1961 - Sep lastSun 2:00 0 S +Rule Vanc 1962 2006 - Oct lastSun 2:00 0 S +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone America/Vancouver -8:12:28 - LMT 1884 + -8:00 Vanc P%sT 1987 + -8:00 Canada P%sT +Zone America/Dawson_Creek -8:00:56 - LMT 1884 + -8:00 Canada P%sT 1947 + -8:00 Vanc P%sT 1972 Aug 30 2:00 + -7:00 - MST +Zone America/Fort_Nelson -8:10:47 - LMT 1884 + -8:00 Vanc P%sT 1946 + -8:00 - PST 1947 + -8:00 Vanc P%sT 1987 + -8:00 Canada P%sT 2015 Mar 8 2:00 + -7:00 - MST +Zone America/Creston -7:46:04 - LMT 1884 + -7:00 - MST 1916 Oct 1 + -8:00 - PST 1918 Jun 2 + -7:00 - MST + +# Northwest Territories, Nunavut, Yukon + +# From Paul Eggert (2006-03-22): +# Dawson switched to PST in 1973. Inuvik switched to MST in 1979. +# Mathew Englander (1996-10-07) gives the following refs: +# * 1967. Paragraph 28(34)(g) of the Interpretation Act, S.C. 1967-68, +# c. 7 defines Yukon standard time as UTC-9.... +# see Interpretation Act, R.S.C. 1985, c. I-21, s. 35(1). +# [http://canlii.ca/t/7vhg] +# * C.O. 1973/214 switched Yukon to PST on 1973-10-28 00:00. +# * O.I.C. 1980/02 established DST. +# * O.I.C. 1987/056 changed DST to Apr firstSun 2:00 to Oct lastSun 2:00. + +# From Brian Inglis (2015-04-14): +# +# I tried to trace the history of Yukon time and found the following +# regulations, giving the reference title and URL if found, regulation name, +# and relevant quote if available. Each regulation specifically revokes its +# predecessor. The final reference is to the current Interpretation Act +# authorizing and resulting from these regulatory changes. +# +# Only recent regulations were retrievable via Yukon government site search or +# index, and only some via Canadian legal sources. Other sources used include +# articles titled "Standard Time and Time Zones in Canada" from JRASC via ADS +# Abstracts, cited by ADO for 1932 ..., and updated versions from 1958 and +# 1970 quoted below; each article includes current extracts from provincial +# and territorial ST and DST regulations at the end, summaries and details of +# standard times and daylight saving time at many locations across Canada, +# with time zone maps, tables and calculations for Canadian Sunrise, Sunset, +# and LMST; they also cover many countries and global locations, with a chart +# and table showing current Universal Time offsets, and may be useful as +# another source of information for 1970 and earlier. +# +# * Standard Time and Time Zones in Canada; Smith, C.C.; JRASC, Vol. 26, +# pp.49-77; February 1932; SAO/NASA Astrophysics Data System (ADS) +# http://adsabs.harvard.edu/abs/1932JRASC..26...49S from p.75: +# Yukon Interpretation Ordinance +# Yukon standard time is the local mean time at the one hundred and +# thirty-fifth meridian. +# +# * Standard Time and Time Zones in Canada; Smith, C.C.; Thomson, Malcolm M.; +# JRASC, Vol. 52, pp.193-223; October 1958; SAO/NASA Astrophysics Data System +# (ADS) http://adsabs.harvard.edu/abs/1958JRASC..52..193S from pp.220-1: +# Yukon Interpretation Ordinance, 1955, Chap. 16. +# +# (1) Subject to this section, standard time shall be reckoned as nine +# hours behind Greenwich Time and called Yukon Standard Time. +# +# (2) Notwithstanding subsection (1), the Commissioner may make regulations +# varying the manner of reckoning standard time. +# +# * Yukon Territory Commissioner's Order 1966-20 Interpretation Ordinance +# http://? - no online source found +# +# * Standard Time and Time Zones in Canada; Thomson, Malcolm M.; JRASC, +# Vol. 64, pp.129-162; June 1970; SAO/NASA Astrophysics Data System (ADS) +# http://adsabs.harvard.edu/abs/1970JRASC..64..129T from p.156: Yukon +# Territory Commissioner's Order 1967-59 Interpretation Ordinance ... +# +# 1. Commissioner's Order 1966-20 dated at Whitehorse in the Yukon +# Territory on 27th January, 1966, is hereby revoked. +# +# 2. Yukon (East) Standard Time as defined by section 36 of the +# Interpretation Ordinance from and after mid-night on the 28th day of May, +# 1967 shall be reckoned in the same manner as Pacific Standard Time, that +# is to say, eight hours behind Greenwich Time in the area of the Yukon +# Territory lying east of the 138th degree longitude west. +# +# 3. In the remainder of the Territory, lying west of the 138th degree +# longitude west, Yukon (West) Standard Time shall be reckoned as nine +# hours behind Greenwich Time. +# +# * Yukon Standard Time defined as Pacific Standard Time, YCO 1973/214 +# http://www.canlii.org/en/yk/laws/regu/yco-1973-214/latest/yco-1973-214.html +# C.O. 1973/214 INTERPRETATION ACT ... +# +# 1. Effective October 28, 1973 Commissioner's Order 1967/59 is hereby +# revoked. +# +# 2. Yukon Standard Time as defined by section 36 of the Interpretation +# Act from and after midnight on the twenty-eighth day of October, 1973 +# shall be reckoned in the same manner as Pacific Standard Time, that is +# to say eight hours behind Greenwich Time. +# +# * O.I.C. 1980/02 INTERPRETATION ACT +# http://? - no online source found +# +# * Yukon Daylight Saving Time, YOIC 1987/56 +# http://www.canlii.org/en/yk/laws/regu/yoic-1987-56/latest/yoic-1987-56.html +# O.I.C. 1987/056 INTERPRETATION ACT ... +# +# In every year between +# (a) two o'clock in the morning in the first Sunday in April, and +# (b) two o'clock in the morning in the last Sunday in October, +# Standard Time shall be reckoned as seven hours behind Greenwich Time and +# called Yukon Daylight Saving Time. +# ... +# Dated ... 9th day of March, A.D., 1987. +# +# * Yukon Daylight Saving Time 2006, YOIC 2006/127 +# http://www.canlii.org/en/yk/laws/regu/yoic-2006-127/latest/yoic-2006-127.html +# O.I.C. 2006/127 INTERPRETATION ACT ... +# +# 1. In Yukon each year the time for general purposes shall be 7 hours +# behind Greenwich mean time during the period commencing at two o'clock +# in the forenoon on the second Sunday of March and ending at two o'clock +# in the forenoon on the first Sunday of November and shall be called +# Yukon Daylight Saving Time. +# +# 2. Order-in-Council 1987/56 is revoked. +# +# 3. This order comes into force January 1, 2007. +# +# * Interpretation Act, RSY 2002, c 125 +# http://www.canlii.org/en/yk/laws/stat/rsy-2002-c-125/latest/rsy-2002-c-125.html + +# From Rives McDow (1999-09-04): +# Nunavut ... moved ... to incorporate the whole territory into one time zone. +# Nunavut moves to single time zone Oct. 31 +# http://www.nunatsiaq.com/nunavut/nvt90903_13.html +# +# From Antoine Leca (1999-09-06): +# We then need to create a new timezone for the Kitikmeot region of Nunavut +# to differentiate it from the Yellowknife region. + +# From Paul Eggert (1999-09-20): +# Basic Facts: The New Territory +# http://www.nunavut.com/basicfacts/english/basicfacts_1territory.html +# (1999) reports that Pangnirtung operates on eastern time, +# and that Coral Harbour does not observe DST. We don't know when +# Pangnirtung switched to eastern time; we'll guess 1995. + +# From Rives McDow (1999-11-08): +# On October 31, when the rest of Nunavut went to Central time, +# Pangnirtung wobbled. Here is the result of their wobble: +# +# The following businesses and organizations in Pangnirtung use Central Time: +# +# First Air, Power Corp, Nunavut Construction, Health Center, RCMP, +# Eastern Arctic National Parks, A & D Specialist +# +# The following businesses and organizations in Pangnirtung use Eastern Time: +# +# Hamlet office, All other businesses, Both schools, Airport operator +# +# This has made for an interesting situation there, which warranted the news. +# No one there that I spoke with seems concerned, or has plans to +# change the local methods of keeping time, as it evidently does not +# really interfere with any activities or make things difficult locally. +# They plan to celebrate New Year's turn-over twice, one hour apart, +# so it appears that the situation will last at least that long. +# The Nunavut Intergovernmental Affairs hopes that they will "come to +# their senses", but the locals evidently don't see any problem with +# the current state of affairs. + +# From Michaela Rodrigue, writing in the +# Nunatsiaq News (1999-11-19): +# http://www.nunatsiaq.com/archives/nunavut991130/nvt91119_17.html +# Clyde River, Pangnirtung and Sanikiluaq now operate with two time zones, +# central - or Nunavut time - for government offices, and eastern time +# for municipal offices and schools.... Igloolik [was similar but then] +# made the switch to central time on Saturday, Nov. 6. + +# From Paul Eggert (2000-10-02): +# Matthews and Vincent (1998) say the following, but we lack histories +# for these potential new Zones. +# +# The Canadian Forces station at Alert uses Eastern Time while the +# handful of residents at the Eureka weather station [in the Central +# zone] skip daylight savings. Baffin Island, which is crossed by the +# Central, Eastern and Atlantic Time zones only uses Eastern Time. +# Gjoa Haven, Taloyoak and Pelly Bay all use Mountain instead of +# Central Time and Southampton Island [in the Central zone] is not +# required to use daylight savings. + +# From <http://www.nunatsiaq.com/archives/nunavut001130/nvt21110_02.html> +# Nunavut now has two time zones (2000-11-10): +# The Nunavut government would allow its employees in Kugluktuk and +# Cambridge Bay to operate on central time year-round, putting them +# one hour behind the rest of Nunavut for six months during the winter. +# At the end of October the two communities had rebelled against +# Nunavut's unified time zone, refusing to shift to eastern time with +# the rest of the territory for the winter. Cambridge Bay remained on +# central time, while Kugluktuk, even farther west, reverted to +# mountain time, which they had used before the advent of Nunavut's +# unified time zone in 1999. +# +# From Rives McDow (2001-01-20), quoting the Nunavut government: +# The preceding decision came into effect at midnight, Saturday Nov 4, 2000. + +# From Paul Eggert (2000-12-04): +# Let's just keep track of the official times for now. + +# From Rives McDow (2001-03-07): +# The premier of Nunavut has issued a ministerial statement advising +# that effective 2001-04-01, the territory of Nunavut will revert +# back to three time zones (mountain, central, and eastern). Of the +# cities in Nunavut, Coral Harbor is the only one that I know of that +# has said it will not observe dst, staying on EST year round. I'm +# checking for more info, and will get back to you if I come up with +# more. +# [Also see <http://www.nunatsiaq.com/nunavut/nvt10309_06.html> (2001-03-09).] + +# From Gwillim Law (2005-05-21): +# According to ... +# http://www.canadiangeographic.ca/Magazine/SO98/geomap.asp +# (from a 1998 Canadian Geographic article), the de facto and de jure time +# for Southampton Island (at the north end of Hudson Bay) is UTC-5 all year +# round. Using Google, it's easy to find other websites that confirm this. +# I wasn't able to find how far back this time regimen goes, but since it +# predates the creation of Nunavut, it probably goes back many years.... +# The Inuktitut name of Coral Harbour is Sallit, but it's rarely used. +# +# From Paul Eggert (2014-10-17): +# For lack of better information, assume that Southampton Island observed +# daylight saving only during wartime. Gwillim Law's email also +# mentioned maps now maintained by National Research Council Canada; +# see above for an up-to-date link. + +# From Chris Walton (2007-03-01): +# ... the community of Resolute (located on Cornwallis Island in +# Nunavut) moved from Central Time to Eastern Time last November. +# Basically the community did not change its clocks at the end of +# daylight saving.... +# http://www.nnsl.com/frames/newspapers/2006-11/nov13_06none.html + +# From Chris Walton (2011-03-21): +# Back in 2007 I initiated the creation of a new "zone file" for Resolute +# Bay. Resolute Bay is a small community located about 900km north of +# the Arctic Circle. The zone file was required because Resolute Bay had +# decided to use UTC-5 instead of UTC-6 for the winter of 2006-2007. +# +# According to new information which I received last week, Resolute Bay +# went back to using UTC-6 in the winter of 2007-2008... +# +# On March 11/2007 most of Canada went onto daylight saving. On March +# 14/2007 I phoned the Resolute Bay hamlet office to do a "time check." I +# talked to somebody that was both knowledgeable and helpful. I was able +# to confirm that Resolute Bay was still operating on UTC-5. It was +# explained to me that Resolute Bay had been on the Eastern Time zone +# (EST) in the winter, and was now back on the Central Time zone (CDT). +# i.e. the time zone had changed twice in the last year but the clocks +# had not moved. The residents had to know which time zone they were in +# so they could follow the correct TV schedule... +# +# On Nov 02/2008 most of Canada went onto standard time. On Nov 03/2008 I +# phoned the Resolute Bay hamlet office...[D]ue to the challenging nature +# of the phone call, I decided to seek out an alternate source of +# information. I found an e-mail address for somebody by the name of +# Stephanie Adams whose job was listed as "Inns North Support Officer for +# Arctic Co-operatives." I was under the impression that Stephanie lived +# and worked in Resolute Bay... +# +# On March 14/2011 I phoned the hamlet office again. I was told that +# Resolute Bay had been using Central Standard Time over the winter of +# 2010-2011 and that the clocks had therefore been moved one hour ahead +# on March 13/2011. The person I talked to was aware that Resolute Bay +# had previously experimented with Eastern Standard Time but he could not +# tell me when the practice had stopped. +# +# On March 17/2011 I searched the Web to find an e-mail address of +# somebody that might be able to tell me exactly when Resolute Bay went +# off Eastern Standard Time. I stumbled on the name "Aziz Kheraj." Aziz +# used to be the mayor of Resolute Bay and he apparently owns half the +# businesses including "South Camp Inn." This website has some info on +# Aziz: +# http://www.uphere.ca/node/493 +# +# I sent Aziz an e-mail asking when Resolute Bay had stopped using +# Eastern Standard Time. +# +# Aziz responded quickly with this: "hi, The time was not changed for the +# 1 year only, the following year, the community went back to the old way +# of "spring ahead-fall behind" currently we are zulu plus 5 hrs and in +# the winter Zulu plus 6 hrs" +# +# This of course conflicted with everything I had ascertained in November 2008. +# +# I sent Aziz a copy of my 2008 e-mail exchange with Stephanie. Aziz +# responded with this: "Hi, Stephanie lives in Winnipeg. I live here, You +# may want to check with the weather office in Resolute Bay or do a +# search on the weather through Env. Canada. web site" +# +# If I had realized the Stephanie did not live in Resolute Bay I would +# never have contacted her. I now believe that all the information I +# obtained in November 2008 should be ignored... +# I apologize for reporting incorrect information in 2008. + +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule NT_YK 1918 only - Apr 14 2:00 1:00 D +Rule NT_YK 1918 only - Oct 27 2:00 0 S +Rule NT_YK 1919 only - May 25 2:00 1:00 D +Rule NT_YK 1919 only - Nov 1 0:00 0 S +Rule NT_YK 1942 only - Feb 9 2:00 1:00 W # War +Rule NT_YK 1945 only - Aug 14 23:00u 1:00 P # Peace +Rule NT_YK 1945 only - Sep 30 2:00 0 S +Rule NT_YK 1965 only - Apr lastSun 0:00 2:00 DD +Rule NT_YK 1965 only - Oct lastSun 2:00 0 S +Rule NT_YK 1980 1986 - Apr lastSun 2:00 1:00 D +Rule NT_YK 1980 2006 - Oct lastSun 2:00 0 S +Rule NT_YK 1987 2006 - Apr Sun>=1 2:00 1:00 D +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# aka Panniqtuuq +Zone America/Pangnirtung 0 - -00 1921 # trading post est. + -4:00 NT_YK A%sT 1995 Apr Sun>=1 2:00 + -5:00 Canada E%sT 1999 Oct 31 2:00 + -6:00 Canada C%sT 2000 Oct 29 2:00 + -5:00 Canada E%sT +# formerly Frobisher Bay +Zone America/Iqaluit 0 - -00 1942 Aug # Frobisher Bay est. + -5:00 NT_YK E%sT 1999 Oct 31 2:00 + -6:00 Canada C%sT 2000 Oct 29 2:00 + -5:00 Canada E%sT +# aka Qausuittuq +Zone America/Resolute 0 - -00 1947 Aug 31 # Resolute founded + -6:00 NT_YK C%sT 2000 Oct 29 2:00 + -5:00 - EST 2001 Apr 1 3:00 + -6:00 Canada C%sT 2006 Oct 29 2:00 + -5:00 - EST 2007 Mar 11 3:00 + -6:00 Canada C%sT +# aka Kangiqiniq +Zone America/Rankin_Inlet 0 - -00 1957 # Rankin Inlet founded + -6:00 NT_YK C%sT 2000 Oct 29 2:00 + -5:00 - EST 2001 Apr 1 3:00 + -6:00 Canada C%sT +# aka Iqaluktuuttiaq +Zone America/Cambridge_Bay 0 - -00 1920 # trading post est.? + -7:00 NT_YK M%sT 1999 Oct 31 2:00 + -6:00 Canada C%sT 2000 Oct 29 2:00 + -5:00 - EST 2000 Nov 5 0:00 + -6:00 - CST 2001 Apr 1 3:00 + -7:00 Canada M%sT +Zone America/Yellowknife 0 - -00 1935 # Yellowknife founded? + -7:00 NT_YK M%sT 1980 + -7:00 Canada M%sT +Zone America/Inuvik 0 - -00 1953 # Inuvik founded + -8:00 NT_YK P%sT 1979 Apr lastSun 2:00 + -7:00 NT_YK M%sT 1980 + -7:00 Canada M%sT +Zone America/Whitehorse -9:00:12 - LMT 1900 Aug 20 + -9:00 NT_YK Y%sT 1967 May 28 0:00 + -8:00 NT_YK P%sT 1980 + -8:00 Canada P%sT +Zone America/Dawson -9:17:40 - LMT 1900 Aug 20 + -9:00 NT_YK Y%sT 1973 Oct 28 0:00 + -8:00 NT_YK P%sT 1980 + -8:00 Canada P%sT + + +############################################################################### + +# Mexico + +# From Paul Eggert (2014-12-07): +# The Investigation and Analysis Service of the +# Mexican Library of Congress (MLoC) has published a +# history of Mexican local time (in Spanish) +# http://www.diputados.gob.mx/bibliot/publica/inveyana/polisoc/horver/index.htm +# +# Here are the discrepancies between Shanks & Pottenger (S&P) and the MLoC. +# (In all cases we go with the MLoC.) +# S&P report that Baja was at -8:00 in 1922/1923. +# S&P say the 1930 transition in Baja was 1930-11-16. +# S&P report no DST during summer 1931. +# S&P report a transition at 1932-03-30 23:00, not 1932-04-01. + +# From Gwillim Law (2001-02-20): +# There are some other discrepancies between the Decrees page and the +# tz database. I think they can best be explained by supposing that +# the researchers who prepared the Decrees page failed to find some of +# the relevant documents. + +# From Alan Perry (1996-02-15): +# A guy from our Mexico subsidiary finally found the Presidential Decree +# outlining the timezone changes in Mexico. +# +# ------------- Begin Forwarded Message ------------- +# +# I finally got my hands on the Official Presidential Decree that sets up the +# rules for the DST changes. The rules are: +# +# 1. The country is divided in 3 timezones: +# - Baja California Norte (the Mexico/BajaNorte TZ) +# - Baja California Sur, Nayarit, Sinaloa and Sonora (the Mexico/BajaSur TZ) +# - The rest of the country (the Mexico/General TZ) +# +# 2. From the first Sunday in April at 2:00 AM to the last Sunday in October +# at 2:00 AM, the times in each zone are as follows: +# BajaNorte: GMT+7 +# BajaSur: GMT+6 +# General: GMT+5 +# +# 3. The rest of the year, the times are as follows: +# BajaNorte: GMT+8 +# BajaSur: GMT+7 +# General: GMT+6 +# +# The Decree was published in Mexico's Official Newspaper on January 4th. +# +# -------------- End Forwarded Message -------------- +# From Paul Eggert (1996-06-12): +# For an English translation of the decree, see +# "Diario Oficial: Time Zone Changeover" (1996-01-04). +# http://mexico-travel.com/extra/timezone_eng.html + +# From Rives McDow (1998-10-08): +# The State of Quintana Roo has reverted back to central STD and DST times +# (i.e. UTC -0600 and -0500 as of 1998-08-02). + +# From Rives McDow (2000-01-10): +# Effective April 4, 1999 at 2:00 AM local time, Sonora changed to the time +# zone 5 hours from the International Date Line, and will not observe daylight +# savings time so as to stay on the same time zone as the southern part of +# Arizona year round. + +# From Jesper Nørgaard, translating +# <http://www.reforma.com/nacional/articulo/064327/> (2001-01-17): +# In Oaxaca, the 55.000 teachers from the Section 22 of the National +# Syndicate of Education Workers, refuse to apply daylight saving each +# year, so that the more than 10,000 schools work at normal hour the +# whole year. + +# From Gwillim Law (2001-01-19): +# <http://www.reforma.com/negocios_y_dinero/articulo/064481/> ... says +# (translated):... +# January 17, 2000 - The Energy Secretary, Ernesto Martens, announced +# that Summer Time will be reduced from seven to five months, starting +# this year.... +# http://www.publico.com.mx/scripts/texto3.asp?action=pagina&pag=21&pos=p&secc=naci&date=01/17/2001 +# [translated], says "summer time will ... take effect on the first Sunday +# in May, and end on the last Sunday of September. + +# From Arthur David Olson (2001-01-25): +# The 2001-01-24 traditional Washington Post contained the page one +# story "Timely Issue Divides Mexicans."... +# http://www.washingtonpost.com/wp-dyn/articles/A37383-2001Jan23.html +# ... Mexico City Mayor López Obrador "...is threatening to keep +# Mexico City and its 20 million residents on a different time than +# the rest of the country..." In particular, López Obrador would abolish +# observation of Daylight Saving Time. + +# Official statute published by the Energy Department +# http://www.conae.gob.mx/ahorro/decretohorver2001.html#decre +# (2001-02-01) shows Baja and Chihauhua as still using US DST rules, +# and Sonora with no DST. This was reported by Jesper Nørgaard (2001-02-03). + +# From Paul Eggert (2001-03-03): +# +# http://www.latimes.com/news/nation/20010303/t000018766.html +# James F. Smith writes in today's LA Times +# * Sonora will continue to observe standard time. +# * Last week Mexico City's mayor Andrés Manuel López Obrador decreed that +# the Federal District will not adopt DST. +# * 4 of 16 district leaders announced they'll ignore the decree. +# * The decree does not affect federal-controlled facilities including +# the airport, banks, hospitals, and schools. +# +# For now we'll assume that the Federal District will bow to federal rules. + +# From Jesper Nørgaard (2001-04-01): +# I found some references to the Mexican application of daylight +# saving, which modifies what I had already sent you, stating earlier +# that a number of northern Mexican states would go on daylight +# saving. The modification reverts this to only cover Baja California +# (Norte), while all other states (except Sonora, who has no daylight +# saving all year) will follow the original decree of president +# Vicente Fox, starting daylight saving May 6, 2001 and ending +# September 30, 2001. +# References: "Diario de Monterrey" <http://www.diariodemonterrey.com/index.asp> +# Palabra <http://palabra.infosel.com/010331/primera/ppri3101.pdf> (2001-03-31) + +# From Reuters (2001-09-04): +# Mexico's Supreme Court on Tuesday declared that daylight savings was +# unconstitutional in Mexico City, creating the possibility the +# capital will be in a different time zone from the rest of the nation +# next year.... The Supreme Court's ruling takes effect at 2:00 +# a.m. (0800 GMT) on Sept. 30, when Mexico is scheduled to revert to +# standard time. "This is so residents of the Federal District are not +# subject to unexpected time changes," a statement from the court said. + +# From Jesper Nørgaard Welen (2002-03-12): +# ... consulting my local grocery store(!) and my coworkers, they all insisted +# that a new decision had been made to reinstate US style DST in Mexico.... +# http://www.conae.gob.mx/ahorro/horaver2001_m1_2002.html (2002-02-20) +# confirms this. Sonora as usual is the only state where DST is not applied. + +# From Steffen Thorsen (2009-12-28): +# +# Steffen Thorsen wrote: +# > Mexico's House of Representatives has approved a proposal for northern +# > Mexico's border cities to share the same daylight saving schedule as +# > the United States. +# Now this has passed both the Congress and the Senate, so starting from +# 2010, some border regions will be the same: +# http://www.signonsandiego.com/news/2009/dec/28/clocks-will-match-both-sides-border/ +# http://www.elmananarey.com/diario/noticia/nacional/noticias/empatan_horario_de_frontera_con_eu/621939 +# (Spanish) +# +# Could not find the new law text, but the proposed law text changes are here: +# http://gaceta.diputados.gob.mx/Gaceta/61/2009/dic/20091210-V.pdf +# (Gaceta Parlamentaria) +# +# There is also a list of the votes here: +# http://gaceta.diputados.gob.mx/Gaceta/61/2009/dic/V2-101209.html +# +# Our page: +# http://www.timeanddate.com/news/time/north-mexico-dst-change.html + +# From Arthur David Olson (2010-01-20): +# The page +# http://dof.gob.mx/nota_detalle.php?codigo=5127480&fecha=06/01/2010 +# includes this text: +# En los municipios fronterizos de Tijuana y Mexicali en Baja California; +# Juárez y Ojinaga en Chihuahua; Acuña y Piedras Negras en Coahuila; +# Anáhuac en Nuevo León; y Nuevo Laredo, Reynosa y Matamoros en +# Tamaulipas, la aplicación de este horario estacional surtirá efecto +# desde las dos horas del segundo domingo de marzo y concluirá a las dos +# horas del primer domingo de noviembre. +# En los municipios fronterizos que se encuentren ubicados en la franja +# fronteriza norte en el territorio comprendido entre la línea +# internacional y la línea paralela ubicada a una distancia de veinte +# kilómetros, así como la Ciudad de Ensenada, Baja California, hacia el +# interior del país, la aplicación de este horario estacional surtirá +# efecto desde las dos horas del segundo domingo de marzo y concluirá a +# las dos horas del primer domingo de noviembre. + +# From Steffen Thorsen (2014-12-08), translated by Gwillim Law: +# The Mexican state of Quintana Roo will likely change to EST in 2015. +# +# http://www.unioncancun.mx/articulo/2014/12/04/medio-ambiente/congreso-aprueba-una-hora-mas-de-sol-en-qroo +# "With this change, the time conflict that has existed between the municipios +# of Quintana Roo and the municipio of Felipe Carrillo Puerto may come to an +# end. The latter declared itself in rebellion 15 years ago when a time change +# was initiated in Mexico, and since then it has refused to change its time +# zone along with the rest of the country." +# +# From Steffen Thorsen (2015-01-14), translated by Gwillim Law: +# http://sipse.com/novedades/confirman-aplicacion-de-nueva-zona-horaria-para-quintana-roo-132331.html +# "...the new time zone will come into effect at two o'clock on the first Sunday +# of February, when we will have to advance the clock one hour from its current +# time..." +# Also, the new zone will not use DST. +# +# From Carlos Raúl Perasso (2015-02-02): +# The decree that modifies the Mexican Hour System Law has finally +# been published at the Diario Oficial de la Federación +# http://www.dof.gob.mx/nota_detalle.php?codigo=5380123&fecha=31/01/2015 +# It establishes 5 zones for Mexico: +# 1- Zona Centro (Central Zone): Corresponds to longitude 90 W, +# includes most of Mexico, excluding what's mentioned below. +# 2- Zona Pacífico (Pacific Zone): Longitude 105 W, includes the +# states of Baja California Sur; Chihuahua; Nayarit (excluding Bahía +# de Banderas which lies in Central Zone); Sinaloa and Sonora. +# 3- Zona Noroeste (Northwest Zone): Longitude 120 W, includes the +# state of Baja California. +# 4- Zona Sureste (Southeast Zone): Longitude 75 W, includes the state +# of Quintana Roo. +# 5- The islands, reefs and keys shall take their timezone from the +# longitude they are located at. + +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Mexico 1939 only - Feb 5 0:00 1:00 D +Rule Mexico 1939 only - Jun 25 0:00 0 S +Rule Mexico 1940 only - Dec 9 0:00 1:00 D +Rule Mexico 1941 only - Apr 1 0:00 0 S +Rule Mexico 1943 only - Dec 16 0:00 1:00 W # War +Rule Mexico 1944 only - May 1 0:00 0 S +Rule Mexico 1950 only - Feb 12 0:00 1:00 D +Rule Mexico 1950 only - Jul 30 0:00 0 S +Rule Mexico 1996 2000 - Apr Sun>=1 2:00 1:00 D +Rule Mexico 1996 2000 - Oct lastSun 2:00 0 S +Rule Mexico 2001 only - May Sun>=1 2:00 1:00 D +Rule Mexico 2001 only - Sep lastSun 2:00 0 S +Rule Mexico 2002 max - Apr Sun>=1 2:00 1:00 D +Rule Mexico 2002 max - Oct lastSun 2:00 0 S +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Quintana Roo; represented by Cancún +Zone America/Cancun -5:47:04 - LMT 1922 Jan 1 0:12:56 + -6:00 - CST 1981 Dec 23 + -5:00 Mexico E%sT 1998 Aug 2 2:00 + -6:00 Mexico C%sT 2015 Feb 1 2:00 + -5:00 - EST +# Campeche, Yucatán; represented by Mérida +Zone America/Merida -5:58:28 - LMT 1922 Jan 1 0:01:32 + -6:00 - CST 1981 Dec 23 + -5:00 - EST 1982 Dec 2 + -6:00 Mexico C%sT +# Coahuila, Nuevo León, Tamaulipas (near US border) +# This includes the following municipalities: +# in Coahuila: Ocampo, Acuña, Zaragoza, Jiménez, Piedras Negras, Nava, +# Guerrero, Hidalgo. +# in Nuevo León: Anáhuac, Los Aldama. +# in Tamaulipas: Nuevo Laredo, Guerrero, Mier, Miguel Alemán, Camargo, +# Gustavo Díaz Ordaz, Reynosa, Río Bravo, Valle Hermoso, Matamoros. +# See: Inicia mañana Horario de Verano en zona fronteriza, El Universal, +# 2016-03-12 +# http://www.eluniversal.com.mx/articulo/estados/2016/03/12/inicia-manana-horario-de-verano-en-zona-fronteriza +Zone America/Matamoros -6:40:00 - LMT 1921 Dec 31 23:20:00 + -6:00 - CST 1988 + -6:00 US C%sT 1989 + -6:00 Mexico C%sT 2010 + -6:00 US C%sT +# Durango; Coahuila, Nuevo León, Tamaulipas (away from US border) +Zone America/Monterrey -6:41:16 - LMT 1921 Dec 31 23:18:44 + -6:00 - CST 1988 + -6:00 US C%sT 1989 + -6:00 Mexico C%sT +# Central Mexico +Zone America/Mexico_City -6:36:36 - LMT 1922 Jan 1 0:23:24 + -7:00 - MST 1927 Jun 10 23:00 + -6:00 - CST 1930 Nov 15 + -7:00 - MST 1931 May 1 23:00 + -6:00 - CST 1931 Oct + -7:00 - MST 1932 Apr 1 + -6:00 Mexico C%sT 2001 Sep 30 2:00 + -6:00 - CST 2002 Feb 20 + -6:00 Mexico C%sT +# Chihuahua (near US border) +# This includes the municipalities of Janos, Ascensión, Juárez, Guadalupe, +# Práxedis G Guerrero, Coyame del Sotol, Ojinaga, and Manuel Benavides. +# (See the 2016-03-12 El Universal source mentioned above.) +Zone America/Ojinaga -6:57:40 - LMT 1922 Jan 1 0:02:20 + -7:00 - MST 1927 Jun 10 23:00 + -6:00 - CST 1930 Nov 15 + -7:00 - MST 1931 May 1 23:00 + -6:00 - CST 1931 Oct + -7:00 - MST 1932 Apr 1 + -6:00 - CST 1996 + -6:00 Mexico C%sT 1998 + -6:00 - CST 1998 Apr Sun>=1 3:00 + -7:00 Mexico M%sT 2010 + -7:00 US M%sT +# Chihuahua (away from US border) +Zone America/Chihuahua -7:04:20 - LMT 1921 Dec 31 23:55:40 + -7:00 - MST 1927 Jun 10 23:00 + -6:00 - CST 1930 Nov 15 + -7:00 - MST 1931 May 1 23:00 + -6:00 - CST 1931 Oct + -7:00 - MST 1932 Apr 1 + -6:00 - CST 1996 + -6:00 Mexico C%sT 1998 + -6:00 - CST 1998 Apr Sun>=1 3:00 + -7:00 Mexico M%sT +# Sonora +Zone America/Hermosillo -7:23:52 - LMT 1921 Dec 31 23:36:08 + -7:00 - MST 1927 Jun 10 23:00 + -6:00 - CST 1930 Nov 15 + -7:00 - MST 1931 May 1 23:00 + -6:00 - CST 1931 Oct + -7:00 - MST 1932 Apr 1 + -6:00 - CST 1942 Apr 24 + -7:00 - MST 1949 Jan 14 + -8:00 - PST 1970 + -7:00 Mexico M%sT 1999 + -7:00 - MST + +# From Alexander Krivenyshev (2010-04-21): +# According to news, Bahía de Banderas (Mexican state of Nayarit) +# changed time zone UTC-7 to new time zone UTC-6 on April 4, 2010 (to +# share the same time zone as nearby city Puerto Vallarta, Jalisco). +# +# (Spanish) +# Bahía de Banderas homologa su horario al del centro del +# país, a partir de este domingo +# http://www.nayarit.gob.mx/notes.asp?id=20748 +# +# Bahía de Banderas homologa su horario con el del Centro del +# País +# http://www.bahiadebanderas.gob.mx/principal/index.php?option=com_content&view=article&id=261:bahia-de-banderas-homologa-su-horario-con-el-del-centro-del-pais&catid=42:comunicacion-social&Itemid=50 +# +# (English) +# Puerto Vallarta and Bahía de Banderas: One Time Zone +# http://virtualvallarta.com/puertovallarta/puertovallarta/localnews/2009-12-03-Puerto-Vallarta-and-Bahia-de-Banderas-One-Time-Zone.shtml +# http://www.worldtimezone.com/dst_news/dst_news_mexico08.html +# +# "Mexico's Senate approved the amendments to the Mexican Schedule System that +# will allow Bahía de Banderas and Puerto Vallarta to share the same time +# zone ..." +# Baja California Sur, Nayarit, Sinaloa + +# From Arthur David Olson (2010-05-01): +# Use "Bahia_Banderas" to keep the name to fourteen characters. + +# Mazatlán +Zone America/Mazatlan -7:05:40 - LMT 1921 Dec 31 23:54:20 + -7:00 - MST 1927 Jun 10 23:00 + -6:00 - CST 1930 Nov 15 + -7:00 - MST 1931 May 1 23:00 + -6:00 - CST 1931 Oct + -7:00 - MST 1932 Apr 1 + -6:00 - CST 1942 Apr 24 + -7:00 - MST 1949 Jan 14 + -8:00 - PST 1970 + -7:00 Mexico M%sT + +# Bahía de Banderas +Zone America/Bahia_Banderas -7:01:00 - LMT 1921 Dec 31 23:59:00 + -7:00 - MST 1927 Jun 10 23:00 + -6:00 - CST 1930 Nov 15 + -7:00 - MST 1931 May 1 23:00 + -6:00 - CST 1931 Oct + -7:00 - MST 1932 Apr 1 + -6:00 - CST 1942 Apr 24 + -7:00 - MST 1949 Jan 14 + -8:00 - PST 1970 + -7:00 Mexico M%sT 2010 Apr 4 2:00 + -6:00 Mexico C%sT + +# Baja California +Zone America/Tijuana -7:48:04 - LMT 1922 Jan 1 0:11:56 + -7:00 - MST 1924 + -8:00 - PST 1927 Jun 10 23:00 + -7:00 - MST 1930 Nov 15 + -8:00 - PST 1931 Apr 1 + -8:00 1:00 PDT 1931 Sep 30 + -8:00 - PST 1942 Apr 24 + -8:00 1:00 PWT 1945 Aug 14 23:00u + -8:00 1:00 PPT 1945 Nov 12 # Peace + -8:00 - PST 1948 Apr 5 + -8:00 1:00 PDT 1949 Jan 14 + -8:00 - PST 1954 + -8:00 CA P%sT 1961 + -8:00 - PST 1976 + -8:00 US P%sT 1996 + -8:00 Mexico P%sT 2001 + -8:00 US P%sT 2002 Feb 20 + -8:00 Mexico P%sT 2010 + -8:00 US P%sT +# From Paul Eggert (2006-03-22): +# Formerly there was an America/Ensenada zone, which differed from +# America/Tijuana only in that it did not observe DST from 1976 +# through 1995. This was as per Shanks (1999). But Shanks & Pottenger say +# Ensenada did not observe DST from 1948 through 1975. Guy Harris reports +# that the 1987 OAG says "Only Ensenada, Mexicali, San Felipe and +# Tijuana observe DST," which agrees with Shanks & Pottenger but implies that +# DST-observance was a town-by-town matter back then. This concerns +# data after 1970 so most likely there should be at least one Zone +# other than America/Tijuana for Baja, but it's not clear yet what its +# name or contents should be. +# +# From Paul Eggert (2015-10-08): +# Formerly there was an America/Santa_Isabel zone, but this appears to +# have come from a misreading of +# http://dof.gob.mx/nota_detalle.php?codigo=5127480&fecha=06/01/2010 +# It has been moved to the 'backward' file. +# +# +# Revillagigedo Is +# no information + +############################################################################### + +# Anguilla +# Antigua and Barbuda +# See America/Port_of_Spain. + +# Bahamas +# +# For 1899 Milne gives -5:09:29.5; round that. +# +# From Sue Williams (2006-12-07): +# The Bahamas announced about a month ago that they plan to change their DST +# rules to sync with the U.S. starting in 2007.... +# http://www.jonesbahamas.com/?c=45&a=10412 + +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Bahamas 1964 1975 - Oct lastSun 2:00 0 S +Rule Bahamas 1964 1975 - Apr lastSun 2:00 1:00 D +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone America/Nassau -5:09:30 - LMT 1912 Mar 2 + -5:00 Bahamas E%sT 1976 + -5:00 US E%sT + +# Barbados + +# For 1899 Milne gives -3:58:29.2; round that. + +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Barb 1977 only - Jun 12 2:00 1:00 D +Rule Barb 1977 1978 - Oct Sun>=1 2:00 0 S +Rule Barb 1978 1980 - Apr Sun>=15 2:00 1:00 D +Rule Barb 1979 only - Sep 30 2:00 0 S +Rule Barb 1980 only - Sep 25 2:00 0 S +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone America/Barbados -3:58:29 - LMT 1924 # Bridgetown + -3:58:29 - BMT 1932 # Bridgetown Mean Time + -4:00 Barb A%sT + +# Belize +# Whitman entirely disagrees with Shanks; go with Shanks & Pottenger. +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Belize 1918 1942 - Oct Sun>=2 0:00 0:30 HD +Rule Belize 1919 1943 - Feb Sun>=9 0:00 0 S +Rule Belize 1973 only - Dec 5 0:00 1:00 D +Rule Belize 1974 only - Feb 9 0:00 0 S +Rule Belize 1982 only - Dec 18 0:00 1:00 D +Rule Belize 1983 only - Feb 12 0:00 0 S +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone America/Belize -5:52:48 - LMT 1912 Apr + -6:00 Belize C%sT + +# Bermuda + +# For 1899 Milne gives -4:19:18.3 as the meridian of the clock tower, +# Bermuda dockyard, Ireland I; round that. + +# From Dan Jones, reporting in The Royal Gazette (2006-06-26): + +# Next year, however, clocks in the US will go forward on the second Sunday +# in March, until the first Sunday in November. And, after the Time Zone +# (Seasonal Variation) Bill 2006 was passed in the House of Assembly on +# Friday, the same thing will happen in Bermuda. +# http://www.theroyalgazette.com/apps/pbcs.dll/article?AID=/20060529/NEWS/105290135 + +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Atlantic/Bermuda -4:19:18 - LMT 1930 Jan 1 2:00 # Hamilton + -4:00 - AST 1974 Apr 28 2:00 + -4:00 Canada A%sT 1976 + -4:00 US A%sT + +# Cayman Is +# See America/Panama. + +# Costa Rica + +# Milne gives -5:36:13.3 as San José mean time; round to nearest. + +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule CR 1979 1980 - Feb lastSun 0:00 1:00 D +Rule CR 1979 1980 - Jun Sun>=1 0:00 0 S +Rule CR 1991 1992 - Jan Sat>=15 0:00 1:00 D +# IATA SSIM (1991-09) says the following was at 1:00; +# go with Shanks & Pottenger. +Rule CR 1991 only - Jul 1 0:00 0 S +Rule CR 1992 only - Mar 15 0:00 0 S +# There are too many San Josés elsewhere, so we'll use 'Costa Rica'. +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone America/Costa_Rica -5:36:13 - LMT 1890 # San José + -5:36:13 - SJMT 1921 Jan 15 # San José Mean Time + -6:00 CR C%sT +# Coco +# no information; probably like America/Costa_Rica + +# Cuba + +# From Paul Eggert (2013-02-21): +# Milne gives -5:28:50.45 for the observatory at Havana, -5:29:23.57 +# for the port, and -5:30 for meteorological observations. +# For now, stick with Shanks & Pottenger. + +# From Arthur David Olson (1999-03-29): +# The 1999-03-28 exhibition baseball game held in Havana, Cuba, between +# the Cuban National Team and the Baltimore Orioles was carried live on +# the Orioles Radio Network, including affiliate WTOP in Washington, DC. +# During the game, play-by-play announcer Jim Hunter noted that +# "We'll be losing two hours of sleep...Cuba switched to Daylight Saving +# Time today." (The "two hour" remark referred to losing one hour of +# sleep on 1999-03-28 - when the announcers were in Cuba as it switched +# to DST - and one more hour on 1999-04-04 - when the announcers will have +# returned to Baltimore, which switches on that date.) + +# From Steffen Thorsen (2013-11-11): +# DST start in Cuba in 2004 ... does not follow the same rules as the +# years before. The correct date should be Sunday 2004-03-28 00:00 ... +# https://web.archive.org/web/20040402060750/http://www.granma.cu/espanol/2004/marzo/sab27/reloj.html + +# From Evert van der Veer via Steffen Thorsen (2004-10-28): +# Cuba is not going back to standard time this year. +# From Paul Eggert (2006-03-22): +# http://www.granma.cu/ingles/2004/septiembre/juev30/41medid-i.html +# says that it's due to a problem at the Antonio Guiteras +# thermoelectric plant, and says "This October there will be no return +# to normal hours (after daylight saving time)". +# For now, let's assume that it's a temporary measure. + +# From Carlos A. Carnero Delgado (2005-11-12): +# This year (just like in 2004-2005) there's no change in time zone +# adjustment in Cuba. We will stay in daylight saving time: +# http://www.granma.cu/espanol/2005/noviembre/mier9/horario.html + +# From Jesper Nørgaard Welen (2006-10-21): +# An article in GRANMA INTERNACIONAL claims that Cuba will end +# the 3 years of permanent DST next weekend, see +# http://www.granma.cu/ingles/2006/octubre/lun16/43horario.html +# "On Saturday night, October 28 going into Sunday, October 29, at 01:00, +# watches should be set back one hour - going back to 00:00 hours - returning +# to the normal schedule.... + +# From Paul Eggert (2007-03-02): +# <http://www.granma.cubaweb.cu/english/news/art89.html>, dated yesterday, +# says Cuban clocks will advance at midnight on March 10. +# For lack of better information, assume Cuba will use US rules, +# except that it switches at midnight standard time as usual. +# +# From Steffen Thorsen (2007-10-25): +# Carlos Alberto Fonseca Arauz informed me that Cuba will end DST one week +# earlier - on the last Sunday of October, just like in 2006. +# +# He supplied these references: +# +# http://www.prensalatina.com.mx/article.asp?ID=%7B4CC32C1B-A9F7-42FB-8A07-8631AFC923AF%7D&language=ES +# http://actualidad.terra.es/sociedad/articulo/cuba_llama_ahorrar_energia_cambio_1957044.htm +# +# From Alex Krivenyshev (2007-10-25): +# Here is also article from Granma (Cuba): +# +# Regirá el Horario Normal desde el próximo domingo 28 de octubre +# http://www.granma.cubaweb.cu/2007/10/24/nacional/artic07.html +# +# http://www.worldtimezone.com/dst_news/dst_news_cuba03.html + +# From Arthur David Olson (2008-03-09): +# I'm in Maryland which is now observing United States Eastern Daylight +# Time. At 9:44 local time I used RealPlayer to listen to +# http://media.enet.cu/radioreloj +# a Cuban information station, and heard +# the time announced as "ocho cuarenta y cuatro" ("eight forty-four"), +# indicating that Cuba is still on standard time. + +# From Steffen Thorsen (2008-03-12): +# It seems that Cuba will start DST on Sunday, 2007-03-16... +# It was announced yesterday, according to this source (in Spanish): +# http://www.nnc.cubaweb.cu/marzo-2008/cien-1-11-3-08.htm +# +# Some more background information is posted here: +# http://www.timeanddate.com/news/time/cuba-starts-dst-march-16.html +# +# The article also says that Cuba has been observing DST since 1963, +# while Shanks (and tzdata) has 1965 as the first date (except in the +# 1940's). Many other web pages in Cuba also claim that it has been +# observed since 1963, but with the exception of 1970 - an exception +# which is not present in tzdata/Shanks. So there is a chance we need to +# change some historic records as well. +# +# One example: +# http://www.radiohc.cu/espanol/noticias/mar07/11mar/hor.htm + +# From Jesper Nørgaard Welen (2008-03-13): +# The Cuban time change has just been confirmed on the most authoritative +# web site, the Granma. Please check out +# http://www.granma.cubaweb.cu/2008/03/13/nacional/artic10.html +# +# Basically as expected after Steffen Thorsen's information, the change +# will take place midnight between Saturday and Sunday. + +# From Arthur David Olson (2008-03-12): +# Assume Sun>=15 (third Sunday) going forward. + +# From Alexander Krivenyshev (2009-03-04) +# According to the Radio Reloj - Cuba will start Daylight Saving Time on +# midnight between Saturday, March 07, 2009 and Sunday, March 08, 2009- +# not on midnight March 14 / March 15 as previously thought. +# +# http://www.worldtimezone.com/dst_news/dst_news_cuba05.html +# (in Spanish) + +# From Arthur David Olson (2009-03-09) +# I listened over the Internet to +# http://media.enet.cu/readioreloj +# this morning; when it was 10:05 a. m. here in Bethesda, Maryland the +# the time was announced as "diez cinco" - the same time as here, indicating +# that has indeed switched to DST. Assume second Sunday from 2009 forward. + +# From Steffen Thorsen (2011-03-08): +# Granma announced that Cuba is going to start DST on 2011-03-20 00:00:00 +# this year. Nothing about the end date known so far (if that has +# changed at all). +# +# Source: +# http://granma.co.cu/2011/03/08/nacional/artic01.html +# +# Our info: +# http://www.timeanddate.com/news/time/cuba-starts-dst-2011.html +# +# From Steffen Thorsen (2011-10-30) +# Cuba will end DST two weeks later this year. Instead of going back +# tonight, it has been delayed to 2011-11-13 at 01:00. +# +# One source (Spanish) +# http://www.radioangulo.cu/noticias/cuba/17105-cuba-restablecera-el-horario-del-meridiano-de-greenwich.html +# +# Our page: +# http://www.timeanddate.com/news/time/cuba-time-changes-2011.html +# +# From Steffen Thorsen (2012-03-01) +# According to Radio Reloj, Cuba will start DST on Midnight between March +# 31 and April 1. +# +# Radio Reloj has the following info (Spanish): +# http://www.radioreloj.cu/index.php/noticias-radio-reloj/71-miscelaneas/7529-cuba-aplicara-el-horario-de-verano-desde-el-1-de-abril +# +# Our info on it: +# http://www.timeanddate.com/news/time/cuba-starts-dst-2012.html + +# From Steffen Thorsen (2012-11-03): +# Radio Reloj and many other sources report that Cuba is changing back +# to standard time on 2012-11-04: +# http://www.radioreloj.cu/index.php/noticias-radio-reloj/36-nacionales/9961-regira-horario-normal-en-cuba-desde-el-domingo-cuatro-de-noviembre +# From Paul Eggert (2012-11-03): +# For now, assume the future rule is first Sunday in November. + +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Cuba 1928 only - Jun 10 0:00 1:00 D +Rule Cuba 1928 only - Oct 10 0:00 0 S +Rule Cuba 1940 1942 - Jun Sun>=1 0:00 1:00 D +Rule Cuba 1940 1942 - Sep Sun>=1 0:00 0 S +Rule Cuba 1945 1946 - Jun Sun>=1 0:00 1:00 D +Rule Cuba 1945 1946 - Sep Sun>=1 0:00 0 S +Rule Cuba 1965 only - Jun 1 0:00 1:00 D +Rule Cuba 1965 only - Sep 30 0:00 0 S +Rule Cuba 1966 only - May 29 0:00 1:00 D +Rule Cuba 1966 only - Oct 2 0:00 0 S +Rule Cuba 1967 only - Apr 8 0:00 1:00 D +Rule Cuba 1967 1968 - Sep Sun>=8 0:00 0 S +Rule Cuba 1968 only - Apr 14 0:00 1:00 D +Rule Cuba 1969 1977 - Apr lastSun 0:00 1:00 D +Rule Cuba 1969 1971 - Oct lastSun 0:00 0 S +Rule Cuba 1972 1974 - Oct 8 0:00 0 S +Rule Cuba 1975 1977 - Oct lastSun 0:00 0 S +Rule Cuba 1978 only - May 7 0:00 1:00 D +Rule Cuba 1978 1990 - Oct Sun>=8 0:00 0 S +Rule Cuba 1979 1980 - Mar Sun>=15 0:00 1:00 D +Rule Cuba 1981 1985 - May Sun>=5 0:00 1:00 D +Rule Cuba 1986 1989 - Mar Sun>=14 0:00 1:00 D +Rule Cuba 1990 1997 - Apr Sun>=1 0:00 1:00 D +Rule Cuba 1991 1995 - Oct Sun>=8 0:00s 0 S +Rule Cuba 1996 only - Oct 6 0:00s 0 S +Rule Cuba 1997 only - Oct 12 0:00s 0 S +Rule Cuba 1998 1999 - Mar lastSun 0:00s 1:00 D +Rule Cuba 1998 2003 - Oct lastSun 0:00s 0 S +Rule Cuba 2000 2003 - Apr Sun>=1 0:00s 1:00 D +Rule Cuba 2004 only - Mar lastSun 0:00s 1:00 D +Rule Cuba 2006 2010 - Oct lastSun 0:00s 0 S +Rule Cuba 2007 only - Mar Sun>=8 0:00s 1:00 D +Rule Cuba 2008 only - Mar Sun>=15 0:00s 1:00 D +Rule Cuba 2009 2010 - Mar Sun>=8 0:00s 1:00 D +Rule Cuba 2011 only - Mar Sun>=15 0:00s 1:00 D +Rule Cuba 2011 only - Nov 13 0:00s 0 S +Rule Cuba 2012 only - Apr 1 0:00s 1:00 D +Rule Cuba 2012 max - Nov Sun>=1 0:00s 0 S +Rule Cuba 2013 max - Mar Sun>=8 0:00s 1:00 D + +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone America/Havana -5:29:28 - LMT 1890 + -5:29:36 - HMT 1925 Jul 19 12:00 # Havana MT + -5:00 Cuba C%sT + +# Dominica +# See America/Port_of_Spain. + +# Dominican Republic + +# From Steffen Thorsen (2000-10-30): +# Enrique Morales reported to me that the Dominican Republic has changed the +# time zone to Eastern Standard Time as of Sunday 29 at 2 am.... +# http://www.listin.com.do/antes/261000/republica/princi.html + +# From Paul Eggert (2000-12-04): +# That URL (2000-10-26, in Spanish) says they planned to use US-style DST. + +# From Rives McDow (2000-12-01): +# Dominican Republic changed its mind and presidential decree on Tuesday, +# November 28, 2000, with a new decree. On Sunday, December 3 at 1:00 AM the +# Dominican Republic will be reverting to 8 hours from the International Date +# Line, and will not be using DST in the foreseeable future. The reason they +# decided to use DST was to be in synch with Puerto Rico, who was also going +# to implement DST. When Puerto Rico didn't implement DST, the president +# decided to revert. + + +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule DR 1966 only - Oct 30 0:00 1:00 D +Rule DR 1967 only - Feb 28 0:00 0 S +Rule DR 1969 1973 - Oct lastSun 0:00 0:30 HD +Rule DR 1970 only - Feb 21 0:00 0 S +Rule DR 1971 only - Jan 20 0:00 0 S +Rule DR 1972 1974 - Jan 21 0:00 0 S +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone America/Santo_Domingo -4:39:36 - LMT 1890 + -4:40 - SDMT 1933 Apr 1 12:00 # S. Dom. MT + -5:00 DR E%sT 1974 Oct 27 + -4:00 - AST 2000 Oct 29 2:00 + -5:00 US E%sT 2000 Dec 3 1:00 + -4:00 - AST + +# El Salvador + +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Salv 1987 1988 - May Sun>=1 0:00 1:00 D +Rule Salv 1987 1988 - Sep lastSun 0:00 0 S +# There are too many San Salvadors elsewhere, so use America/El_Salvador +# instead of America/San_Salvador. +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone America/El_Salvador -5:56:48 - LMT 1921 # San Salvador + -6:00 Salv C%sT + +# Grenada +# Guadeloupe +# St Barthélemy +# St Martin (French part) +# See America/Port_of_Spain. + +# Guatemala +# +# From Gwillim Law (2006-04-22), after a heads-up from Oscar van Vlijmen: +# Diario Co Latino, at +# <http://www.diariocolatino.com/internacionales/detalles.asp?NewsID=8079>, +# says in an article dated 2006-04-19 that the Guatemalan government had +# decided on that date to advance official time by 60 minutes, to lessen the +# impact of the elevated cost of oil.... Daylight saving time will last from +# 2006-04-29 24:00 (Guatemalan standard time) to 2006-09-30 (time unspecified). +# From Paul Eggert (2006-06-22): +# The Ministry of Energy and Mines, press release CP-15/2006 +# (2006-04-19), says DST ends at 24:00. See +# http://www.sieca.org.gt/Sitio_publico/Energeticos/Doc/Medidas/Cambio_Horario_Nac_190406.pdf + +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Guat 1973 only - Nov 25 0:00 1:00 D +Rule Guat 1974 only - Feb 24 0:00 0 S +Rule Guat 1983 only - May 21 0:00 1:00 D +Rule Guat 1983 only - Sep 22 0:00 0 S +Rule Guat 1991 only - Mar 23 0:00 1:00 D +Rule Guat 1991 only - Sep 7 0:00 0 S +Rule Guat 2006 only - Apr 30 0:00 1:00 D +Rule Guat 2006 only - Oct 1 0:00 0 S +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone America/Guatemala -6:02:04 - LMT 1918 Oct 5 + -6:00 Guat C%sT + +# Haiti +# From Gwillim Law (2005-04-15): +# Risto O. Nykänen wrote me that Haiti is now on DST. +# I searched for confirmation, and I found a press release +# on the Web page of the Haitian Consulate in Chicago (2005-03-31), +# <http://www.haitianconsulate.org/time.doc>. Translated from French, it says: +# +# "The Prime Minister's Communication Office notifies the public in general +# and the press in particular that, following a decision of the Interior +# Ministry and the Territorial Collectivities [I suppose that means the +# provinces], Haiti will move to Eastern Daylight Time in the night from next +# Saturday the 2nd to Sunday the 3rd. +# +# "Consequently, the Prime Minister's Communication Office wishes to inform +# the population that the country's clocks will be set forward one hour +# starting at midnight. This provision will hold until the last Saturday in +# October 2005. +# +# "Port-au-Prince, March 31, 2005" +# +# From Steffen Thorsen (2006-04-04): +# I have been informed by users that Haiti observes DST this year like +# last year, so the current "only" rule for 2005 might be changed to a +# "max" rule or to last until 2006. (Who knows if they will observe DST +# next year or if they will extend their DST like US/Canada next year). +# +# I have found this article about it (in French): +# http://www.haitipressnetwork.com/news.cfm?articleID=7612 +# +# The reason seems to be an energy crisis. + +# From Stephen Colebourne (2007-02-22): +# Some IATA info: Haiti won't be having DST in 2007. + +# From Steffen Thorsen (2012-03-11): +# According to several news sources, Haiti will observe DST this year, +# apparently using the same start and end date as USA/Canada. +# So this means they have already changed their time. +# +# http://www.alterpresse.org/spip.php?article12510 +# http://radiovision2000haiti.net/home/?p=13253 +# +# From Arthur David Olson (2012-03-11): +# The alterpresse.org source seems to show a US-style leap from 2:00 a.m. to +# 3:00 a.m. rather than the traditional Haitian jump at midnight. +# Assume a US-style fall back as well. + +# From Steffen Thorsen (2013-03-10): +# It appears that Haiti is observing DST this year as well, same rules +# as US/Canada. They did it last year as well, and it looks like they +# are going to observe DST every year now... +# +# http://radiovision2000haiti.net/public/haiti-avis-changement-dheure-dimanche/ +# http://www.canalplushaiti.net/?p=6714 + +# From Steffen Thorsen (2016-03-12): +# Jean Antoine, editor of www.haiti-reference.com informed us that Haiti +# are not going on DST this year. Several other resources confirm this: ... +# http://www.radiotelevisioncaraibes.com/presse/heure_d_t_pas_de_changement_d_heure_pr_vu_pour_cet_ann_e.html +# http://www.vantbefinfo.com/changement-dheure-pas-pour-haiti/ +# http://news.anmwe.com/haiti-lheure-nationale-ne-sera-ni-avancee-ni-reculee-cette-annee/ + +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Haiti 1983 only - May 8 0:00 1:00 D +Rule Haiti 1984 1987 - Apr lastSun 0:00 1:00 D +Rule Haiti 1983 1987 - Oct lastSun 0:00 0 S +# Shanks & Pottenger say AT is 2:00, but IATA SSIM (1991/1997) says 1:00s. +# Go with IATA. +Rule Haiti 1988 1997 - Apr Sun>=1 1:00s 1:00 D +Rule Haiti 1988 1997 - Oct lastSun 1:00s 0 S +Rule Haiti 2005 2006 - Apr Sun>=1 0:00 1:00 D +Rule Haiti 2005 2006 - Oct lastSun 0:00 0 S +Rule Haiti 2012 2015 - Mar Sun>=8 2:00 1:00 D +Rule Haiti 2012 2015 - Nov Sun>=1 2:00 0 S +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone America/Port-au-Prince -4:49:20 - LMT 1890 + -4:49 - PPMT 1917 Jan 24 12:00 # P-a-P MT + -5:00 Haiti E%sT + +# Honduras +# Shanks & Pottenger say 1921 Jan 1; go with Whitman's more precise Apr 1. + +# From Paul Eggert (2006-05-05): +# worldtimezone.com reports a 2006-05-02 Spanish-language AP article +# saying Honduras will start using DST midnight Saturday, effective 4 +# months until September. La Tribuna reported today +# <http://www.latribuna.hn/99299.html> that Manuel Zelaya, the president +# of Honduras, refused to back down on this. + +# From Jesper Nørgaard Welen (2006-08-08): +# It seems that Honduras has returned from DST to standard time this Monday at +# 00:00 hours (prolonging Sunday to 25 hours duration). +# http://www.worldtimezone.com/dst_news/dst_news_honduras04.html + +# From Paul Eggert (2006-08-08): +# Also see Diario El Heraldo, The country returns to standard time (2006-08-08). +# http://www.elheraldo.hn/nota.php?nid=54941&sec=12 +# It mentions executive decree 18-2006. + +# From Steffen Thorsen (2006-08-17): +# Honduras will observe DST from 2007 to 2009, exact dates are not +# published, I have located this authoritative source: +# http://www.presidencia.gob.hn/noticia.aspx?nId=47 + +# From Steffen Thorsen (2007-03-30): +# http://www.laprensahn.com/pais_nota.php?id04962=7386 +# So it seems that Honduras will not enter DST this year.... + +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Hond 1987 1988 - May Sun>=1 0:00 1:00 D +Rule Hond 1987 1988 - Sep lastSun 0:00 0 S +Rule Hond 2006 only - May Sun>=1 0:00 1:00 D +Rule Hond 2006 only - Aug Mon>=1 0:00 0 S +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone America/Tegucigalpa -5:48:52 - LMT 1921 Apr + -6:00 Hond C%sT +# +# Great Swan I ceded by US to Honduras in 1972 + +# Jamaica +# Shanks & Pottenger give -5:07:12, but Milne records -5:07:10.41 from an +# unspecified official document, and says "This time is used throughout the +# island". Go with Milne. Round to the nearest second as required by zic. +# +# Shanks & Pottenger give April 28 for the 1974 spring-forward transition, but +# Lance Neita writes that Prime Minister Michael Manley decreed it January 5. +# Assume Neita meant Jan 6 02:00, the same as the US. Neita also writes that +# Manley's supporters associated this act with Manley's nickname "Joshua" +# (recall that in the Bible the sun stood still at Joshua's request), +# and with the Rod of Correction which Manley said he had received from +# Haile Selassie, Emperor of Ethiopia. See: +# Neita L. The politician in all of us. Jamaica Observer 2014-09-20 +# http://www.jamaicaobserver.com/columns/The-politician-in-all-of-us_17573647 +# +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone America/Jamaica -5:07:11 - LMT 1890 # Kingston + -5:07:11 - KMT 1912 Feb # Kingston Mean Time + -5:00 - EST 1974 + -5:00 US E%sT 1984 + -5:00 - EST + +# Martinique +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone America/Martinique -4:04:20 - LMT 1890 # Fort-de-France + -4:04:20 - FFMT 1911 May # Fort-de-France MT + -4:00 - AST 1980 Apr 6 + -4:00 1:00 ADT 1980 Sep 28 + -4:00 - AST + +# Montserrat +# See America/Port_of_Spain. + +# Nicaragua +# +# This uses Shanks & Pottenger for times before 2005. +# +# From Steffen Thorsen (2005-04-12): +# I've got reports from 8 different people that Nicaragua just started +# DST on Sunday 2005-04-10, in order to save energy because of +# expensive petroleum. The exact end date for DST is not yet +# announced, only "September" but some sites also say "mid-September". +# Some background information is available on the President's official site: +# http://www.presidencia.gob.ni/Presidencia/Files_index/Secretaria/Notas%20de%20Prensa/Presidente/2005/ABRIL/Gobierno-de-nicaragua-adelanta-hora-oficial-06abril.htm +# The Decree, no 23-2005 is available here: +# http://www.presidencia.gob.ni/buscador_gaceta/BD/DECRETOS/2005/Decreto%2023-2005%20Se%20adelanta%20en%20una%20hora%20en%20todo%20el%20territorio%20nacional%20apartir%20de%20las%2024horas%20del%2009%20de%20Abril.pdf +# +# From Paul Eggert (2005-05-01): +# The decree doesn't say anything about daylight saving, but for now let's +# assume that it is daylight saving.... +# +# From Gwillim Law (2005-04-21): +# The Associated Press story on the time change, which can be found at +# http://www.lapalmainteractivo.com/guias/content/gen/ap/America_Latina/AMC_GEN_NICARAGUA_HORA.html +# and elsewhere, says (fifth paragraph, translated from Spanish): "The last +# time that a change of clocks was applied to save energy was in the year 2000 +# during the Arnoldo Alemán administration."... +# The northamerica file says that Nicaragua has been on UTC-6 continuously +# since December 1998. I wasn't able to find any details of Nicaraguan time +# changes in 2000. Perhaps a note could be added to the northamerica file, to +# the effect that we have indirect evidence that DST was observed in 2000. +# +# From Jesper Nørgaard Welen (2005-11-02): +# Nicaragua left DST the 2005-10-02 at 00:00 (local time). +# http://www.presidencia.gob.ni/presidencia/files_index/secretaria/comunicados/2005/septiembre/26septiembre-cambio-hora.htm +# (2005-09-26) +# +# From Jesper Nørgaard Welen (2006-05-05): +# http://www.elnuevodiario.com.ni/2006/05/01/nacionales/18410 +# (my informal translation) +# By order of the president of the republic, Enrique Bolaños, Nicaragua +# advanced by sixty minutes their official time, yesterday at 2 in the +# morning, and will stay that way until 30th of September. +# +# From Jesper Nørgaard Welen (2006-09-30): +# http://www.presidencia.gob.ni/buscador_gaceta/BD/DECRETOS/2006/D-063-2006P-PRN-Cambio-Hora.pdf +# My informal translation runs: +# The natural sun time is restored in all the national territory, in that the +# time is returned one hour at 01:00 am of October 1 of 2006. +# +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Nic 1979 1980 - Mar Sun>=16 0:00 1:00 D +Rule Nic 1979 1980 - Jun Mon>=23 0:00 0 S +Rule Nic 2005 only - Apr 10 0:00 1:00 D +Rule Nic 2005 only - Oct Sun>=1 0:00 0 S +Rule Nic 2006 only - Apr 30 2:00 1:00 D +Rule Nic 2006 only - Oct Sun>=1 1:00 0 S +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone America/Managua -5:45:08 - LMT 1890 + -5:45:12 - MMT 1934 Jun 23 # Managua Mean Time? + -6:00 - CST 1973 May + -5:00 - EST 1975 Feb 16 + -6:00 Nic C%sT 1992 Jan 1 4:00 + -5:00 - EST 1992 Sep 24 + -6:00 - CST 1993 + -5:00 - EST 1997 + -6:00 Nic C%sT + +# Panama +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone America/Panama -5:18:08 - LMT 1890 + -5:19:36 - CMT 1908 Apr 22 # Colón Mean Time + -5:00 - EST +Link America/Panama America/Cayman + +# Puerto Rico +# There are too many San Juans elsewhere, so we'll use 'Puerto_Rico'. +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone America/Puerto_Rico -4:24:25 - LMT 1899 Mar 28 12:00 # San Juan + -4:00 - AST 1942 May 3 + -4:00 US A%sT 1946 + -4:00 - AST + +# St Kitts-Nevis +# St Lucia +# See America/Port_of_Spain. + +# St Pierre and Miquelon +# There are too many St Pierres elsewhere, so we'll use 'Miquelon'. +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone America/Miquelon -3:44:40 - LMT 1911 May 15 # St Pierre + -4:00 - AST 1980 May + -3:00 - PMST 1987 # Pierre & Miquelon Time + -3:00 Canada PM%sT + +# St Vincent and the Grenadines +# See America/Port_of_Spain. + +# Turks and Caicos +# +# From Chris Dunn in +# http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=415007 +# (2007-03-15): In the Turks & Caicos Islands (America/Grand_Turk) the +# daylight saving dates for time changes have been adjusted to match +# the recent U.S. change of dates. +# +# From Brian Inglis (2007-04-28): +# http://www.turksandcaicos.tc/calendar/index.htm [2007-04-26] +# there is an entry for Nov 4 "Daylight Savings Time Ends 2007" and three +# rows before that there is an out of date entry for Oct: +# "Eastern Standard Times Begins 2007 +# Clocks are set back one hour at 2:00 a.m. local Daylight Saving Time" +# indicating that the normal ET rules are followed. +# +# From Paul Eggert (2014-08-19): +# The 2014-08-13 Cabinet meeting decided to stay on UTC-4 year-round. See: +# http://tcweeklynews.com/daylight-savings-time-to-be-maintained-p5353-127.htm +# Model this as a switch from EST/EDT to AST ... +# From Chris Walton (2014-11-04): +# ... the TCI government appears to have delayed the switch to +# "permanent daylight saving time" by one year.... +# http://tcweeklynews.com/time-change-to-go-ahead-this-november-p5437-127.htm +# +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone America/Grand_Turk -4:44:32 - LMT 1890 + -5:07:11 - KMT 1912 Feb # Kingston Mean Time + -5:00 - EST 1979 + -5:00 US E%sT 2015 Nov Sun>=1 2:00 + -4:00 - AST + +# British Virgin Is +# Virgin Is +# See America/Port_of_Spain. + + +# Local Variables: +# coding: utf-8 +# End: diff --git a/tz/pacificnew b/tz/pacificnew new file mode 100644 index 0000000..7349434 --- /dev/null +++ b/tz/pacificnew @@ -0,0 +1,27 @@ +# This file is in the public domain, so clarified as of +# 2009-05-17 by Arthur David Olson. + +# From Arthur David Olson (1989-04-05): +# On 1989-04-05, the U. S. House of Representatives passed (238-154) a bill +# establishing "Pacific Presidential Election Time"; it was not acted on +# by the Senate or signed into law by the President. +# You might want to change the "PE" (Presidential Election) below to +# "Q" (Quadrennial) to maintain three-character zone abbreviations. +# If you're really conservative, you might want to change it to "D". +# Avoid "L" (Leap Year), which won't be true in 2100. + +# If Presidential Election Time is ever established, replace "XXXX" below +# with the year the law takes effect and uncomment the "##" lines. + +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +## Rule Twilite XXXX max - Apr Sun>=1 2:00 1:00 D +## Rule Twilite XXXX max uspres Oct lastSun 2:00 1:00 PE +## Rule Twilite XXXX max uspres Nov Sun>=7 2:00 0 S +## Rule Twilite XXXX max nonpres Oct lastSun 2:00 0 S + +# Zone NAME GMTOFF RULES/SAVE FORMAT [UNTIL] +## Zone America/Los_Angeles-PET -8:00 US P%sT XXXX +## -8:00 Twilite P%sT + +# For now... +Link America/Los_Angeles US/Pacific-New ## diff --git a/tz/private.h b/tz/private.h new file mode 100644 index 0000000..941e91b --- /dev/null +++ b/tz/private.h @@ -0,0 +1,585 @@ +#ifndef PRIVATE_H + +#define PRIVATE_H + +/* +** This file is in the public domain, so clarified as of +** 1996-06-05 by Arthur David Olson. +*/ + +/* +** This header is for use ONLY with the time conversion code. +** There is no guarantee that it will remain unchanged, +** or that it will remain at all. +** Do NOT copy it to any system include directory. +** Thank you! +*/ + +#define GRANDPARENTED "Local time zone must be set--see zic manual page" + +/* +** Defaults for preprocessor symbols. +** You can override these in your C compiler options, e.g. '-DHAVE_GETTEXT=1'. +*/ + +#ifndef HAVE_DECL_ASCTIME_R +#define HAVE_DECL_ASCTIME_R 1 +#endif + +#ifndef HAVE_GETTEXT +#define HAVE_GETTEXT 0 +#endif /* !defined HAVE_GETTEXT */ + +#ifndef HAVE_INCOMPATIBLE_CTIME_R +#define HAVE_INCOMPATIBLE_CTIME_R 0 +#endif /* !defined INCOMPATIBLE_CTIME_R */ + +#ifndef HAVE_LINK +#define HAVE_LINK 1 +#endif /* !defined HAVE_LINK */ + +#ifndef HAVE_POSIX_DECLS +#define HAVE_POSIX_DECLS 1 +#endif + +#ifndef HAVE_STRDUP +#define HAVE_STRDUP 1 +#endif + +#ifndef HAVE_SYMLINK +#define HAVE_SYMLINK 1 +#endif /* !defined HAVE_SYMLINK */ + +#ifndef HAVE_SYS_STAT_H +#define HAVE_SYS_STAT_H 1 +#endif /* !defined HAVE_SYS_STAT_H */ + +#ifndef HAVE_SYS_WAIT_H +#define HAVE_SYS_WAIT_H 1 +#endif /* !defined HAVE_SYS_WAIT_H */ + +#ifndef HAVE_UNISTD_H +#define HAVE_UNISTD_H 1 +#endif /* !defined HAVE_UNISTD_H */ + +#ifndef HAVE_UTMPX_H +#define HAVE_UTMPX_H 1 +#endif /* !defined HAVE_UTMPX_H */ + +#ifndef NETBSD_INSPIRED +# define NETBSD_INSPIRED 1 +#endif + +#if HAVE_INCOMPATIBLE_CTIME_R +#define asctime_r _incompatible_asctime_r +#define ctime_r _incompatible_ctime_r +#endif /* HAVE_INCOMPATIBLE_CTIME_R */ + +/* Enable tm_gmtoff and tm_zone on GNUish systems. */ +#define _GNU_SOURCE 1 +/* Fix asctime_r on Solaris 10. */ +#define _POSIX_PTHREAD_SEMANTICS 1 +/* Enable strtoimax on Solaris 10. */ +#define __EXTENSIONS__ 1 + +/* +** Nested includes +*/ + +/* Avoid clashes with NetBSD by renaming NetBSD's declarations. */ +#define localtime_rz sys_localtime_rz +#define mktime_z sys_mktime_z +#define posix2time_z sys_posix2time_z +#define time2posix_z sys_time2posix_z +#define timezone_t sys_timezone_t +#define tzalloc sys_tzalloc +#define tzfree sys_tzfree +#include <time.h> +#undef localtime_rz +#undef mktime_z +#undef posix2time_z +#undef time2posix_z +#undef timezone_t +#undef tzalloc +#undef tzfree + +#include "sys/types.h" /* for time_t */ +#include "stdio.h" +#include "string.h" +#include "limits.h" /* for CHAR_BIT et al. */ +#include "stdlib.h" + +#include "errno.h" + +#ifndef ENAMETOOLONG +# define ENAMETOOLONG EINVAL +#endif +#ifndef ENOTSUP +# define ENOTSUP EINVAL +#endif +#ifndef EOVERFLOW +# define EOVERFLOW EINVAL +#endif + +#if HAVE_GETTEXT +#include "libintl.h" +#endif /* HAVE_GETTEXT */ + +#if HAVE_SYS_WAIT_H +#include <sys/wait.h> /* for WIFEXITED and WEXITSTATUS */ +#endif /* HAVE_SYS_WAIT_H */ + +#ifndef WIFEXITED +#define WIFEXITED(status) (((status) & 0xff) == 0) +#endif /* !defined WIFEXITED */ +#ifndef WEXITSTATUS +#define WEXITSTATUS(status) (((status) >> 8) & 0xff) +#endif /* !defined WEXITSTATUS */ + +#if HAVE_UNISTD_H +#include "unistd.h" /* for F_OK, R_OK, and other POSIX goodness */ +#endif /* HAVE_UNISTD_H */ + +#ifndef HAVE_STRFTIME_L +# if _POSIX_VERSION < 200809 +# define HAVE_STRFTIME_L 0 +# else +# define HAVE_STRFTIME_L 1 +# endif +#endif + +#ifndef F_OK +#define F_OK 0 +#endif /* !defined F_OK */ +#ifndef R_OK +#define R_OK 4 +#endif /* !defined R_OK */ + +/* Unlike <ctype.h>'s isdigit, this also works if c < 0 | c > UCHAR_MAX. */ +#define is_digit(c) ((unsigned)(c) - '0' <= 9) + +/* +** Define HAVE_STDINT_H's default value here, rather than at the +** start, since __GLIBC__'s value depends on previously-included +** files. +** (glibc 2.1 and later have stdint.h, even with pre-C99 compilers.) +*/ +#ifndef HAVE_STDINT_H +#define HAVE_STDINT_H \ + (199901 <= __STDC_VERSION__ \ + || 2 < __GLIBC__ + (1 <= __GLIBC_MINOR__) \ + || __CYGWIN__) +#endif /* !defined HAVE_STDINT_H */ + +#if HAVE_STDINT_H +#include "stdint.h" +#endif /* !HAVE_STDINT_H */ + +#ifndef HAVE_INTTYPES_H +# define HAVE_INTTYPES_H HAVE_STDINT_H +#endif +#if HAVE_INTTYPES_H +# include <inttypes.h> +#endif + +/* Pre-C99 GCC compilers define __LONG_LONG_MAX__ instead of LLONG_MAX. */ +#ifdef __LONG_LONG_MAX__ +# ifndef LLONG_MAX +# define LLONG_MAX __LONG_LONG_MAX__ +# endif +# ifndef LLONG_MIN +# define LLONG_MIN (-1 - LLONG_MAX) +# endif +#endif + +#ifndef INT_FAST64_MAX +# ifdef LLONG_MAX +typedef long long int_fast64_t; +# define INT_FAST64_MIN LLONG_MIN +# define INT_FAST64_MAX LLONG_MAX +# else +# if LONG_MAX >> 31 < 0xffffffff +Please use a compiler that supports a 64-bit integer type (or wider); +you may need to compile with "-DHAVE_STDINT_H". +# endif +typedef long int_fast64_t; +# define INT_FAST64_MIN LONG_MIN +# define INT_FAST64_MAX LONG_MAX +# endif +#endif + +#ifndef SCNdFAST64 +# if INT_FAST64_MAX == LLONG_MAX +# define SCNdFAST64 "lld" +# else +# define SCNdFAST64 "ld" +# endif +#endif + +#ifndef INT_FAST32_MAX +# if INT_MAX >> 31 == 0 +typedef long int_fast32_t; +# define INT_FAST32_MAX LONG_MAX +# define INT_FAST32_MIN LONG_MIN +# else +typedef int int_fast32_t; +# define INT_FAST32_MAX INT_MAX +# define INT_FAST32_MIN INT_MIN +# endif +#endif + +#ifndef INTMAX_MAX +# ifdef LLONG_MAX +typedef long long intmax_t; +# define strtoimax strtoll +# define INTMAX_MAX LLONG_MAX +# define INTMAX_MIN LLONG_MIN +# else +typedef long intmax_t; +# define strtoimax strtol +# define INTMAX_MAX LONG_MAX +# define INTMAX_MIN LONG_MIN +# endif +#endif + +#ifndef PRIdMAX +# if INTMAX_MAX == LLONG_MAX +# define PRIdMAX "lld" +# else +# define PRIdMAX "ld" +# endif +#endif + +#ifndef UINT_FAST64_MAX +# if defined ULLONG_MAX || defined __LONG_LONG_MAX__ +typedef unsigned long long uint_fast64_t; +# else +# if ULONG_MAX >> 31 >> 1 < 0xffffffff +Please use a compiler that supports a 64-bit integer type (or wider); +you may need to compile with "-DHAVE_STDINT_H". +# endif +typedef unsigned long uint_fast64_t; +# endif +#endif + +#ifndef UINTMAX_MAX +# if defined ULLONG_MAX || defined __LONG_LONG_MAX__ +typedef unsigned long long uintmax_t; +# else +typedef unsigned long uintmax_t; +# endif +#endif + +#ifndef PRIuMAX +# if defined ULLONG_MAX || defined __LONG_LONG_MAX__ +# define PRIuMAX "llu" +# else +# define PRIuMAX "lu" +# endif +#endif + +#ifndef INT32_MAX +#define INT32_MAX 0x7fffffff +#endif /* !defined INT32_MAX */ +#ifndef INT32_MIN +#define INT32_MIN (-1 - INT32_MAX) +#endif /* !defined INT32_MIN */ + +#ifndef SIZE_MAX +#define SIZE_MAX ((size_t) -1) +#endif + +#if 2 < __GNUC__ + (96 <= __GNUC_MINOR__) +# define ATTRIBUTE_CONST __attribute__ ((const)) +# define ATTRIBUTE_PURE __attribute__ ((__pure__)) +# define ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec)) +#else +# define ATTRIBUTE_CONST /* empty */ +# define ATTRIBUTE_PURE /* empty */ +# define ATTRIBUTE_FORMAT(spec) /* empty */ +#endif + +#if !defined _Noreturn && __STDC_VERSION__ < 201112 +# if 2 < __GNUC__ + (8 <= __GNUC_MINOR__) +# define _Noreturn __attribute__ ((__noreturn__)) +# else +# define _Noreturn +# endif +#endif + +#if __STDC_VERSION__ < 199901 && !defined restrict +# define restrict /* empty */ +#endif + +/* +** Workarounds for compilers/systems. +*/ + +/* +** Compile with -Dtime_tz=T to build the tz package with a private +** time_t type equivalent to T rather than the system-supplied time_t. +** This debugging feature can test unusual design decisions +** (e.g., time_t wider than 'long', or unsigned time_t) even on +** typical platforms. +*/ +#ifdef time_tz +# ifdef LOCALTIME_IMPLEMENTATION +static time_t sys_time(time_t *x) { return time(x); } +# endif + +typedef time_tz tz_time_t; + +# undef ctime +# define ctime tz_ctime +# undef ctime_r +# define ctime_r tz_ctime_r +# undef difftime +# define difftime tz_difftime +# undef gmtime +# define gmtime tz_gmtime +# undef gmtime_r +# define gmtime_r tz_gmtime_r +# undef localtime +# define localtime tz_localtime +# undef localtime_r +# define localtime_r tz_localtime_r +# undef localtime_rz +# define localtime_rz tz_localtime_rz +# undef mktime +# define mktime tz_mktime +# undef mktime_z +# define mktime_z tz_mktime_z +# undef offtime +# define offtime tz_offtime +# undef posix2time +# define posix2time tz_posix2time +# undef posix2time_z +# define posix2time_z tz_posix2time_z +# undef time +# define time tz_time +# undef time2posix +# define time2posix tz_time2posix +# undef time2posix_z +# define time2posix_z tz_time2posix_z +# undef time_t +# define time_t tz_time_t +# undef timegm +# define timegm tz_timegm +# undef timelocal +# define timelocal tz_timelocal +# undef timeoff +# define timeoff tz_timeoff +# undef tzalloc +# define tzalloc tz_tzalloc +# undef tzfree +# define tzfree tz_tzfree +# undef tzset +# define tzset tz_tzset +# undef tzsetwall +# define tzsetwall tz_tzsetwall + +char *ctime(time_t const *); +char *ctime_r(time_t const *, char *); +double difftime(time_t, time_t); +struct tm *gmtime(time_t const *); +struct tm *gmtime_r(time_t const *restrict, struct tm *restrict); +struct tm *localtime(time_t const *); +struct tm *localtime_r(time_t const *restrict, struct tm *restrict); +time_t mktime(struct tm *); +time_t time(time_t *); +void tzset(void); +#endif + +#if !HAVE_DECL_ASCTIME_R && !defined asctime_r +extern char *asctime_r(struct tm const *restrict, char *restrict); +#endif + +#if !HAVE_POSIX_DECLS +# ifdef USG_COMPAT +# ifndef timezone +extern long timezone; +# endif +# ifndef daylight +extern int daylight; +# endif +# endif +#endif + +#if defined ALTZONE && !defined altzone +extern long altzone; +#endif + +/* +** The STD_INSPIRED functions are similar, but most also need +** declarations if time_tz is defined. +*/ + +#ifdef STD_INSPIRED +# if !defined tzsetwall || defined time_tz +void tzsetwall(void); +# endif +# if !defined offtime || defined time_tz +struct tm *offtime(time_t const *, long); +# endif +# if !defined timegm || defined time_tz +time_t timegm(struct tm *); +# endif +# if !defined timelocal || defined time_tz +time_t timelocal(struct tm *); +# endif +# if !defined timeoff || defined time_tz +time_t timeoff(struct tm *, long); +# endif +# if !defined time2posix || defined time_tz +time_t time2posix(time_t); +# endif +# if !defined posix2time || defined time_tz +time_t posix2time(time_t); +# endif +#endif + +/* Infer TM_ZONE on systems where this information is known, but suppress + guessing if NO_TM_ZONE is defined. Similarly for TM_GMTOFF. */ +#if (defined __GLIBC__ \ + || defined __FreeBSD__ || defined __NetBSD__ || defined __OpenBSD__ \ + || (defined __APPLE__ && defined __MACH__)) +# if !defined TM_GMTOFF && !defined NO_TM_GMTOFF +# define TM_GMTOFF tm_gmtoff +# endif +# if !defined TM_ZONE && !defined NO_TM_ZONE +# define TM_ZONE tm_zone +# endif +#endif + +/* +** Define functions that are ABI compatible with NetBSD but have +** better prototypes. NetBSD 6.1.4 defines a pointer type timezone_t +** and labors under the misconception that 'const timezone_t' is a +** pointer to a constant. This use of 'const' is ineffective, so it +** is not done here. What we call 'struct state' NetBSD calls +** 'struct __state', but this is a private name so it doesn't matter. +*/ +#if NETBSD_INSPIRED +typedef struct state *timezone_t; +struct tm *localtime_rz(timezone_t restrict, time_t const *restrict, + struct tm *restrict); +time_t mktime_z(timezone_t restrict, struct tm *restrict); +timezone_t tzalloc(char const *); +void tzfree(timezone_t); +# ifdef STD_INSPIRED +# if !defined posix2time_z || defined time_tz +time_t posix2time_z(timezone_t, time_t) ATTRIBUTE_PURE; +# endif +# if !defined time2posix_z || defined time_tz +time_t time2posix_z(timezone_t, time_t) ATTRIBUTE_PURE; +# endif +# endif +#endif + +/* +** Finally, some convenience items. +*/ + +#if __STDC_VERSION__ < 199901 +# define true 1 +# define false 0 +# define bool int +#else +# include <stdbool.h> +#endif + +#ifndef TYPE_BIT +#define TYPE_BIT(type) (sizeof (type) * CHAR_BIT) +#endif /* !defined TYPE_BIT */ + +#ifndef TYPE_SIGNED +#define TYPE_SIGNED(type) (((type) -1) < 0) +#endif /* !defined TYPE_SIGNED */ + +#define TWOS_COMPLEMENT(t) ((t) ~ (t) 0 < 0) + +/* Max and min values of the integer type T, of which only the bottom + B bits are used, and where the highest-order used bit is considered + to be a sign bit if T is signed. */ +#define MAXVAL(t, b) \ + ((t) (((t) 1 << ((b) - 1 - TYPE_SIGNED(t))) \ + - 1 + ((t) 1 << ((b) - 1 - TYPE_SIGNED(t))))) +#define MINVAL(t, b) \ + ((t) (TYPE_SIGNED(t) ? - TWOS_COMPLEMENT(t) - MAXVAL(t, b) : 0)) + +/* The minimum and maximum finite time values. This assumes no padding. */ +static time_t const time_t_min = MINVAL(time_t, TYPE_BIT(time_t)); +static time_t const time_t_max = MAXVAL(time_t, TYPE_BIT(time_t)); + +#ifndef INT_STRLEN_MAXIMUM +/* +** 302 / 1000 is log10(2.0) rounded up. +** Subtract one for the sign bit if the type is signed; +** add one for integer division truncation; +** add one more for a minus sign if the type is signed. +*/ +#define INT_STRLEN_MAXIMUM(type) \ + ((TYPE_BIT(type) - TYPE_SIGNED(type)) * 302 / 1000 + \ + 1 + TYPE_SIGNED(type)) +#endif /* !defined INT_STRLEN_MAXIMUM */ + +/* +** INITIALIZE(x) +*/ + +#ifdef lint +# define INITIALIZE(x) ((x) = 0) +#else +# define INITIALIZE(x) +#endif + +#ifndef UNINIT_TRAP +# define UNINIT_TRAP 0 +#endif + +/* +** For the benefit of GNU folk... +** '_(MSGID)' uses the current locale's message library string for MSGID. +** The default is to use gettext if available, and use MSGID otherwise. +*/ + +#ifndef _ +#if HAVE_GETTEXT +#define _(msgid) gettext(msgid) +#else /* !HAVE_GETTEXT */ +#define _(msgid) msgid +#endif /* !HAVE_GETTEXT */ +#endif /* !defined _ */ + +#if !defined TZ_DOMAIN && defined HAVE_GETTEXT +# define TZ_DOMAIN "tz" +#endif + +#if HAVE_INCOMPATIBLE_CTIME_R +#undef asctime_r +#undef ctime_r +char *asctime_r(struct tm const *, char *); +char *ctime_r(time_t const *, char *); +#endif /* HAVE_INCOMPATIBLE_CTIME_R */ + +#ifndef YEARSPERREPEAT +#define YEARSPERREPEAT 400 /* years before a Gregorian repeat */ +#endif /* !defined YEARSPERREPEAT */ + +/* +** The Gregorian year averages 365.2425 days, which is 31556952 seconds. +*/ + +#ifndef AVGSECSPERYEAR +#define AVGSECSPERYEAR 31556952L +#endif /* !defined AVGSECSPERYEAR */ + +#ifndef SECSPERREPEAT +#define SECSPERREPEAT ((int_fast64_t) YEARSPERREPEAT * (int_fast64_t) AVGSECSPERYEAR) +#endif /* !defined SECSPERREPEAT */ + +#ifndef SECSPERREPEAT_BITS +#define SECSPERREPEAT_BITS 34 /* ceil(log2(SECSPERREPEAT)) */ +#endif /* !defined SECSPERREPEAT_BITS */ + +#endif /* !defined PRIVATE_H */ diff --git a/tz/southamerica b/tz/southamerica new file mode 100644 index 0000000..1c38f63 --- /dev/null +++ b/tz/southamerica @@ -0,0 +1,1779 @@ +# This file is in the public domain, so clarified as of +# 2009-05-17 by Arthur David Olson. + +# This file is by no means authoritative; if you think you know better, +# go ahead and edit the file (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): +# +# 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. +# +# Gwillim Law writes that a good source +# for recent time zone data is the International Air Transport +# Association's Standard Schedules Information Manual (IATA SSIM), +# published semiannually. Law sent in several helpful summaries +# of the IATA's data after 1990. Except where otherwise noted, +# IATA SSIM is the source for entries after 1990. +# +# For data circa 1899, a common source is: +# Milne J. Civil time. Geogr J. 1899 Feb;13(2):173-94. +# http://www.jstor.org/stable/1774359 +# +# Earlier editions of these tables used the North American style (e.g. ARST and +# ARDT for Argentine Standard and Daylight Time), but the following quote +# suggests that it's better to use European style (e.g. ART and ARST). +# I suggest the use of _Summer time_ instead of the more cumbersome +# _daylight-saving time_. _Summer time_ seems to be in general use +# in Europe and South America. +# -- E O Cutler, _New York Times_ (1937-02-14), quoted in +# H L Mencken, _The American Language: Supplement I_ (1960), p 466 +# +# Earlier editions of these tables also used the North American style +# for time zones in Brazil, but this was incorrect, as Brazilians say +# "summer time". Reinaldo Goulart, a São Paulo businessman active in +# the railroad sector, writes (1999-07-06): +# The subject of time zones is currently a matter of discussion/debate in +# Brazil. Let's say that "the Brasília time" is considered the +# "official time" because Brasília is the capital city. +# The other three time zones are called "Brasília time "minus one" or +# "plus one" or "plus two". As far as I know there is no such +# name/designation as "Eastern Time" or "Central Time". +# So I invented the following (English-language) abbreviations for now. +# Corrections are welcome! +# std dst +# -2:00 FNT FNST Fernando de Noronha +# -3:00 BRT BRST Brasília +# -4:00 AMT AMST Amazon +# -5:00 ACT ACST Acre + +############################################################################### + +############################################################################### + +# Argentina + +# From Bob Devine (1988-01-28): +# Argentina: first Sunday in October to first Sunday in April since 1976. +# Double Summer time from 1969 to 1974. Switches at midnight. + +# From U. S. Naval Observatory (1988-01-19): +# ARGENTINA 3 H BEHIND UTC + +# From Hernan G. Otero (1995-06-26): +# I am sending modifications to the Argentine time zone table... +# AR was chosen because they are the ISO letters that represent Argentina. + +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Arg 1930 only - Dec 1 0:00 1:00 S +Rule Arg 1931 only - Apr 1 0:00 0 - +Rule Arg 1931 only - Oct 15 0:00 1:00 S +Rule Arg 1932 1940 - Mar 1 0:00 0 - +Rule Arg 1932 1939 - Nov 1 0:00 1:00 S +Rule Arg 1940 only - Jul 1 0:00 1:00 S +Rule Arg 1941 only - Jun 15 0:00 0 - +Rule Arg 1941 only - Oct 15 0:00 1:00 S +Rule Arg 1943 only - Aug 1 0:00 0 - +Rule Arg 1943 only - Oct 15 0:00 1:00 S +Rule Arg 1946 only - Mar 1 0:00 0 - +Rule Arg 1946 only - Oct 1 0:00 1:00 S +Rule Arg 1963 only - Oct 1 0:00 0 - +Rule Arg 1963 only - Dec 15 0:00 1:00 S +Rule Arg 1964 1966 - Mar 1 0:00 0 - +Rule Arg 1964 1966 - Oct 15 0:00 1:00 S +Rule Arg 1967 only - Apr 2 0:00 0 - +Rule Arg 1967 1968 - Oct Sun>=1 0:00 1:00 S +Rule Arg 1968 1969 - Apr Sun>=1 0:00 0 - +Rule Arg 1974 only - Jan 23 0:00 1:00 S +Rule Arg 1974 only - May 1 0:00 0 - +Rule Arg 1988 only - Dec 1 0:00 1:00 S +# +# From Hernan G. Otero (1995-06-26): +# These corrections were contributed by InterSoft Argentina S.A., +# obtaining the data from the: +# Talleres de Hidrografía Naval Argentina +# (Argentine Naval Hydrography Institute) +Rule Arg 1989 1993 - Mar Sun>=1 0:00 0 - +Rule Arg 1989 1992 - Oct Sun>=15 0:00 1:00 S +# +# From Hernan G. Otero (1995-06-26): +# From this moment on, the law that mandated the daylight saving +# time corrections was derogated and no more modifications +# to the time zones (for daylight saving) are now made. +# +# From Rives McDow (2000-01-10): +# On October 3, 1999, 0:00 local, Argentina implemented daylight savings time, +# which did not result in the switch of a time zone, as they stayed 9 hours +# from the International Date Line. +Rule Arg 1999 only - Oct Sun>=1 0:00 1:00 S +# From Paul Eggert (2007-12-28): +# DST was set to expire on March 5, not March 3, but since it was converted +# to standard time on March 3 it's more convenient for us to pretend that +# it ended on March 3. +Rule Arg 2000 only - Mar 3 0:00 0 - +# +# From Peter Gradelski via Steffen Thorsen (2000-03-01): +# We just checked with our São Paulo office and they say the government of +# Argentina decided not to become one of the countries that go on or off DST. +# So Buenos Aires should be -3 hours from GMT at all times. +# +# From Fabián L. Arce Jofré (2000-04-04): +# The law that claimed DST for Argentina was derogated by President Fernando +# de la Rúa on March 2, 2000, because it would make people spend more energy +# in the winter time, rather than less. The change took effect on March 3. +# +# From Mariano Absatz (2001-06-06): +# one of the major newspapers here in Argentina said that the 1999 +# Timezone Law (which never was effectively applied) will (would?) be +# in effect.... The article is at +# http://ar.clarin.com/diario/2001-06-06/e-01701.htm +# ... The Law itself is "Ley No. 25155", sanctioned on 1999-08-25, enacted +# 1999-09-17, and published 1999-09-21. The official publication is at: +# http://www.boletin.jus.gov.ar/BON/Primera/1999/09-Septiembre/21/PDF/BO21-09-99LEG.PDF +# Regretfully, you have to subscribe (and pay) for the on-line version.... +# +# (2001-06-12): +# the timezone for Argentina will not change next Sunday. +# Apparently it will do so on Sunday 24th.... +# http://ar.clarin.com/diario/2001-06-12/s-03501.htm +# +# (2001-06-25): +# Last Friday (yes, the last working day before the date of the change), the +# Senate annulled the 1999 law that introduced the changes later postponed. +# http://www.clarin.com.ar/diario/2001-06-22/s-03601.htm +# It remains the vote of the Deputies..., but it will be the same.... +# This kind of things had always been done this way in Argentina. +# We are still -03:00 all year round in all of the country. +# +# From Steffen Thorsen (2007-12-21): +# A user (Leonardo Chaim) reported that Argentina will adopt DST.... +# all of the country (all Zone-entries) are affected. News reports like +# http://www.lanacion.com.ar/opinion/nota.asp?nota_id=973037 indicate +# that Argentina will use DST next year as well, from October to +# March, although exact rules are not given. +# +# From Jesper Nørgaard Welen (2007-12-26) +# The last hurdle of Argentina DST is over, the proposal was approved in +# the lower chamber too (Diputados) with a vote 192 for and 2 against. +# By the way thanks to Mariano Absatz and Daniel Mario Vega for the link to +# the original scanned proposal, where the dates and the zero hours are +# clear and unambiguous...This is the article about final approval: +# http://www.lanacion.com.ar/politica/nota.asp?nota_id=973996 +# +# From Paul Eggert (2007-12-22): +# For dates after mid-2008, the following rules are my guesses and +# are quite possibly wrong, but are more likely than no DST at all. + +# From Alexander Krivenyshev (2008-09-05): +# As per message from Carlos Alberto Fonseca Arauz (Nicaragua), +# Argentina will start DST on Sunday October 19, 2008. +# +# http://www.worldtimezone.com/dst_news/dst_news_argentina03.html +# http://www.impulsobaires.com.ar/nota.php?id=57832 (in spanish) + +# From Juan Manuel Docile in https://bugs.gentoo.org/240339 (2008-10-07) +# via Rodrigo Severo: +# Argentinian law No. 25.155 is no longer valid. +# http://www.infoleg.gov.ar/infolegInternet/anexos/60000-64999/60036/norma.htm +# The new one is law No. 26.350 +# http://www.infoleg.gov.ar/infolegInternet/anexos/135000-139999/136191/norma.htm +# So there is no summer time in Argentina for now. + +# From Mariano Absatz (2008-10-20): +# Decree 1693/2008 applies Law 26.350 for the summer 2008/2009 establishing DST +# in Argentina from 2008-10-19 until 2009-03-15. +# http://www.boletinoficial.gov.ar/Bora.Portal/CustomControls/PdfContent.aspx?fp=16102008&pi=3&pf=4&s=0&sec=01 +# + +# Decree 1705/2008 excepting 12 Provinces from applying DST in the summer +# 2008/2009: Catamarca, La Rioja, Mendoza, Salta, San Juan, San Luis, La +# Pampa, Neuquén, Rio Negro, Chubut, Santa Cruz and Tierra del Fuego +# http://www.boletinoficial.gov.ar/Bora.Portal/CustomControls/PdfContent.aspx?fp=17102008&pi=1&pf=1&s=0&sec=01 +# +# Press release 235 dated Saturday October 18th, from the Government of the +# Province of Jujuy saying it will not apply DST either (even when it was not +# included in Decree 1705/2008). +# http://www.jujuy.gov.ar/index2/partes_prensa/18_10_08/235-181008.doc + +# From fullinet (2009-10-18): +# As announced in +# http://www.argentina.gob.ar/argentina/portal/paginas.dhtml?pagina=356 +# (an official .gob.ar) under title: "Sin Cambio de Hora" +# (English: "No hour change"). +# +# "Por el momento, el Gobierno Nacional resolvió no modificar la hora +# oficial, decisión que estaba en estudio para su implementación el +# domingo 18 de octubre. Desde el Ministerio de Planificación se anunció +# que la Argentina hoy, en estas condiciones meteorológicas, no necesita +# la modificación del huso horario, ya que 2009 nos encuentra con +# crecimiento en la producción y distribución energética." + +Rule Arg 2007 only - Dec 30 0:00 1:00 S +Rule Arg 2008 2009 - Mar Sun>=15 0:00 0 - +Rule Arg 2008 only - Oct Sun>=15 0:00 1:00 S + +# From Mariano Absatz (2004-05-21): +# Today it was officially published that the Province of Mendoza is changing +# its timezone this winter... starting tomorrow night.... +# http://www.gobernac.mendoza.gov.ar/boletin/pdf/20040521-27158-normas.pdf +# From Paul Eggert (2004-05-24): +# It's Law No. 7,210. This change is due to a public power emergency, so for +# now we'll assume it's for this year only. +# +# From Paul Eggert (2014-08-09): +# Hora de verano para la República Argentina +# http://buenasiembra.com.ar/esoterismo/astrologia/hora-de-verano-de-la-republica-argentina-27.html +# says that standard time in Argentina from 1894-10-31 +# to 1920-05-01 was -4:16:48.25. Go with this more-precise value +# over Shanks & Pottenger. +# +# From Mariano Absatz (2004-06-05): +# These media articles from a major newspaper mostly cover the current state: +# http://www.lanacion.com.ar/04/05/27/de_604825.asp +# http://www.lanacion.com.ar/04/05/28/de_605203.asp +# +# The following eight (8) provinces pulled clocks back to UTC-04:00 at +# midnight Monday May 31st. (that is, the night between 05/31 and 06/01). +# Apparently, all nine provinces would go back to UTC-03:00 at the same +# time in October 17th. +# +# Catamarca, Chubut, La Rioja, San Juan, San Luis, Santa Cruz, +# Tierra del Fuego, Tucumán. +# +# From Mariano Absatz (2004-06-14): +# ... this weekend, the Province of Tucumán decided it'd go back to UTC-03:00 +# yesterday midnight (that is, at 24:00 Saturday 12th), since the people's +# annoyance with the change is much higher than the power savings obtained.... +# +# From Gwillim Law (2004-06-14): +# http://www.lanacion.com.ar/04/06/10/de_609078.asp ... +# "The time change in Tierra del Fuego was a conflicted decision from +# the start. The government had decreed that the measure would take +# effect on June 1, but a normative error forced the new time to begin +# three days earlier, from a Saturday to a Sunday.... +# Our understanding was that the change was originally scheduled to take place +# on June 1 at 00:00 in Chubut, Santa Cruz, Tierra del Fuego (and some other +# provinces). Sunday was May 30, only two days earlier. So the article +# contains a contradiction. I would give more credence to the Saturday/Sunday +# date than the "three days earlier" phrase, and conclude that Tierra del +# Fuego set its clocks back at 2004-05-30 00:00. +# +# From Steffen Thorsen (2004-10-05): +# The previous law 7210 which changed the province of Mendoza's time zone +# back in May have been modified slightly in a new law 7277, which set the +# new end date to 2004-09-26 (original date was 2004-10-17). +# http://www.gobernac.mendoza.gov.ar/boletin/pdf/20040924-27244-normas.pdf +# +# From Mariano Absatz (2004-10-05): +# San Juan changed from UTC-03:00 to UTC-04:00 at midnight between +# Sunday, May 30th and Monday, May 31st. It changed back to UTC-03:00 +# at midnight between Saturday, July 24th and Sunday, July 25th.... +# http://www.sanjuan.gov.ar/prensa/archivo/000329.html +# http://www.sanjuan.gov.ar/prensa/archivo/000426.html +# http://www.sanjuan.gov.ar/prensa/archivo/000441.html + +# From Alex Krivenyshev (2008-01-17): +# Here are articles that Argentina Province San Luis is planning to end DST +# as earlier as upcoming Monday January 21, 2008 or February 2008: +# +# Provincia argentina retrasa reloj y marca diferencia con resto del país +# (Argentine Province delayed clock and mark difference with the rest of the +# country) +# http://cl.invertia.com/noticias/noticia.aspx?idNoticia=200801171849_EFE_ET4373&idtel +# +# Es inminente que en San Luis atrasen una hora los relojes +# (It is imminent in San Luis clocks one hour delay) +# http://www.lagaceta.com.ar/nota/253414/Economia/Es-inminente-que-en-San-Luis-atrasen-una-hora-los-relojes.html +# http://www.worldtimezone.net/dst_news/dst_news_argentina02.html + +# From Jesper Nørgaard Welen (2008-01-18): +# The page of the San Luis provincial government +# http://www.sanluis.gov.ar/notas.asp?idCanal=0&id=22812 +# confirms what Alex Krivenyshev has earlier sent to the tz +# emailing list about that San Luis plans to return to standard +# time much earlier than the rest of the country. It also +# confirms that upon request the provinces San Juan and Mendoza +# refused to follow San Luis in this change. +# +# The change is supposed to take place Monday the 21st at 0:00 +# hours. As far as I understand it if this goes ahead, we need +# a new timezone for San Luis (although there are also documented +# independent changes in the southamerica file of San Luis in +# 1990 and 1991 which has not been confirmed). + +# From Jesper Nørgaard Welen (2008-01-25): +# Unfortunately the below page has become defunct, about the San Luis +# time change. Perhaps because it now is part of a group of pages "Most +# important pages of 2008." +# +# You can use +# http://www.sanluis.gov.ar/notas.asp?idCanal=8141&id=22834 +# instead it seems. Or use "Buscador" from the main page of the San Luis +# government, and fill in "huso" and click OK, and you will get 3 pages +# from which the first one is identical to the above. + +# From Mariano Absatz (2008-01-28): +# I can confirm that the Province of San Luis (and so far only that +# province) decided to go back to UTC-3 effective midnight Jan 20th 2008 +# (that is, Monday 21st at 0:00 is the time the clocks were delayed back +# 1 hour), and they intend to keep UTC-3 as their timezone all year round +# (that is, unless they change their mind any minute now). +# +# So we'll have to add yet another city to 'southamerica' (I think San +# Luis city is the mos populated city in the Province, so it'd be +# America/Argentina/San_Luis... of course I can't remember if San Luis's +# history of particular changes goes along with Mendoza or San Juan :-( +# (I only remember not being able to collect hard facts about San Luis +# back in 2004, when these provinces changed to UTC-4 for a few days, I +# mailed them personally and never got an answer). + +# From Paul Eggert (2014-08-12): +# Unless otherwise specified, data entries are from Shanks & Pottenger through +# 1992, from the IATA otherwise. As noted below, Shanks & Pottenger say that +# America/Cordoba split into 6 subregions during 1991/1992, one of which +# was America/San_Luis, but we haven't verified this yet so for now we'll +# keep America/Cordoba a single region rather than splitting it into the +# other 5 subregions. + +# From Mariano Absatz (2009-03-13): +# Yesterday (with our usual 2-day notice) the Province of San Luis +# decided that next Sunday instead of "staying" @utc-03:00 they will go +# to utc-04:00 until the second Saturday in October... +# +# The press release is at +# http://www.sanluis.gov.ar/SL/Paginas/NoticiaDetalle.asp?TemaId=1&InfoPrensaId=3102 +# (I couldn't find the decree, but www.sanluis.gov.ar +# is the official page for the Province Government.) +# +# There's also a note in only one of the major national papers ... +# http://www.lanacion.com.ar/nota.asp?nota_id=1107912 +# +# The press release says [quick and dirty translation]: +# ... announced that next Sunday, at 00:00, Puntanos (the San Luis +# inhabitants) will have to turn back one hour their clocks +# +# Since then, San Luis will establish its own Province timezone. Thus, +# during 2009, this timezone change will run from 00:00 the third Sunday +# in March until 24:00 of the second Saturday in October. + +# From Mariano Absatz (2009-10-16): +# ...the Province of San Luis is a case in itself. +# +# The Law at +# http://www.diputadossanluis.gov.ar/diputadosasp/paginas/verNorma.asp?NormaID=276 +# is ambiguous because establishes a calendar from the 2nd Sunday in +# October at 0:00 thru the 2nd Saturday in March at 24:00 and the +# complement of that starting on the 2nd Sunday of March at 0:00 and +# ending on the 2nd Saturday of March at 24:00. +# +# This clearly breaks every time the 1st of March or October is a Sunday. +# +# IMHO, the "spirit of the Law" is to make the changes at 0:00 on the 2nd +# Sunday of October and March. +# +# The problem is that the changes in the rest of the Provinces that did +# change in 2007/2008, were made according to the Federal Law and Decrees +# that did so on the 3rd Sunday of October and March. +# +# In fact, San Luis actually switched from UTC-4 to UTC-3 last Sunday +# (October 11th) at 0:00. +# +# So I guess a new set of rules, besides "Arg", must be made and the last +# America/Argentina/San_Luis entries should change to use these... +# +# I'm enclosing a patch that does what I say... regretfully, the San Luis +# timezone must be called "WART/WARST" even when most of the time (like, +# right now) WARST == ART... that is, since last Sunday, all the country +# is using UTC-3, but in my patch, San Luis calls it "WARST" and the rest +# of the country calls it "ART". +# ... + +# From Alexander Krivenyshev (2010-04-09): +# According to news reports from El Diario de la República Province San +# Luis, Argentina (standard time UTC-04) will keep Daylight Saving Time +# after April 11, 2010 - will continue to have same time as rest of +# Argentina (UTC-3) (no DST). +# +# Confirmaron la prórroga del huso horario de verano (Spanish) +# http://www.eldiariodelarepublica.com/index.php?option=com_content&task=view&id=29383&Itemid=9 +# or (some English translation): +# http://www.worldtimezone.com/dst_news/dst_news_argentina08.html + +# From Mariano Absatz (2010-04-12): +# yes...I can confirm this...and given that San Luis keeps calling +# UTC-03:00 "summer time", we should't just let San Luis go back to "Arg" +# rules...San Luis is still using "Western ARgentina Time" and it got +# stuck on Summer daylight savings time even though the summer is over. + +# From Paul Eggert (2013-09-05): +# Perhaps San Luis operates on the legal fiction that it is at UTC-4 +# with perpetual summer time, but ordinary usage typically seems to +# just say it's at UTC-3; see, for example, +# http://es.wikipedia.org/wiki/Hora_oficial_argentina +# We've documented similar situations as being plain changes to +# standard time, so let's do that here too. This does not change UTC +# offsets, only tm_isdst and the time zone abbreviations. One minor +# plus is that this silences a zic complaint that there's no POSIX TZ +# setting for time stamps past 2038. + +# From Paul Eggert (2013-02-21): +# Milne says Córdoba time was -4:16:48.2. Round to the nearest second. + +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# +# Buenos Aires (BA), Capital Federal (CF), +Zone America/Argentina/Buenos_Aires -3:53:48 - LMT 1894 Oct 31 + -4:16:48 - CMT 1920 May # Córdoba Mean Time + -4:00 - ART 1930 Dec + -4:00 Arg AR%sT 1969 Oct 5 + -3:00 Arg AR%sT 1999 Oct 3 + -4:00 Arg AR%sT 2000 Mar 3 + -3:00 Arg AR%sT +# +# Córdoba (CB), Santa Fe (SF), Entre Ríos (ER), Corrientes (CN), Misiones (MN), +# Chaco (CC), Formosa (FM), Santiago del Estero (SE) +# +# Shanks & Pottenger also make the following claims, which we haven't verified: +# - Formosa switched to -3:00 on 1991-01-07. +# - Misiones switched to -3:00 on 1990-12-29. +# - Chaco switched to -3:00 on 1991-01-04. +# - Santiago del Estero switched to -4:00 on 1991-04-01, +# then to -3:00 on 1991-04-26. +# +Zone America/Argentina/Cordoba -4:16:48 - 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 Arg AR%sT +# +# Salta (SA), La Pampa (LP), Neuquén (NQ), Rio Negro (RN) +Zone America/Argentina/Salta -4:21:40 - 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 Arg AR%sT 2008 Oct 18 + -3:00 - ART +# +# Tucumán (TM) +Zone America/Argentina/Tucuman -4:20:52 - 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 13 + -3:00 Arg AR%sT +# +# La Rioja (LR) +Zone America/Argentina/La_Rioja -4:27:24 - 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 1 + -4:00 - WART 1991 May 7 + -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 Arg AR%sT 2008 Oct 18 + -3:00 - ART +# +# San Juan (SJ) +Zone America/Argentina/San_Juan -4:34:04 - 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 1 + -4:00 - WART 1991 May 7 + -3:00 Arg AR%sT 1999 Oct 3 + -4:00 Arg AR%sT 2000 Mar 3 + -3:00 - ART 2004 May 31 + -4:00 - WART 2004 Jul 25 + -3:00 Arg AR%sT 2008 Oct 18 + -3:00 - ART +# +# Jujuy (JY) +Zone America/Argentina/Jujuy -4:21:12 - 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 1990 Mar 4 + -4:00 - WART 1990 Oct 28 + -4:00 1:00 WARST 1991 Mar 17 + -4:00 - WART 1991 Oct 6 + -3:00 1:00 ARST 1992 + -3:00 Arg AR%sT 1999 Oct 3 + -4:00 Arg AR%sT 2000 Mar 3 + -3:00 Arg AR%sT 2008 Oct 18 + -3:00 - ART +# +# Catamarca (CT), Chubut (CH) +Zone America/Argentina/Catamarca -4:23:08 - 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 Arg AR%sT 2008 Oct 18 + -3:00 - ART +# +# Mendoza (MZ) +Zone America/Argentina/Mendoza -4:35:16 - 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 1990 Mar 4 + -4:00 - WART 1990 Oct 15 + -4:00 1:00 WARST 1991 Mar 1 + -4:00 - WART 1991 Oct 15 + -4:00 1:00 WARST 1992 Mar 1 + -4:00 - WART 1992 Oct 18 + -3:00 Arg AR%sT 1999 Oct 3 + -4:00 Arg AR%sT 2000 Mar 3 + -3:00 - ART 2004 May 23 + -4:00 - WART 2004 Sep 26 + -3:00 Arg AR%sT 2008 Oct 18 + -3:00 - ART +# +# San Luis (SL) + +Rule SanLuis 2008 2009 - Mar Sun>=8 0:00 0 - +Rule SanLuis 2007 2008 - Oct Sun>=8 0:00 1:00 S + +Zone America/Argentina/San_Luis -4:25:24 - 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 1990 + -3:00 1:00 ARST 1990 Mar 14 + -4:00 - WART 1990 Oct 15 + -4:00 1:00 WARST 1991 Mar 1 + -4:00 - WART 1991 Jun 1 + -3:00 - ART 1999 Oct 3 + -4:00 1:00 WARST 2000 Mar 3 + -3:00 - ART 2004 May 31 + -4:00 - WART 2004 Jul 25 + -3:00 Arg AR%sT 2008 Jan 21 + -4:00 SanLuis WAR%sT 2009 Oct 11 + -3:00 - ART +# +# Santa Cruz (SC) +Zone America/Argentina/Rio_Gallegos -4:36:52 - LMT 1894 Oct 31 + -4:16:48 - CMT 1920 May # Córdoba Mean Time + -4:00 - ART 1930 Dec + -4:00 Arg AR%sT 1969 Oct 5 + -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 Arg AR%sT 2008 Oct 18 + -3:00 - ART +# +# Tierra del Fuego, Antártida e Islas del Atlántico Sur (TF) +Zone America/Argentina/Ushuaia -4:33:12 - LMT 1894 Oct 31 + -4:16:48 - CMT 1920 May # Córdoba Mean Time + -4:00 - ART 1930 Dec + -4:00 Arg AR%sT 1969 Oct 5 + -3:00 Arg AR%sT 1999 Oct 3 + -4:00 Arg AR%sT 2000 Mar 3 + -3:00 - ART 2004 May 30 + -4:00 - WART 2004 Jun 20 + -3:00 Arg AR%sT 2008 Oct 18 + -3:00 - ART + +# Aruba +Link America/Curacao America/Aruba + +# Bolivia +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone America/La_Paz -4:32:36 - LMT 1890 + -4:32:36 - CMT 1931 Oct 15 # Calamarca MT + -4:32:36 1:00 BOST 1932 Mar 21 # Bolivia ST + -4:00 - BOT # Bolivia Time + +# Brazil + +# From Paul Eggert (1993-11-18): +# The mayor of Rio recently attempted to change the time zone rules +# just in his city, in order to leave more summer time for the tourist trade. +# The rule change lasted only part of the day; +# the federal government refused to follow the city's rules, and business +# was in a chaos, so the mayor backed down that afternoon. + +# From IATA SSIM (1996-02): +# _Only_ the following states in BR1 observe DST: Rio Grande do Sul (RS), +# Santa Catarina (SC), Paraná (PR), São Paulo (SP), Rio de Janeiro (RJ), +# Espírito Santo (ES), Minas Gerais (MG), Bahia (BA), Goiás (GO), +# Distrito Federal (DF), Tocantins (TO), Sergipe [SE] and Alagoas [AL]. +# [The last three states are new to this issue of the IATA SSIM.] + +# From Gwillim Law (1996-10-07): +# Geography, history (Tocantins was part of Goiás until 1989), and other +# sources of time zone information lead me to believe that AL, SE, and TO were +# always in BR1, and so the only change was whether or not they observed DST.... +# The earliest issue of the SSIM I have is 2/91. Each issue from then until +# 9/95 says that DST is observed only in the ten states I quoted from 9/95, +# along with Mato Grosso (MT) and Mato Grosso do Sul (MS), which are in BR2 +# (UTC-4).... The other two time zones given for Brazil are BR3, which is +# UTC-5, no DST, and applies only in the state of Acre (AC); and BR4, which is +# UTC-2, and applies to Fernando de Noronha (formerly FN, but I believe it's +# become part of the state of Pernambuco). The boundary between BR1 and BR2 +# has never been clearly stated. They've simply been called East and West. +# However, some conclusions can be drawn from another IATA manual: the Airline +# Coding Directory, which lists close to 400 airports in Brazil. For each +# airport it gives a time zone which is coded to the SSIM. From that +# information, I'm led to conclude that the states of Amapá (AP), Ceará (CE), +# Maranhão (MA), Paraíba (PR), Pernambuco (PE), Piauí (PI), and Rio Grande do +# Norte (RN), and the eastern part of Pará (PA) are all in BR1 without DST. + +# From Marcos Tadeu (1998-09-27): +# Brazilian official page <http://pcdsh01.on.br/verao1.html> + +# From Jesper Nørgaard (2000-11-03): +# [For an official list of which regions in Brazil use which time zones, see:] +# http://pcdsh01.on.br/Fusbr.htm +# http://pcdsh01.on.br/Fusbrhv.htm + +# From Celso Doria via David Madeo (2002-10-09): +# The reason for the delay this year has to do with elections in Brazil. +# +# Unlike in the United States, elections in Brazil are 100% computerized and +# the results are known almost immediately. Yesterday, it was the first +# round of the elections when 115 million Brazilians voted for President, +# Governor, Senators, Federal Deputies, and State Deputies. Nobody is +# counting (or re-counting) votes anymore and we know there will be a second +# round for the Presidency and also for some Governors. The 2nd round will +# take place on October 27th. +# +# The reason why the DST will only begin November 3rd is that the thousands +# of electoral machines used cannot have their time changed, and since the +# Constitution says the elections must begin at 8:00 AM and end at 5:00 PM, +# the Government decided to postpone DST, instead of changing the Constitution +# (maybe, for the next elections, it will be possible to change the clock)... + +# From Rodrigo Severo (2004-10-04): +# It's just the biannual change made necessary by the much hyped, supposedly +# modern Brazilian eletronic voting machines which, apparently, can't deal +# with a time change between the first and the second rounds of the elections. + +# From Steffen Thorsen (2007-09-20): +# Brazil will start DST on 2007-10-14 00:00 and end on 2008-02-17 00:00: +# http://www.mme.gov.br/site/news/detail.do;jsessionid=BBA06811AFCAAC28F0285210913513DA?newsId=13975 + +# From Paul Schulze (2008-06-24): +# ...by law number 11.662 of April 24, 2008 (published in the "Diario +# Oficial da União"...) in Brazil there are changes in the timezones, +# effective today (00:00am at June 24, 2008) as follows: +# +# a) The timezone UTC+5 is extinguished, with all the Acre state and the +# part of the Amazonas state that had this timezone now being put to the +# timezone UTC+4 +# b) The whole Pará state now is put at timezone UTC+3, instead of just +# part of it, as was before. +# +# This change follows a proposal of senator Tiao Viana of Acre state, that +# proposed it due to concerns about open television channels displaying +# programs inappropriate to youths in the states that had the timezone +# UTC+5 too early in the night. In the occasion, some more corrections +# were proposed, trying to unify the timezones of any given state. This +# change modifies timezone rules defined in decree 2.784 of 18 June, +# 1913. + +# From Rodrigo Severo (2008-06-24): +# Just correcting the URL: +# https://www.in.gov.br/imprensa/visualiza/index.jsp?jornal=do&secao=1&pagina=1&data=25/04/2008 +# +# As a result of the above Decree I believe the America/Rio_Branco +# timezone shall be modified from UTC-5 to UTC-4 and a new timezone shall +# be created to represent the...west side of the Pará State. I +# suggest this new timezone be called Santarem as the most +# important/populated city in the affected area. +# +# This new timezone would be the same as the Rio_Branco timezone up to +# the 2008/06/24 change which would be to UTC-3 instead of UTC-4. + +# From Alex Krivenyshev (2008-06-24): +# This is a quick reference page for New and Old Brazil Time Zones map. +# http://www.worldtimezone.com/brazil-time-new-old.php +# +# - 4 time zones replaced by 3 time zones - eliminating time zone UTC-05 +# (state Acre and the part of the Amazonas will be UTC/GMT-04) - western +# part of Par state is moving to one timezone UTC-03 (from UTC-04). + +# From Paul Eggert (2002-10-10): +# The official decrees referenced below are mostly taken from +# Decretos sobre o Horário de Verão no Brasil. +# http://pcdsh01.on.br/DecHV.html + +# From Steffen Thorsen (2008-08-29): +# As announced by the government and many newspapers in Brazil late +# yesterday, Brazil will start DST on 2008-10-19 (need to change rule) and +# it will end on 2009-02-15 (current rule for Brazil is fine). Based on +# past years experience with the elections, there was a good chance that +# the start was postponed to November, but it did not happen this year. +# +# It has not yet been posted to http://pcdsh01.on.br/DecHV.html +# +# An official page about it: +# http://www.mme.gov.br/site/news/detail.do?newsId=16722 +# Note that this link does not always work directly, but must be accessed +# by going to +# http://www.mme.gov.br/first +# +# One example link that works directly: +# http://jornale.com.br/index.php?option=com_content&task=view&id=13530&Itemid=54 +# (Portuguese) +# +# We have a written a short article about it as well: +# http://www.timeanddate.com/news/time/brazil-dst-2008-2009.html +# +# From Alexander Krivenyshev (2011-10-04): +# State Bahia will return to Daylight savings time this year after 8 years off. +# The announcement was made by Governor Jaques Wagner in an interview to a +# television station in Salvador. + +# In Portuguese: +# http://g1.globo.com/bahia/noticia/2011/10/governador-jaques-wagner-confirma-horario-de-verao-na-bahia.html +# http://noticias.terra.com.br/brasil/noticias/0,,OI5390887-EI8139,00-Bahia+volta+a+ter+horario+de+verao+apos+oito+anos.html + +# From Guilherme Bernardes Rodrigues (2011-10-07): +# There is news in the media, however there is still no decree about it. +# I just send a e-mail to Zulmira Brandao at http://pcdsh01.on.br/ the +# official agency about time in Brazil, and she confirmed that the old rule is +# still in force. + +# From Guilherme Bernardes Rodrigues (2011-10-14) +# It's official, the President signed a decree that includes Bahia in summer +# time. +# [ and in a second message (same day): ] +# I found the decree. +# +# DECRETO No. 7.584, DE 13 DE OUTUBRO DE 2011 +# Link : +# http://www.in.gov.br/visualiza/index.jsp?data=13/10/2011&jornal=1000&pagina=6&totalArquivos=6 + +# From Kelley Cook (2012-10-16): +# The governor of state of Bahia in Brazil announced on Thursday that +# due to public pressure, he is reversing the DST policy they implemented +# last year and will not be going to Summer Time on October 21st.... +# http://www.correio24horas.com.br/r/artigo/apos-pressoes-wagner-suspende-horario-de-verao-na-bahia + +# From Rodrigo Severo (2012-10-16): +# Tocantins state will have DST. +# http://noticias.terra.com.br/brasil/noticias/0,,OI6232536-EI306.html + +# From Steffen Thorsen (2013-09-20): +# Tocantins in Brazil is very likely not to observe DST from October.... +# http://conexaoto.com.br/2013/09/18/ministerio-confirma-que-tocantins-esta-fora-do-horario-de-verao-em-2013-mas-falta-publicacao-de-decreto +# We will keep this article updated when this is confirmed: +# http://www.timeanddate.com/news/time/brazil-starts-dst-2013.html + +# From Steffen Thorsen (2013-10-17): +# http://www.timeanddate.com/news/time/acre-amazonas-change-time-zone.html +# Senator Jorge Viana announced that Acre will change time zone on November 10. +# He did not specify the time of the change, nor if western parts of Amazonas +# will change as well. +# +# From Paul Eggert (2013-10-17): +# For now, assume western Amazonas will change as well. + +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +# Decree 20,466 <http://pcdsh01.on.br/HV20466.htm> (1931-10-01) +# Decree 21,896 <http://pcdsh01.on.br/HV21896.htm> (1932-01-10) +Rule Brazil 1931 only - Oct 3 11:00 1:00 S +Rule Brazil 1932 1933 - Apr 1 0:00 0 - +Rule Brazil 1932 only - Oct 3 0:00 1:00 S +# Decree 23,195 <http://pcdsh01.on.br/HV23195.htm> (1933-10-10) +# revoked DST. +# Decree 27,496 <http://pcdsh01.on.br/HV27496.htm> (1949-11-24) +# Decree 27,998 <http://pcdsh01.on.br/HV27998.htm> (1950-04-13) +Rule Brazil 1949 1952 - Dec 1 0:00 1:00 S +Rule Brazil 1950 only - Apr 16 1:00 0 - +Rule Brazil 1951 1952 - Apr 1 0:00 0 - +# Decree 32,308 <http://pcdsh01.on.br/HV32308.htm> (1953-02-24) +Rule Brazil 1953 only - Mar 1 0:00 0 - +# Decree 34,724 <http://pcdsh01.on.br/HV34724.htm> (1953-11-30) +# revoked DST. +# Decree 52,700 <http://pcdsh01.on.br/HV52700.htm> (1963-10-18) +# established DST from 1963-10-23 00:00 to 1964-02-29 00:00 +# in SP, RJ, GB, MG, ES, due to the prolongation of the drought. +# Decree 53,071 <http://pcdsh01.on.br/HV53071.htm> (1963-12-03) +# extended the above decree to all of the national territory on 12-09. +Rule Brazil 1963 only - Dec 9 0:00 1:00 S +# Decree 53,604 <http://pcdsh01.on.br/HV53604.htm> (1964-02-25) +# extended summer time by one day to 1964-03-01 00:00 (start of school). +Rule Brazil 1964 only - Mar 1 0:00 0 - +# Decree 55,639 <http://pcdsh01.on.br/HV55639.htm> (1965-01-27) +Rule Brazil 1965 only - Jan 31 0:00 1:00 S +Rule Brazil 1965 only - Mar 31 0:00 0 - +# Decree 57,303 <http://pcdsh01.on.br/HV57303.htm> (1965-11-22) +Rule Brazil 1965 only - Dec 1 0:00 1:00 S +# Decree 57,843 <http://pcdsh01.on.br/HV57843.htm> (1966-02-18) +Rule Brazil 1966 1968 - Mar 1 0:00 0 - +Rule Brazil 1966 1967 - Nov 1 0:00 1:00 S +# Decree 63,429 <http://pcdsh01.on.br/HV63429.htm> (1968-10-15) +# revoked DST. +# Decree 91,698 <http://pcdsh01.on.br/HV91698.htm> (1985-09-27) +Rule Brazil 1985 only - Nov 2 0:00 1:00 S +# Decree 92,310 (1986-01-21) +# Decree 92,463 (1986-03-13) +Rule Brazil 1986 only - Mar 15 0:00 0 - +# Decree 93,316 (1986-10-01) +Rule Brazil 1986 only - Oct 25 0:00 1:00 S +Rule Brazil 1987 only - Feb 14 0:00 0 - +# Decree 94,922 <http://pcdsh01.on.br/HV94922.htm> (1987-09-22) +Rule Brazil 1987 only - Oct 25 0:00 1:00 S +Rule Brazil 1988 only - Feb 7 0:00 0 - +# Decree 96,676 <http://pcdsh01.on.br/HV96676.htm> (1988-09-12) +# except for the states of AC, AM, PA, RR, RO, and AP (then a territory) +Rule Brazil 1988 only - Oct 16 0:00 1:00 S +Rule Brazil 1989 only - Jan 29 0:00 0 - +# Decree 98,077 <http://pcdsh01.on.br/HV98077.htm> (1989-08-21) +# with the same exceptions +Rule Brazil 1989 only - Oct 15 0:00 1:00 S +Rule Brazil 1990 only - Feb 11 0:00 0 - +# Decree 99,530 <http://pcdsh01.on.br/HV99530.htm> (1990-09-17) +# adopted by RS, SC, PR, SP, RJ, ES, MG, GO, MS, DF. +# Decree 99,629 (1990-10-19) adds BA, MT. +Rule Brazil 1990 only - Oct 21 0:00 1:00 S +Rule Brazil 1991 only - Feb 17 0:00 0 - +# Unnumbered decree <http://pcdsh01.on.br/HV1991.htm> (1991-09-25) +# adopted by RS, SC, PR, SP, RJ, ES, MG, BA, GO, MT, MS, DF. +Rule Brazil 1991 only - Oct 20 0:00 1:00 S +Rule Brazil 1992 only - Feb 9 0:00 0 - +# Unnumbered decree <http://pcdsh01.on.br/HV1992.htm> (1992-10-16) +# adopted by same states. +Rule Brazil 1992 only - Oct 25 0:00 1:00 S +Rule Brazil 1993 only - Jan 31 0:00 0 - +# Decree 942 <http://pcdsh01.on.br/HV942.htm> (1993-09-28) +# adopted by same states, plus AM. +# Decree 1,252 <http://pcdsh01.on.br/HV1252.htm> (1994-09-22; +# web page corrected 2004-01-07) adopted by same states, minus AM. +# Decree 1,636 <http://pcdsh01.on.br/HV1636.htm> (1995-09-14) +# adopted by same states, plus MT and TO. +# Decree 1,674 <http://pcdsh01.on.br/HV1674.htm> (1995-10-13) +# adds AL, SE. +Rule Brazil 1993 1995 - Oct Sun>=11 0:00 1:00 S +Rule Brazil 1994 1995 - Feb Sun>=15 0:00 0 - +Rule Brazil 1996 only - Feb 11 0:00 0 - +# Decree 2,000 <http://pcdsh01.on.br/HV2000.htm> (1996-09-04) +# adopted by same states, minus AL, SE. +Rule Brazil 1996 only - Oct 6 0:00 1:00 S +Rule Brazil 1997 only - Feb 16 0:00 0 - +# From Daniel C. Sobral (1998-02-12): +# In 1997, the DS began on October 6. The stated reason was that +# because international television networks ignored Brazil's policy on DS, +# they bought the wrong times on satellite for coverage of Pope's visit. +# This year, the ending date of DS was postponed to March 1 +# to help dealing with the shortages of electric power. +# +# Decree 2,317 (1997-09-04), adopted by same states. +Rule Brazil 1997 only - Oct 6 0:00 1:00 S +# Decree 2,495 <http://pcdsh01.on.br/figuras/HV2495.JPG> +# (1998-02-10) +Rule Brazil 1998 only - Mar 1 0:00 0 - +# Decree 2,780 <http://pcdsh01.on.br/figuras/Hv98.jpg> (1998-09-11) +# adopted by the same states as before. +Rule Brazil 1998 only - Oct 11 0:00 1:00 S +Rule Brazil 1999 only - Feb 21 0:00 0 - +# Decree 3,150 <http://pcdsh01.on.br/figuras/HV3150.gif> +# (1999-08-23) adopted by same states. +# Decree 3,188 <http://pcdsh01.on.br/DecHV99.gif> (1999-09-30) +# adds SE, AL, PB, PE, RN, CE, PI, MA and RR. +Rule Brazil 1999 only - Oct 3 0:00 1:00 S +Rule Brazil 2000 only - Feb 27 0:00 0 - +# Decree 3,592 <http://pcdsh01.on.br/DEC3592.htm> (2000-09-06) +# adopted by the same states as before. +# Decree 3,630 <http://pcdsh01.on.br/Dec3630.jpg> (2000-10-13) +# repeals DST in PE and RR, effective 2000-10-15 00:00. +# Decree 3,632 <http://pcdsh01.on.br/Dec3632.jpg> (2000-10-17) +# repeals DST in SE, AL, PB, RN, CE, PI and MA, effective 2000-10-22 00:00. +# Decree 3,916 <http://pcdsh01.on.br/figuras/HV3916.gif> +# (2001-09-13) reestablishes DST in AL, CE, MA, PB, PE, PI, RN, SE. +Rule Brazil 2000 2001 - Oct Sun>=8 0:00 1:00 S +Rule Brazil 2001 2006 - Feb Sun>=15 0:00 0 - +# Decree 4,399 (2002-10-01) repeals DST in AL, CE, MA, PB, PE, PI, RN, SE. +# 4,399 <http://www.presidencia.gov.br/CCIVIL/decreto/2002/D4399.htm> +Rule Brazil 2002 only - Nov 3 0:00 1:00 S +# Decree 4,844 (2003-09-24; corrected 2003-09-26) repeals DST in BA, MT, TO. +# 4,844 <http://www.presidencia.gov.br/CCIVIL/decreto/2003/D4844.htm> +Rule Brazil 2003 only - Oct 19 0:00 1:00 S +# Decree 5,223 (2004-10-01) reestablishes DST in MT. +# 5,223 <http://www.planalto.gov.br/ccivil_03/_Ato2004-2006/2004/Decreto/D5223.htm> +Rule Brazil 2004 only - Nov 2 0:00 1:00 S +# Decree 5,539 <http://pcdsh01.on.br/DecHV5539.gif> (2005-09-19), +# adopted by the same states as before. +Rule Brazil 2005 only - Oct 16 0:00 1:00 S +# Decree 5,920 <http://pcdsh01.on.br/DecHV5920.gif> (2006-10-03), +# adopted by the same states as before. +Rule Brazil 2006 only - Nov 5 0:00 1:00 S +Rule Brazil 2007 only - Feb 25 0:00 0 - +# Decree 6,212 <http://pcdsh01.on.br/DecHV6212.gif> (2007-09-26), +# adopted by the same states as before. +Rule Brazil 2007 only - Oct Sun>=8 0:00 1:00 S +# From Frederico A. C. Neves (2008-09-10): +# According to this decree +# http://www.planalto.gov.br/ccivil_03/_Ato2007-2010/2008/Decreto/D6558.htm +# [t]he DST period in Brazil now on will be from the 3rd Oct Sunday to the +# 3rd Feb Sunday. There is an exception on the return date when this is +# the Carnival Sunday then the return date will be the next Sunday... +Rule Brazil 2008 max - Oct Sun>=15 0:00 1:00 S +Rule Brazil 2008 2011 - Feb Sun>=15 0:00 0 - +Rule Brazil 2012 only - Feb Sun>=22 0:00 0 - +Rule Brazil 2013 2014 - Feb Sun>=15 0:00 0 - +Rule Brazil 2015 only - Feb Sun>=22 0:00 0 - +Rule Brazil 2016 2022 - Feb Sun>=15 0:00 0 - +Rule Brazil 2023 only - Feb Sun>=22 0:00 0 - +Rule Brazil 2024 2025 - Feb Sun>=15 0:00 0 - +Rule Brazil 2026 only - Feb Sun>=22 0:00 0 - +Rule Brazil 2027 2033 - Feb Sun>=15 0:00 0 - +Rule Brazil 2034 only - Feb Sun>=22 0:00 0 - +Rule Brazil 2035 2036 - Feb Sun>=15 0:00 0 - +Rule Brazil 2037 only - Feb Sun>=22 0:00 0 - +# From Arthur David Olson (2008-09-29): +# The next is wrong in some years but is better than nothing. +Rule Brazil 2038 max - Feb Sun>=15 0:00 0 - + +# The latest ruleset listed above says that the following states observe DST: +# DF, ES, GO, MG, MS, MT, PR, RJ, RS, SC, SP. + +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +# +# Fernando de Noronha (administratively part of PE) +Zone America/Noronha -2:09:40 - LMT 1914 + -2:00 Brazil FN%sT 1990 Sep 17 + -2:00 - FNT 1999 Sep 30 + -2:00 Brazil FN%sT 2000 Oct 15 + -2:00 - FNT 2001 Sep 13 + -2:00 Brazil FN%sT 2002 Oct 1 + -2:00 - FNT +# Other Atlantic islands have no permanent settlement. +# These include Trindade and Martim Vaz (administratively part of ES), +# Rocas Atoll (RN), and the St Peter and St Paul Archipelago (PE). +# Fernando de Noronha was a separate territory from 1942-09-02 to 1989-01-01; +# it also included the Penedos. +# +# Amapá (AP), east Pará (PA) +# East Pará includes Belém, Marabá, Serra Norte, and São Félix do Xingu. +# The division between east and west Pará is the river Xingu. +# In the north a very small part from the river Javary (now Jari I guess, +# the border with Amapá) to the Amazon, then to the Xingu. +Zone America/Belem -3:13:56 - LMT 1914 + -3:00 Brazil BR%sT 1988 Sep 12 + -3:00 - BRT +# +# west Pará (PA) +# West Pará includes Altamira, Óbidos, Prainha, Oriximiná, and Santarém. +Zone America/Santarem -3:38:48 - LMT 1914 + -4:00 Brazil AM%sT 1988 Sep 12 + -4:00 - AMT 2008 Jun 24 0:00 + -3:00 - BRT +# +# Maranhão (MA), Piauí (PI), Ceará (CE), Rio Grande do Norte (RN), +# Paraíba (PB) +Zone America/Fortaleza -2:34:00 - LMT 1914 + -3:00 Brazil BR%sT 1990 Sep 17 + -3:00 - BRT 1999 Sep 30 + -3:00 Brazil BR%sT 2000 Oct 22 + -3:00 - BRT 2001 Sep 13 + -3:00 Brazil BR%sT 2002 Oct 1 + -3:00 - BRT +# +# Pernambuco (PE) (except Atlantic islands) +Zone America/Recife -2:19:36 - LMT 1914 + -3:00 Brazil BR%sT 1990 Sep 17 + -3:00 - BRT 1999 Sep 30 + -3:00 Brazil BR%sT 2000 Oct 15 + -3:00 - BRT 2001 Sep 13 + -3:00 Brazil BR%sT 2002 Oct 1 + -3:00 - BRT +# +# Tocantins (TO) +Zone America/Araguaina -3:12:48 - LMT 1914 + -3:00 Brazil BR%sT 1990 Sep 17 + -3:00 - BRT 1995 Sep 14 + -3:00 Brazil BR%sT 2003 Sep 24 + -3:00 - BRT 2012 Oct 21 + -3:00 Brazil BR%sT 2013 Sep + -3:00 - BRT +# +# Alagoas (AL), Sergipe (SE) +Zone America/Maceio -2:22:52 - LMT 1914 + -3:00 Brazil BR%sT 1990 Sep 17 + -3:00 - BRT 1995 Oct 13 + -3:00 Brazil BR%sT 1996 Sep 4 + -3:00 - BRT 1999 Sep 30 + -3:00 Brazil BR%sT 2000 Oct 22 + -3:00 - BRT 2001 Sep 13 + -3:00 Brazil BR%sT 2002 Oct 1 + -3:00 - BRT +# +# Bahia (BA) +# There are too many Salvadors elsewhere, so use America/Bahia instead +# of America/Salvador. +Zone America/Bahia -2:34:04 - LMT 1914 + -3:00 Brazil BR%sT 2003 Sep 24 + -3:00 - BRT 2011 Oct 16 + -3:00 Brazil BR%sT 2012 Oct 21 + -3:00 - BRT +# +# Goiás (GO), Distrito Federal (DF), Minas Gerais (MG), +# Espírito Santo (ES), Rio de Janeiro (RJ), São Paulo (SP), Paraná (PR), +# Santa Catarina (SC), Rio Grande do Sul (RS) +Zone America/Sao_Paulo -3:06:28 - LMT 1914 + -3:00 Brazil BR%sT 1963 Oct 23 0:00 + -3:00 1:00 BRST 1964 + -3:00 Brazil BR%sT +# +# Mato Grosso do Sul (MS) +Zone America/Campo_Grande -3:38:28 - LMT 1914 + -4:00 Brazil AM%sT +# +# Mato Grosso (MT) +Zone America/Cuiaba -3:44:20 - LMT 1914 + -4:00 Brazil AM%sT 2003 Sep 24 + -4:00 - AMT 2004 Oct 1 + -4:00 Brazil AM%sT +# +# Rondônia (RO) +Zone America/Porto_Velho -4:15:36 - LMT 1914 + -4:00 Brazil AM%sT 1988 Sep 12 + -4:00 - AMT +# +# Roraima (RR) +Zone America/Boa_Vista -4:02:40 - LMT 1914 + -4:00 Brazil AM%sT 1988 Sep 12 + -4:00 - AMT 1999 Sep 30 + -4:00 Brazil AM%sT 2000 Oct 15 + -4:00 - AMT +# +# east Amazonas (AM): Boca do Acre, Jutaí, Manaus, Floriano Peixoto +# The great circle line from Tabatinga to Porto Acre divides +# east from west Amazonas. +Zone America/Manaus -4:00:04 - LMT 1914 + -4:00 Brazil AM%sT 1988 Sep 12 + -4:00 - AMT 1993 Sep 28 + -4:00 Brazil AM%sT 1994 Sep 22 + -4:00 - AMT +# +# west Amazonas (AM): Atalaia do Norte, Boca do Maoco, Benjamin Constant, +# Eirunepé, Envira, Ipixuna +Zone America/Eirunepe -4:39:28 - LMT 1914 + -5:00 Brazil AC%sT 1988 Sep 12 + -5:00 - ACT 1993 Sep 28 + -5:00 Brazil AC%sT 1994 Sep 22 + -5:00 - ACT 2008 Jun 24 0:00 + -4:00 - AMT 2013 Nov 10 + -5:00 - ACT +# +# Acre (AC) +Zone America/Rio_Branco -4:31:12 - LMT 1914 + -5:00 Brazil AC%sT 1988 Sep 12 + -5:00 - ACT 2008 Jun 24 0:00 + -4:00 - AMT 2013 Nov 10 + -5:00 - ACT + +# Chile + +# From Paul Eggert (2015-04-03): +# Shanks & Pottenger says America/Santiago introduced standard time in +# 1890 and rounds its UTC offset to 70W40; guess that in practice this +# was the same offset as in 1916-1919. It also says Pacific/Easter +# standardized on 109W22 in 1890; assume this didn't change the clocks. +# +# Dates for America/Santiago from 1910 to 2004 are primarily from +# the following source, cited by Oscar van Vlijmen (2006-10-08): +# [1] Chile Law +# http://www.webexhibits.org/daylightsaving/chile.html +# This contains a copy of a this official table: +# Cambios en la hora oficial de Chile desde 1900 (retrieved 2008-03-30) +# http://web.archive.org/web/20080330200901/http://www.horaoficial.cl/cambio.htm +# [1] needs several corrections, though. +# +# The first set of corrections is from: +# [2] History of the Official Time of Chile +# http://www.horaoficial.cl/ing/horaof_ing.html (retrieved 2012-03-06). See: +# http://web.archive.org/web/20120306042032/http://www.horaoficial.cl/ing/horaof_ing.html +# This is an English translation of: +# Historia de la hora oficial de Chile (retrieved 2012-10-24). See: +# http://web.archive.org/web/20121024234627/http://www.horaoficial.cl/horaof.htm +# A fancier Spanish version (requiring mouse-clicking) is at: +# http://www.horaoficial.cl/historia_hora.html +# Conflicts between [1] and [2] were resolved as follows: +# +# - [1] says the 1910 transition was Jan 1, [2] says Jan 10 and cites +# Boletín No. 1, Aviso No. 1 (1910). Go with [2]. +# +# - [1] says SMT was -4:42:45, [2] says Chile's official time from +# 1916 to 1919 was -4:42:46.3, the meridian of Chile's National +# Astronomical Observatory (OAN), then located in what is now +# Quinta Normal in Santiago. Go with [2], rounding it to -4:42:46. +# +# - [1] says the 1918 transition was Sep 1, [2] says Sep 10 and cites +# Boletín No. 22, Aviso No. 129/1918 (1918-08-23). Go with [2]. +# +# - [1] does not give times for transitions; assume they occur +# at midnight mainland time, the current common practice. However, +# go with [2]'s specification of 23:00 for the 1947-05-21 transition. +# +# Another correction to [1] is from Jesper Nørgaard Welen, who +# wrote (2006-10-08), "I think that there are some obvious mistakes in +# the suggested link from Oscar van Vlijmen,... for instance entry 66 +# says that GMT-4 ended 1990-09-12 while entry 67 only begins GMT-3 at +# 1990-09-15 (they should have been 1990-09-15 and 1990-09-16 +# respectively), but anyhow it clears up some doubts too." +# +# Data for Pacific/Easter from 1910 through 1967 come from Shanks & +# Pottenger. After that, for lack of better info assume +# Pacific/Easter is always two hours behind America/Santiago; +# this is known to work for DST transitions starting in 2008 and +# may well be true for earlier transitions. + +# From Eduardo Krell (1995-10-19): +# The law says to switch to DST at midnight [24:00] on the second SATURDAY +# of October.... The law is the same for March and October. +# (1998-09-29): +# Because of the drought this year, the government decided to go into +# DST earlier (saturday 9/26 at 24:00). This is a one-time change only ... +# (unless there's another dry season next year, I guess). + +# From Julio I. Pacheco Troncoso (1999-03-18): +# Because of the same drought, the government decided to end DST later, +# on April 3, (one-time change). + +# From Germán Poo-Caamaño (2008-03-03): +# Due to drought, Chile extends Daylight Time in three weeks. This +# is one-time change (Saturday 3/29 at 24:00 for America/Santiago +# and Saturday 3/29 at 22:00 for Pacific/Easter) +# The Supreme Decree is located at +# http://www.shoa.cl/servicios/supremo316.pdf +# +# From José Miguel Garrido (2008-03-05): +# http://www.shoa.cl/noticias/2008/04hora/hora.htm + +# From Angel Chiang (2010-03-04): +# Subject: DST in Chile exceptionally extended to 3 April due to earthquake +# http://www.gobiernodechile.cl/viewNoticia.aspx?idArticulo=30098 +# +# From Arthur David Olson (2010-03-06): +# Angel Chiang's message confirmed by Julio Pacheco; Julio provided a patch. + +# From Glenn Eychaner (2011-03-28): +# http://diario.elmercurio.com/2011/03/28/_portada/_portada/noticias/7565897A-CA86-49E6-9E03-660B21A4883E.htm?id=3D{7565897A-CA86-49E6-9E03-660B21A4883E} +# In English: +# Chile's clocks will go back an hour this year on the 7th of May instead +# of this Saturday. They will go forward again the 3rd Saturday in +# August, not in October as they have since 1968. + +# From Mauricio Parada (2012-02-22), translated by Glenn Eychaner (2012-02-23): +# As stated in the website of the Chilean Energy Ministry +# http://www.minenergia.cl/ministerio/noticias/generales/gobierno-anuncia-fechas-de-cambio-de.html +# The Chilean Government has decided to postpone the entrance into winter time +# (to leave DST) from March 11 2012 to April 28th 2012.... +# Quote from the website communication: +# +# 6. For the year 2012, the dates of entry into winter time will be as follows: +# a. Saturday April 28, 2012, clocks should go back 60 minutes; that is, at +# 23:59:59, instead of passing to 0:00, the time should be adjusted to be 23:00 +# of the same day. +# b. Saturday, September 1, 2012, clocks should go forward 60 minutes; that is, +# at 23:59:59, instead of passing to 0:00, the time should be adjusted to be +# 01:00 on September 2. + +# From Steffen Thorsen (2013-02-15): +# According to several news sources, Chile has extended DST this year, +# they will end DST later and start DST earlier than planned. They +# hope to save energy. The new end date is 2013-04-28 00:00 and new +# start date is 2013-09-08 00:00.... +# http://www.gob.cl/informa/2013/02/15/gobierno-anuncia-fechas-de-cambio-de-hora-para-el-ano-2013.htm + +# From José Miguel Garrido (2014-02-19): +# Today appeared in the Diario Oficial a decree amending the time change +# dates to 2014. +# DST End: last Saturday of April 2014 (Sun 27 Apr 2014 03:00 UTC) +# DST Start: first Saturday of September 2014 (Sun 07 Sep 2014 04:00 UTC) +# http://www.diariooficial.interior.gob.cl//media/2014/02/19/do-20140219.pdf + +# From Eduardo Romero Urra (2015-03-03): +# Today has been published officially that Chile will use the DST time +# permanently until March 25 of 2017 +# http://www.diariooficial.interior.gob.cl/media/2015/03/03/1-large.jpg +# +# From Paul Eggert (2015-03-03): +# For now, assume that the extension will persist indefinitely. + +# From Juan Correa (2016-03-18): +# The decree regarding DST has been published in today's Official Gazette: +# http://www.diariooficial.interior.gob.cl/versiones-anteriores/do/20160318/ +# http://www.leychile.cl/Navegar?idNorma=1088502 +# It does consider the second Saturday of May and August as the dates +# for the transition; and it lists DST dates until 2019, but I think +# this scheme will stick. +# +# From Paul Eggert (2016-03-18): +# For now, assume the pattern holds for the indefinite future. +# The decree says transitions occur at 24:00; in practice this appears +# to mean 24:00 mainland time, not 24:00 local time, so that Easter +# Island is always two hours behind the mainland. + +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Chile 1927 1931 - Sep 1 0:00 1:00 S +Rule Chile 1928 1932 - Apr 1 0:00 0 - +Rule Chile 1968 only - Nov 3 4:00u 1:00 S +Rule Chile 1969 only - Mar 30 3:00u 0 - +Rule Chile 1969 only - Nov 23 4:00u 1:00 S +Rule Chile 1970 only - Mar 29 3:00u 0 - +Rule Chile 1971 only - Mar 14 3:00u 0 - +Rule Chile 1970 1972 - Oct Sun>=9 4:00u 1:00 S +Rule Chile 1972 1986 - Mar Sun>=9 3:00u 0 - +Rule Chile 1973 only - Sep 30 4:00u 1:00 S +Rule Chile 1974 1987 - Oct Sun>=9 4:00u 1:00 S +Rule Chile 1987 only - Apr 12 3:00u 0 - +Rule Chile 1988 1990 - Mar Sun>=9 3:00u 0 - +Rule Chile 1988 1989 - Oct Sun>=9 4:00u 1:00 S +Rule Chile 1990 only - Sep 16 4:00u 1:00 S +Rule Chile 1991 1996 - Mar Sun>=9 3:00u 0 - +Rule Chile 1991 1997 - Oct Sun>=9 4:00u 1:00 S +Rule Chile 1997 only - Mar 30 3:00u 0 - +Rule Chile 1998 only - Mar Sun>=9 3:00u 0 - +Rule Chile 1998 only - Sep 27 4:00u 1:00 S +Rule Chile 1999 only - Apr 4 3:00u 0 - +Rule Chile 1999 2010 - Oct Sun>=9 4:00u 1:00 S +Rule Chile 2000 2007 - Mar Sun>=9 3:00u 0 - +# N.B.: the end of March 29 in Chile is March 30 in Universal time, +# which is used below in specifying the transition. +Rule Chile 2008 only - Mar 30 3:00u 0 - +Rule Chile 2009 only - Mar Sun>=9 3:00u 0 - +Rule Chile 2010 only - Apr Sun>=1 3:00u 0 - +Rule Chile 2011 only - May Sun>=2 3:00u 0 - +Rule Chile 2011 only - Aug Sun>=16 4:00u 1:00 S +Rule Chile 2012 2014 - Apr Sun>=23 3:00u 0 - +Rule Chile 2012 2014 - Sep Sun>=2 4:00u 1:00 S +Rule Chile 2016 max - May Sun>=9 3:00u 0 - +Rule Chile 2016 max - Aug Sun>=9 4:00u 1:00 S +# IATA SSIM anomalies: (1992-02) says 1992-03-14; +# (1996-09) says 1998-03-08. Ignore these. +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone America/Santiago -4:42:46 - LMT 1890 + -4:42:46 - SMT 1910 Jan 10 # Santiago Mean Time + -5:00 - CLT 1916 Jul 1 # Chile Time + -4:42:46 - SMT 1918 Sep 10 + -4:00 - CLT 1919 Jul 1 + -4:42:46 - SMT 1927 Sep 1 + -5:00 Chile CL%sT 1932 Sep 1 + -4:00 - CLT 1942 Jun 1 + -5:00 - CLT 1942 Aug 1 + -4:00 - CLT 1946 Jul 15 + -4:00 1:00 CLST 1946 Sep 1 # central Chile + -4:00 - CLT 1947 Apr 1 + -5:00 - CLT 1947 May 21 23:00 + -4:00 Chile CL%sT +Zone Pacific/Easter -7:17:28 - LMT 1890 + -7:17:28 - EMT 1932 Sep # Easter Mean Time + -7:00 Chile EAS%sT 1982 Mar 14 3:00u # Easter Time + -6:00 Chile EAS%sT +# +# Salas y Gómez Island is uninhabited. +# Other Chilean locations, including Juan Fernández Is, Desventuradas Is, +# and Antarctic bases, are like America/Santiago. + +# Antarctic base using South American rules +# (See the file 'antarctica' for more.) +# +# Palmer, Anvers Island, since 1965 (moved 2 miles in 1968) +# +# From Ethan Dicks (1996-10-06): +# It keeps the same time as Punta Arenas, Chile, because, just like us +# and the South Pole, that's the other end of their supply line.... +# I verified with someone who was there that since 1980, +# Palmer has followed Chile. Prior to that, before the Falklands War, +# Palmer used to be supplied from Argentina. +# +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Antarctica/Palmer 0 - -00 1965 + -4:00 Arg AR%sT 1969 Oct 5 + -3:00 Arg AR%sT 1982 May + -4:00 Chile CL%sT + +# Colombia + +# Milne gives 4:56:16.4 for Bogotá time in 1899; round to nearest. He writes, +# "A variation of fifteen minutes in the public clocks of Bogota is not rare." + +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule CO 1992 only - May 3 0:00 1:00 S +Rule CO 1993 only - Apr 4 0:00 0 - +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone America/Bogota -4:56:16 - LMT 1884 Mar 13 + -4:56:16 - BMT 1914 Nov 23 # Bogotá Mean Time + -5:00 CO CO%sT # Colombia Time +# Malpelo, Providencia, San Andres +# no information; probably like America/Bogota + +# Curaçao + +# Milne gives 4:35:46.9 for Curaçao mean time; round to nearest. +# +# From Paul Eggert (2006-03-22): +# Shanks & Pottenger say that The Bottom and Philipsburg have been at +# -4:00 since standard time was introduced on 1912-03-02; and that +# Kralendijk and Rincon used Kralendijk Mean Time (-4:33:08) from +# 1912-02-02 to 1965-01-01. The former is dubious, since S&P also say +# Saba Island has been like Curaçao. +# This all predates our 1970 cutoff, though. +# +# By July 2007 Curaçao and St Maarten are planned to become +# associated states within the Netherlands, much like Aruba; +# Bonaire, Saba and St Eustatius would become directly part of the +# Netherlands as Kingdom Islands. This won't affect their time zones +# though, as far as we know. +# +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone America/Curacao -4:35:47 - LMT 1912 Feb 12 # Willemstad + -4:30 - ANT 1965 # Netherlands Antilles Time + -4:00 - AST + +# From Arthur David Olson (2011-06-15): +# use links for places with new iso3166 codes. +# The name "Lower Prince's Quarter" is both longer than fourteen characters +# and contains an apostrophe; use "Lower_Princes" below. + +Link America/Curacao America/Lower_Princes # Sint Maarten +Link America/Curacao America/Kralendijk # Caribbean Netherlands + +# Ecuador +# +# Milne says the Central and South American Telegraph Company used -5:24:15. +# +# From Paul Eggert (2007-03-04): +# Apparently Ecuador had a failed experiment with DST in 1992. +# <http://midena.gov.ec/content/view/1261/208/> (2007-02-27) and +# <http://www.hoy.com.ec/NoticiaNue.asp?row_id=249856> (2006-11-06) both +# talk about "hora Sixto". Leave this alone for now, as we have no data. +# +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone America/Guayaquil -5:19:20 - LMT 1890 + -5:14:00 - QMT 1931 # Quito Mean Time + -5:00 - ECT # Ecuador Time +Zone Pacific/Galapagos -5:58:24 - LMT 1931 # Puerto Baquerizo Moreno + -5:00 - ECT 1986 + -6:00 - GALT # Galápagos Time + +# Falklands + +# From Paul Eggert (2006-03-22): +# Between 1990 and 2000 inclusive, Shanks & Pottenger and the IATA agree except +# the IATA gives 1996-09-08. Go with Shanks & Pottenger. + +# From Falkland Islands Government Office, London (2001-01-22) +# via Jesper Nørgaard: +# ... the clocks revert back to Local Mean Time at 2 am on Sunday 15 +# April 2001 and advance one hour to summer time at 2 am on Sunday 2 +# September. It is anticipated that the clocks will revert back at 2 +# am on Sunday 21 April 2002 and advance to summer time at 2 am on +# Sunday 1 September. + +# From Rives McDow (2001-02-13): +# +# I have communicated several times with people there, and the last +# time I had communications that was helpful was in 1998. Here is +# what was said then: +# +# "The general rule was that Stanley used daylight saving and the Camp +# did not. However for various reasons many people in the Camp have +# started to use daylight saving (known locally as 'Stanley Time') +# There is no rule as to who uses daylight saving - it is a matter of +# personal choice and so it is impossible to draw a map showing who +# uses it and who does not. Any list would be out of date as soon as +# it was produced. This year daylight saving ended on April 18/19th +# and started again on September 12/13th. I do not know what the rule +# is, but can find out if you like. We do not change at the same time +# as UK or Chile." +# +# I did have in my notes that the rule was "Second Saturday in Sep at +# 0:00 until third Saturday in Apr at 0:00". I think that this does +# not agree in some cases with Shanks; is this true? +# +# Also, there is no mention in the list that some areas in the +# Falklands do not use DST. I have found in my communications there +# that these areas are on the western half of East Falkland and all of +# West Falkland. Stanley is the only place that consistently observes +# DST. Again, as in other places in the world, the farmers don't like +# it. West Falkland is almost entirely sheep farmers. +# +# I know one lady there that keeps a list of which farm keeps DST and +# which doesn't each year. She runs a shop in Stanley, and says that +# the list changes each year. She uses it to communicate to her +# customers, catching them when they are home for lunch or dinner. + +# From Paul Eggert (2001-03-05): +# For now, we'll just record the time in Stanley, since we have no +# better info. + +# From Steffen Thorsen (2011-04-01): +# The Falkland Islands will not turn back clocks this winter, but stay on +# daylight saving time. +# +# One source: +# http://www.falklandnews.com/public/story.cfm?get=5914&source=3 +# +# We have gotten this confirmed by a clerk of the legislative assembly: +# Normally the clocks revert to Local Mean Time (UTC/GMT -4 hours) on the +# third Sunday of April at 0200hrs and advance to Summer Time (UTC/GMT -3 +# hours) on the first Sunday of September at 0200hrs. +# +# IMPORTANT NOTE: During 2011, on a trial basis, the Falkland Islands +# will not revert to local mean time, but clocks will remain on Summer +# time (UTC/GMT - 3 hours) throughout the whole of 2011. Any long term +# change to local time following the trial period will be notified. +# +# From Andrew Newman (2012-02-24) +# A letter from Justin McPhee, Chief Executive, +# Cable & Wireless Falkland Islands (dated 2012-02-22) +# states... +# The current Atlantic/Stanley entry under South America expects the +# clocks to go back to standard Falklands Time (FKT) on the 15th April. +# The database entry states that in 2011 Stanley was staying on fixed +# summer time on a trial basis only. FIG need to contact IANA and/or +# the maintainers of the database to inform them we're adopting +# the same policy this year and suggest recommendations for future years. +# +# For now we will assume permanent summer time for the Falklands +# until advised differently (to apply for 2012 and beyond, after the 2011 +# experiment was apparently successful.) +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Falk 1937 1938 - Sep lastSun 0:00 1:00 S +Rule Falk 1938 1942 - Mar Sun>=19 0:00 0 - +Rule Falk 1939 only - Oct 1 0:00 1:00 S +Rule Falk 1940 1942 - Sep lastSun 0:00 1:00 S +Rule Falk 1943 only - Jan 1 0:00 0 - +Rule Falk 1983 only - Sep lastSun 0:00 1:00 S +Rule Falk 1984 1985 - Apr lastSun 0:00 0 - +Rule Falk 1984 only - Sep 16 0:00 1:00 S +Rule Falk 1985 2000 - Sep Sun>=9 0:00 1:00 S +Rule Falk 1986 2000 - Apr Sun>=16 0:00 0 - +Rule Falk 2001 2010 - Apr Sun>=15 2:00 0 - +Rule Falk 2001 2010 - Sep Sun>=1 2:00 1:00 S +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Atlantic/Stanley -3:51:24 - LMT 1890 + -3:51:24 - SMT 1912 Mar 12 # Stanley Mean Time + -4:00 Falk FK%sT 1983 May # Falkland Is Time + -3:00 Falk FK%sT 1985 Sep 15 + -4:00 Falk FK%sT 2010 Sep 5 2:00 + -3:00 - FKST + +# French Guiana +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone America/Cayenne -3:29:20 - LMT 1911 Jul + -4:00 - GFT 1967 Oct # French Guiana Time + -3:00 - GFT + +# Guyana +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone America/Guyana -3:52:40 - LMT 1915 Mar # Georgetown + -3:45 - GBGT 1966 May 26 # Br Guiana Time + -3:45 - GYT 1975 Jul 31 # Guyana Time + -3:00 - GYT 1991 +# IATA SSIM (1996-06) says -4:00. Assume a 1991 switch. + -4:00 - GYT + +# Paraguay +# +# From Paul Eggert (2006-03-22): +# Shanks & Pottenger say that spring transitions are 01:00 -> 02:00, +# and autumn transitions are 00:00 -> 23:00. Go with pre-1999 +# editions of Shanks, and with the IATA, who say transitions occur at 00:00. +# +# From Waldemar Villamayor-Venialbo (2013-09-20): +# No time of the day is established for the adjustment, so people normally +# adjust their clocks at 0 hour of the given dates. +# +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Para 1975 1988 - Oct 1 0:00 1:00 S +Rule Para 1975 1978 - Mar 1 0:00 0 - +Rule Para 1979 1991 - Apr 1 0:00 0 - +Rule Para 1989 only - Oct 22 0:00 1:00 S +Rule Para 1990 only - Oct 1 0:00 1:00 S +Rule Para 1991 only - Oct 6 0:00 1:00 S +Rule Para 1992 only - Mar 1 0:00 0 - +Rule Para 1992 only - Oct 5 0:00 1:00 S +Rule Para 1993 only - Mar 31 0:00 0 - +Rule Para 1993 1995 - Oct 1 0:00 1:00 S +Rule Para 1994 1995 - Feb lastSun 0:00 0 - +Rule Para 1996 only - Mar 1 0:00 0 - +# IATA SSIM (2000-02) says 1999-10-10; ignore this for now. +# From Steffen Thorsen (2000-10-02): +# I have three independent reports that Paraguay changed to DST this Sunday +# (10-01). +# +# Translated by Gwillim Law (2001-02-27) from +# Noticias, a daily paper in Asunción, Paraguay (2000-10-01): +# http://www.diarionoticias.com.py/011000/nacional/naciona1.htm +# Starting at 0:00 today, the clock will be set forward 60 minutes, in +# fulfillment of Decree No. 7,273 of the Executive Power.... The time change +# system has been operating for several years. Formerly there was a separate +# decree each year; the new law has the same effect, but permanently. Every +# year, the time will change on the first Sunday of October; likewise, the +# clock will be set back on the first Sunday of March. +# +Rule Para 1996 2001 - Oct Sun>=1 0:00 1:00 S +# IATA SSIM (1997-09) says Mar 1; go with Shanks & Pottenger. +Rule Para 1997 only - Feb lastSun 0:00 0 - +# Shanks & Pottenger say 1999-02-28; IATA SSIM (1999-02) says 1999-02-27, but +# (1999-09) reports no date; go with above sources and Gerd Knops (2001-02-27). +Rule Para 1998 2001 - Mar Sun>=1 0:00 0 - +# From Rives McDow (2002-02-28): +# A decree was issued in Paraguay (No. 16350) on 2002-02-26 that changed the +# dst method to be from the first Sunday in September to the first Sunday in +# April. +Rule Para 2002 2004 - Apr Sun>=1 0:00 0 - +Rule Para 2002 2003 - Sep Sun>=1 0:00 1:00 S +# +# From Jesper Nørgaard Welen (2005-01-02): +# There are several sources that claim that Paraguay made +# a timezone rule change in autumn 2004. +# From Steffen Thorsen (2005-01-05): +# Decree 1,867 (2004-03-05) +# From Carlos Raúl Perasso via Jesper Nørgaard Welen (2006-10-13) +# http://www.presidencia.gov.py/decretos/D1867.pdf +Rule Para 2004 2009 - Oct Sun>=15 0:00 1:00 S +Rule Para 2005 2009 - Mar Sun>=8 0:00 0 - +# From Carlos Raúl Perasso (2010-02-18): +# By decree number 3958 issued yesterday +# http://www.presidencia.gov.py/v1/wp-content/uploads/2010/02/decreto3958.pdf +# Paraguay changes its DST schedule, postponing the March rule to April and +# modifying the October date. The decree reads: +# ... +# Art. 1. It is hereby established that from the second Sunday of the month of +# April of this year (2010), the official time is to be set back 60 minutes, +# and that on the first Sunday of the month of October, it is to be set +# forward 60 minutes, in all the territory of the Paraguayan Republic. +# ... +Rule Para 2010 max - Oct Sun>=1 0:00 1:00 S +Rule Para 2010 2012 - Apr Sun>=8 0:00 0 - +# +# From Steffen Thorsen (2013-03-07): +# Paraguay will end DST on 2013-03-24 00:00.... +# http://www.ande.gov.py/interna.php?id=1075 +# +# From Carlos Raúl Perasso (2013-03-15): +# The change in Paraguay is now final. Decree number 10780 +# http://www.presidencia.gov.py/uploads/pdf/presidencia-3b86ff4b691c79d4f5927ca964922ec74772ce857c02ca054a52a37b49afc7fb.pdf +# From Carlos Raúl Perasso (2014-02-28): +# Decree 1264 can be found at: +# http://www.presidencia.gov.py/archivos/documentos/DECRETO1264_ey9r8zai.pdf +Rule Para 2013 max - Mar Sun>=22 0:00 0 - + +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone America/Asuncion -3:50:40 - LMT 1890 + -3:50:40 - AMT 1931 Oct 10 # Asunción Mean Time + -4:00 - PYT 1972 Oct # Paraguay Time + -3:00 - PYT 1974 Apr + -4:00 Para PY%sT + +# Peru +# +# From Evelyn C. Leeper via Mark Brader (2003-10-26) +# <news:xrGmb.39935$gA1.13896113@news4.srv.hcvlny.cv.net>: +# When we were in Peru in 1985-1986, they apparently switched over +# sometime between December 29 and January 3 while we were on the Amazon. +# +# From Paul Eggert (2006-03-22): +# Shanks & Pottenger don't have this transition. Assume 1986 was like 1987. + +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Peru 1938 only - Jan 1 0:00 1:00 S +Rule Peru 1938 only - Apr 1 0:00 0 - +Rule Peru 1938 1939 - Sep lastSun 0:00 1:00 S +Rule Peru 1939 1940 - Mar Sun>=24 0:00 0 - +Rule Peru 1986 1987 - Jan 1 0:00 1:00 S +Rule Peru 1986 1987 - Apr 1 0:00 0 - +Rule Peru 1990 only - Jan 1 0:00 1:00 S +Rule Peru 1990 only - Apr 1 0:00 0 - +# IATA is ambiguous for 1993/1995; go with Shanks & Pottenger. +Rule Peru 1994 only - Jan 1 0:00 1:00 S +Rule Peru 1994 only - Apr 1 0:00 0 - +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone America/Lima -5:08:12 - LMT 1890 + -5:08:36 - LMT 1908 Jul 28 # Lima Mean Time? + -5:00 Peru PE%sT # Peru Time + +# South Georgia +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Atlantic/South_Georgia -2:26:08 - LMT 1890 # Grytviken + -2:00 - GST # South Georgia Time + +# South Sandwich Is +# uninhabited; scientific personnel have wintered + +# Suriname +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone America/Paramaribo -3:40:40 - LMT 1911 + -3:40:52 - PMT 1935 # Paramaribo Mean Time + -3:40:36 - PMT 1945 Oct # The capital moved? + -3:30 - NEGT 1975 Nov 20 # Dutch Guiana Time + -3:30 - SRT 1984 Oct # Suriname Time + -3:00 - SRT + +# Trinidad and Tobago +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone America/Port_of_Spain -4:06:04 - LMT 1912 Mar 2 + -4:00 - AST + +# These all agree with Trinidad and Tobago since 1970. +Link America/Port_of_Spain America/Anguilla +Link America/Port_of_Spain America/Antigua +Link America/Port_of_Spain America/Dominica +Link America/Port_of_Spain America/Grenada +Link America/Port_of_Spain America/Guadeloupe +Link America/Port_of_Spain America/Marigot # St Martin (French part) +Link America/Port_of_Spain America/Montserrat +Link America/Port_of_Spain America/St_Barthelemy # St Barthélemy +Link America/Port_of_Spain America/St_Kitts # St Kitts & Nevis +Link America/Port_of_Spain America/St_Lucia +Link America/Port_of_Spain America/St_Thomas # Virgin Islands (US) +Link America/Port_of_Spain America/St_Vincent +Link America/Port_of_Spain America/Tortola # Virgin Islands (UK) + +# Uruguay +# From Paul Eggert (1993-11-18): +# Uruguay wins the prize for the strangest peacetime manipulation of the rules. +# From Shanks & Pottenger: +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +# Whitman gives 1923 Oct 1; go with Shanks & Pottenger. +Rule Uruguay 1923 only - Oct 2 0:00 0:30 HS +Rule Uruguay 1924 1926 - Apr 1 0:00 0 - +Rule Uruguay 1924 1925 - Oct 1 0:00 0:30 HS +Rule Uruguay 1933 1935 - Oct lastSun 0:00 0:30 HS +# Shanks & Pottenger give 1935 Apr 1 0:00 & 1936 Mar 30 0:00; go with Whitman. +Rule Uruguay 1934 1936 - Mar Sat>=25 23:30s 0 - +Rule Uruguay 1936 only - Nov 1 0:00 0:30 HS +Rule Uruguay 1937 1941 - Mar lastSun 0:00 0 - +# Whitman gives 1937 Oct 3; go with Shanks & Pottenger. +Rule Uruguay 1937 1940 - Oct lastSun 0:00 0:30 HS +# Whitman gives 1941 Oct 24 - 1942 Mar 27, 1942 Dec 14 - 1943 Apr 13, +# and 1943 Apr 13 "to present time"; go with Shanks & Pottenger. +Rule Uruguay 1941 only - Aug 1 0:00 0:30 HS +Rule Uruguay 1942 only - Jan 1 0:00 0 - +Rule Uruguay 1942 only - Dec 14 0:00 1:00 S +Rule Uruguay 1943 only - Mar 14 0:00 0 - +Rule Uruguay 1959 only - May 24 0:00 1:00 S +Rule Uruguay 1959 only - Nov 15 0:00 0 - +Rule Uruguay 1960 only - Jan 17 0:00 1:00 S +Rule Uruguay 1960 only - Mar 6 0:00 0 - +Rule Uruguay 1965 1967 - Apr Sun>=1 0:00 1:00 S +Rule Uruguay 1965 only - Sep 26 0:00 0 - +Rule Uruguay 1966 1967 - Oct 31 0:00 0 - +Rule Uruguay 1968 1970 - May 27 0:00 0:30 HS +Rule Uruguay 1968 1970 - Dec 2 0:00 0 - +Rule Uruguay 1972 only - Apr 24 0:00 1:00 S +Rule Uruguay 1972 only - Aug 15 0:00 0 - +Rule Uruguay 1974 only - Mar 10 0:00 0:30 HS +Rule Uruguay 1974 only - Dec 22 0:00 1:00 S +Rule Uruguay 1976 only - Oct 1 0:00 0 - +Rule Uruguay 1977 only - Dec 4 0:00 1:00 S +Rule Uruguay 1978 only - Apr 1 0:00 0 - +Rule Uruguay 1979 only - Oct 1 0:00 1:00 S +Rule Uruguay 1980 only - May 1 0:00 0 - +Rule Uruguay 1987 only - Dec 14 0:00 1:00 S +Rule Uruguay 1988 only - Mar 14 0:00 0 - +Rule Uruguay 1988 only - Dec 11 0:00 1:00 S +Rule Uruguay 1989 only - Mar 12 0:00 0 - +Rule Uruguay 1989 only - Oct 29 0:00 1:00 S +# Shanks & Pottenger say no DST was observed in 1990/1 and 1991/2, +# and that 1992/3's DST was from 10-25 to 03-01. Go with IATA. +Rule Uruguay 1990 1992 - Mar Sun>=1 0:00 0 - +Rule Uruguay 1990 1991 - Oct Sun>=21 0:00 1:00 S +Rule Uruguay 1992 only - Oct 18 0:00 1:00 S +Rule Uruguay 1993 only - Feb 28 0:00 0 - +# From Eduardo Cota (2004-09-20): +# The Uruguayan government has decreed a change in the local time.... +# http://www.presidencia.gub.uy/decretos/2004091502.htm +Rule Uruguay 2004 only - Sep 19 0:00 1:00 S +# From Steffen Thorsen (2005-03-11): +# Uruguay's DST was scheduled to end on Sunday, 2005-03-13, but in order to +# save energy ... it was postponed two weeks.... +# http://www.presidencia.gub.uy/_Web/noticias/2005/03/2005031005.htm +Rule Uruguay 2005 only - Mar 27 2:00 0 - +# From Eduardo Cota (2005-09-27): +# http://www.presidencia.gub.uy/_Web/decretos/2005/09/CM%20119_09%2009%202005_00001.PDF +# This means that from 2005-10-09 at 02:00 local time, until 2006-03-12 at +# 02:00 local time, official time in Uruguay will be at GMT -2. +Rule Uruguay 2005 only - Oct 9 2:00 1:00 S +Rule Uruguay 2006 only - Mar 12 2:00 0 - +# From Jesper Nørgaard Welen (2006-09-06): +# http://www.presidencia.gub.uy/_web/decretos/2006/09/CM%20210_08%2006%202006_00001.PDF +# +# From Steffen Thorsen (2015-06-30): +# ... it looks like they will not be using DST the coming summer: +# http://www.elobservador.com.uy/gobierno-resolvio-que-no-habra-cambio-horario-verano-n656787 +# http://www.republica.com.uy/este-ano-no-se-modificara-el-huso-horario-en-uruguay/523760/ +# From Paul Eggert (2015-06-30): +# Apparently restaurateurs complained that DST caused people to go to the beach +# instead of out to dinner. +# From Pablo Camargo (2015-07-13): +# http://archivo.presidencia.gub.uy/sci/decretos/2015/06/cons_min_201.pdf +# [dated 2015-06-29; repeals Decree 311/006 dated 2006-09-04] +Rule Uruguay 2006 2014 - Oct Sun>=1 2:00 1:00 S +Rule Uruguay 2007 2015 - Mar Sun>=8 2:00 0 - +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone America/Montevideo -3:44:44 - LMT 1898 Jun 28 + -3:44:44 - MMT 1920 May 1 # Montevideo MT + -3:30 Uruguay UY%sT 1942 Dec 14 # Uruguay Time + -3:00 Uruguay UY%sT + +# Venezuela +# +# From Paul Eggert (2015-07-28): +# For the 1965 transition see Gaceta Oficial No. 27.619 (1964-12-15), p 205.533 +# http://www.pgr.gob.ve/dmdocuments/1964/27619.pdf +# +# From John Stainforth (2007-11-28): +# ... the change for Venezuela originally expected for 2007-12-31 has +# been brought forward to 2007-12-09. The official announcement was +# published today in the "Gaceta Oficial de la República Bolivariana +# de Venezuela, número 38.819" (official document for all laws or +# resolution publication) +# http://www.globovision.com/news.php?nid=72208 + +# From Alexander Krivenyshev (2016-04-15): +# https://actualidad.rt.com/actualidad/204758-venezuela-modificar-huso-horario-sequia-elnino +# +# From Paul Eggert (2016-04-15): +# Clocks advance 30 minutes on 2016-05-01 at 02:30.... +# "'Venezuela's new time-zone: hours without light, hours without water, +# hours of presidential broadcasts, hours of lines,' quipped comedian +# Jean Mary Curró ...". See: Cawthorne A, Kai D. Venezuela scraps +# half-hour time difference set by Chavez. Reuters 2016-04-15 14:50 -0400 +# http://www.reuters.com/article/us-venezuela-timezone-idUSKCN0XC2BE +# +# From Matt Johnson (2016-04-20): +# ... published in the official Gazette [2016-04-18], here: +# http://historico.tsj.gob.ve/gaceta_ext/abril/1842016/E-1842016-4551.pdf + +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone America/Caracas -4:27:44 - LMT 1890 + -4:27:40 - CMT 1912 Feb 12 # Caracas Mean Time? + -4:30 - VET 1965 Jan 1 0:00 # Venezuela T. + -4:00 - VET 2007 Dec 9 3:00 + -4:30 - VET 2016 May 1 2:30 + -4:00 - VET diff --git a/tz/strftime.c b/tz/strftime.c new file mode 100644 index 0000000..f75f9fd --- /dev/null +++ b/tz/strftime.c @@ -0,0 +1,626 @@ +/* Convert a broken-down time stamp to a string. */ + +/* Copyright 1989 The Regents of the University of California. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. Neither the name of the University nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. */ + +/* +** Based on the UCB version with the copyright notice appearing above. +** +** This is ANSIish only when "multibyte character == plain character". +*/ + +#include "private.h" + +#include "tzfile.h" +#include "fcntl.h" +#include "locale.h" + +struct lc_time_T { + const char * mon[MONSPERYEAR]; + const char * month[MONSPERYEAR]; + const char * wday[DAYSPERWEEK]; + const char * weekday[DAYSPERWEEK]; + const char * X_fmt; + const char * x_fmt; + const char * c_fmt; + const char * am; + const char * pm; + const char * date_fmt; +}; + +#define Locale (&C_time_locale) + +static const struct lc_time_T C_time_locale = { + { + "Jan", "Feb", "Mar", "Apr", "May", "Jun", + "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" + }, { + "January", "February", "March", "April", "May", "June", + "July", "August", "September", "October", "November", "December" + }, { + "Sun", "Mon", "Tue", "Wed", + "Thu", "Fri", "Sat" + }, { + "Sunday", "Monday", "Tuesday", "Wednesday", + "Thursday", "Friday", "Saturday" + }, + + /* X_fmt */ + "%H:%M:%S", + + /* + ** x_fmt + ** C99 requires this format. + ** Using just numbers (as here) makes Quakers happier; + ** it's also compatible with SVR4. + */ + "%m/%d/%y", + + /* + ** c_fmt + ** C99 requires this format. + ** Previously this code used "%D %X", but we now conform to C99. + ** Note that + ** "%a %b %d %H:%M:%S %Y" + ** is used by Solaris 2.3. + */ + "%a %b %e %T %Y", + + /* am */ + "AM", + + /* pm */ + "PM", + + /* date_fmt */ + "%a %b %e %H:%M:%S %Z %Y" +}; + +static char * _add(const char *, char *, const char *); +static char * _conv(int, const char *, char *, const char *); +static char * _fmt(const char *, const struct tm *, char *, const char *, + int *); +static char * _yconv(int, int, bool, bool, char *, char const *); + +#if !HAVE_POSIX_DECLS +extern char * tzname[]; +#endif + +#ifndef YEAR_2000_NAME +#define YEAR_2000_NAME "CHECK_STRFTIME_FORMATS_FOR_TWO_DIGIT_YEARS" +#endif /* !defined YEAR_2000_NAME */ + +#define IN_NONE 0 +#define IN_SOME 1 +#define IN_THIS 2 +#define IN_ALL 3 + +#if HAVE_STRFTIME_L +size_t +strftime_l(char *s, size_t maxsize, char const *format, struct tm const *t, + locale_t locale) +{ + /* Just call strftime, as only the C locale is supported. */ + return strftime(s, maxsize, format, t); +} +#endif + +size_t +strftime(char *s, size_t maxsize, const char *format, const struct tm *t) +{ + char * p; + int warn; + + tzset(); + warn = IN_NONE; + p = _fmt(((format == NULL) ? "%c" : format), t, s, s + maxsize, &warn); +#ifndef NO_RUN_TIME_WARNINGS_ABOUT_YEAR_2000_PROBLEMS_THANK_YOU + if (warn != IN_NONE && getenv(YEAR_2000_NAME) != NULL) { + fprintf(stderr, "\n"); + if (format == NULL) + fprintf(stderr, "NULL strftime format "); + else fprintf(stderr, "strftime format \"%s\" ", + format); + fprintf(stderr, "yields only two digits of years in "); + if (warn == IN_SOME) + fprintf(stderr, "some locales"); + else if (warn == IN_THIS) + fprintf(stderr, "the current locale"); + else fprintf(stderr, "all locales"); + fprintf(stderr, "\n"); + } +#endif /* !defined NO_RUN_TIME_WARNINGS_ABOUT_YEAR_2000_PROBLEMS_THANK_YOU */ + if (p == s + maxsize) + return 0; + *p = '\0'; + return p - s; +} + +static char * +_fmt(const char *format, const struct tm *t, char *pt, + const char *ptlim, int *warnp) +{ + for ( ; *format; ++format) { + if (*format == '%') { +label: + switch (*++format) { + case '\0': + --format; + break; + case 'A': + pt = _add((t->tm_wday < 0 || + t->tm_wday >= DAYSPERWEEK) ? + "?" : Locale->weekday[t->tm_wday], + pt, ptlim); + continue; + case 'a': + pt = _add((t->tm_wday < 0 || + t->tm_wday >= DAYSPERWEEK) ? + "?" : Locale->wday[t->tm_wday], + pt, ptlim); + continue; + case 'B': + pt = _add((t->tm_mon < 0 || + t->tm_mon >= MONSPERYEAR) ? + "?" : Locale->month[t->tm_mon], + pt, ptlim); + continue; + case 'b': + case 'h': + pt = _add((t->tm_mon < 0 || + t->tm_mon >= MONSPERYEAR) ? + "?" : Locale->mon[t->tm_mon], + pt, ptlim); + continue; + case 'C': + /* + ** %C used to do a... + ** _fmt("%a %b %e %X %Y", t); + ** ...whereas now POSIX 1003.2 calls for + ** something completely different. + ** (ado, 1993-05-24) + */ + pt = _yconv(t->tm_year, TM_YEAR_BASE, + true, false, pt, ptlim); + continue; + case 'c': + { + int warn2 = IN_SOME; + + pt = _fmt(Locale->c_fmt, t, pt, ptlim, &warn2); + if (warn2 == IN_ALL) + warn2 = IN_THIS; + if (warn2 > *warnp) + *warnp = warn2; + } + continue; + case 'D': + pt = _fmt("%m/%d/%y", t, pt, ptlim, warnp); + continue; + case 'd': + pt = _conv(t->tm_mday, "%02d", pt, ptlim); + continue; + case 'E': + case 'O': + /* + ** C99 locale modifiers. + ** The sequences + ** %Ec %EC %Ex %EX %Ey %EY + ** %Od %oe %OH %OI %Om %OM + ** %OS %Ou %OU %OV %Ow %OW %Oy + ** are supposed to provide alternate + ** representations. + */ + goto label; + case 'e': + pt = _conv(t->tm_mday, "%2d", pt, ptlim); + continue; + case 'F': + pt = _fmt("%Y-%m-%d", t, pt, ptlim, warnp); + continue; + case 'H': + pt = _conv(t->tm_hour, "%02d", pt, ptlim); + continue; + case 'I': + pt = _conv((t->tm_hour % 12) ? + (t->tm_hour % 12) : 12, + "%02d", pt, ptlim); + continue; + case 'j': + pt = _conv(t->tm_yday + 1, "%03d", pt, ptlim); + continue; + case 'k': + /* + ** This used to be... + ** _conv(t->tm_hour % 12 ? + ** t->tm_hour % 12 : 12, 2, ' '); + ** ...and has been changed to the below to + ** match SunOS 4.1.1 and Arnold Robbins' + ** strftime version 3.0. That is, "%k" and + ** "%l" have been swapped. + ** (ado, 1993-05-24) + */ + pt = _conv(t->tm_hour, "%2d", pt, ptlim); + continue; +#ifdef KITCHEN_SINK + case 'K': + /* + ** After all this time, still unclaimed! + */ + pt = _add("kitchen sink", pt, ptlim); + continue; +#endif /* defined KITCHEN_SINK */ + case 'l': + /* + ** This used to be... + ** _conv(t->tm_hour, 2, ' '); + ** ...and has been changed to the below to + ** match SunOS 4.1.1 and Arnold Robbin's + ** strftime version 3.0. That is, "%k" and + ** "%l" have been swapped. + ** (ado, 1993-05-24) + */ + pt = _conv((t->tm_hour % 12) ? + (t->tm_hour % 12) : 12, + "%2d", pt, ptlim); + continue; + case 'M': + pt = _conv(t->tm_min, "%02d", pt, ptlim); + continue; + case 'm': + pt = _conv(t->tm_mon + 1, "%02d", pt, ptlim); + continue; + case 'n': + pt = _add("\n", pt, ptlim); + continue; + case 'p': + pt = _add((t->tm_hour >= (HOURSPERDAY / 2)) ? + Locale->pm : + Locale->am, + pt, ptlim); + continue; + case 'R': + pt = _fmt("%H:%M", t, pt, ptlim, warnp); + continue; + case 'r': + pt = _fmt("%I:%M:%S %p", t, pt, ptlim, warnp); + continue; + case 'S': + pt = _conv(t->tm_sec, "%02d", pt, ptlim); + continue; + case 's': + { + struct tm tm; + char buf[INT_STRLEN_MAXIMUM( + time_t) + 1]; + time_t mkt; + + tm = *t; + mkt = mktime(&tm); + if (TYPE_SIGNED(time_t)) + sprintf(buf, "%"PRIdMAX, + (intmax_t) mkt); + else sprintf(buf, "%"PRIuMAX, + (uintmax_t) mkt); + pt = _add(buf, pt, ptlim); + } + continue; + case 'T': + pt = _fmt("%H:%M:%S", t, pt, ptlim, warnp); + continue; + case 't': + pt = _add("\t", pt, ptlim); + continue; + case 'U': + pt = _conv((t->tm_yday + DAYSPERWEEK - + t->tm_wday) / DAYSPERWEEK, + "%02d", pt, ptlim); + continue; + case 'u': + /* + ** From Arnold Robbins' strftime version 3.0: + ** "ISO 8601: Weekday as a decimal number + ** [1 (Monday) - 7]" + ** (ado, 1993-05-24) + */ + pt = _conv((t->tm_wday == 0) ? + DAYSPERWEEK : t->tm_wday, + "%d", pt, ptlim); + continue; + case 'V': /* ISO 8601 week number */ + case 'G': /* ISO 8601 year (four digits) */ + case 'g': /* ISO 8601 year (two digits) */ +/* +** From Arnold Robbins' strftime version 3.0: "the week number of the +** year (the first Monday as the first day of week 1) as a decimal number +** (01-53)." +** (ado, 1993-05-24) +** +** From <http://www.ft.uni-erlangen.de/~mskuhn/iso-time.html> by Markus Kuhn: +** "Week 01 of a year is per definition the first week which has the +** Thursday in this year, which is equivalent to the week which contains +** the fourth day of January. In other words, the first week of a new year +** is the week which has the majority of its days in the new year. Week 01 +** might also contain days from the previous year and the week before week +** 01 of a year is the last week (52 or 53) of the previous year even if +** it contains days from the new year. A week starts with Monday (day 1) +** and ends with Sunday (day 7). For example, the first week of the year +** 1997 lasts from 1996-12-30 to 1997-01-05..." +** (ado, 1996-01-02) +*/ + { + int year; + int base; + int yday; + int wday; + int w; + + year = t->tm_year; + base = TM_YEAR_BASE; + yday = t->tm_yday; + wday = t->tm_wday; + for ( ; ; ) { + int len; + int bot; + int top; + + len = isleap_sum(year, base) ? + DAYSPERLYEAR : + DAYSPERNYEAR; + /* + ** What yday (-3 ... 3) does + ** the ISO year begin on? + */ + bot = ((yday + 11 - wday) % + DAYSPERWEEK) - 3; + /* + ** What yday does the NEXT + ** ISO year begin on? + */ + top = bot - + (len % DAYSPERWEEK); + if (top < -3) + top += DAYSPERWEEK; + top += len; + if (yday >= top) { + ++base; + w = 1; + break; + } + if (yday >= bot) { + w = 1 + ((yday - bot) / + DAYSPERWEEK); + break; + } + --base; + yday += isleap_sum(year, base) ? + DAYSPERLYEAR : + DAYSPERNYEAR; + } +#ifdef XPG4_1994_04_09 + if ((w == 52 && + t->tm_mon == TM_JANUARY) || + (w == 1 && + t->tm_mon == TM_DECEMBER)) + w = 53; +#endif /* defined XPG4_1994_04_09 */ + if (*format == 'V') + pt = _conv(w, "%02d", + pt, ptlim); + else if (*format == 'g') { + *warnp = IN_ALL; + pt = _yconv(year, base, + false, true, + pt, ptlim); + } else pt = _yconv(year, base, + true, true, + pt, ptlim); + } + continue; + case 'v': + /* + ** From Arnold Robbins' strftime version 3.0: + ** "date as dd-bbb-YYYY" + ** (ado, 1993-05-24) + */ + pt = _fmt("%e-%b-%Y", t, pt, ptlim, warnp); + continue; + case 'W': + pt = _conv((t->tm_yday + DAYSPERWEEK - + (t->tm_wday ? + (t->tm_wday - 1) : + (DAYSPERWEEK - 1))) / DAYSPERWEEK, + "%02d", pt, ptlim); + continue; + case 'w': + pt = _conv(t->tm_wday, "%d", pt, ptlim); + continue; + case 'X': + pt = _fmt(Locale->X_fmt, t, pt, ptlim, warnp); + continue; + case 'x': + { + int warn2 = IN_SOME; + + pt = _fmt(Locale->x_fmt, t, pt, ptlim, &warn2); + if (warn2 == IN_ALL) + warn2 = IN_THIS; + if (warn2 > *warnp) + *warnp = warn2; + } + continue; + case 'y': + *warnp = IN_ALL; + pt = _yconv(t->tm_year, TM_YEAR_BASE, + false, true, + pt, ptlim); + continue; + case 'Y': + pt = _yconv(t->tm_year, TM_YEAR_BASE, + true, true, + pt, ptlim); + continue; + case 'Z': +#ifdef TM_ZONE + pt = _add(t->TM_ZONE, pt, ptlim); +#else + if (t->tm_isdst >= 0) + pt = _add(tzname[t->tm_isdst != 0], + pt, ptlim); +#endif + /* + ** C99 says that %Z must be replaced by the + ** empty string if the time zone is not + ** determinable. + */ + continue; + case 'z': + { + long diff; + char const * sign; + + if (t->tm_isdst < 0) + continue; +#ifdef TM_GMTOFF + diff = t->TM_GMTOFF; +#else /* !defined TM_GMTOFF */ + /* + ** C99 says that the UT offset must + ** be computed by looking only at + ** tm_isdst. This requirement is + ** incorrect, since it means the code + ** must rely on magic (in this case + ** altzone and timezone), and the + ** magic might not have the correct + ** offset. Doing things correctly is + ** tricky and requires disobeying C99; + ** see GNU C strftime for details. + ** For now, punt and conform to the + ** standard, even though it's incorrect. + ** + ** C99 says that %z must be replaced by the + ** empty string if the time zone is not + ** determinable, so output nothing if the + ** appropriate variables are not available. + */ + if (t->tm_isdst == 0) +#ifdef USG_COMPAT + diff = -timezone; +#else /* !defined USG_COMPAT */ + continue; +#endif /* !defined USG_COMPAT */ + else +#ifdef ALTZONE + diff = -altzone; +#else /* !defined ALTZONE */ + continue; +#endif /* !defined ALTZONE */ +#endif /* !defined TM_GMTOFF */ + if (diff < 0) { + sign = "-"; + diff = -diff; + } else sign = "+"; + pt = _add(sign, pt, ptlim); + diff /= SECSPERMIN; + diff = (diff / MINSPERHOUR) * 100 + + (diff % MINSPERHOUR); + pt = _conv(diff, "%04d", pt, ptlim); + } + continue; + case '+': + pt = _fmt(Locale->date_fmt, t, pt, ptlim, + warnp); + continue; + case '%': + /* + ** X311J/88-090 (4.12.3.5): if conversion char is + ** undefined, behavior is undefined. Print out the + ** character itself as printf(3) also does. + */ + default: + break; + } + } + if (pt == ptlim) + break; + *pt++ = *format; + } + return pt; +} + +static char * +_conv(int n, const char *format, char *pt, const char *ptlim) +{ + char buf[INT_STRLEN_MAXIMUM(int) + 1]; + + sprintf(buf, format, n); + return _add(buf, pt, ptlim); +} + +static char * +_add(const char *str, char *pt, const char *ptlim) +{ + while (pt < ptlim && (*pt = *str++) != '\0') + ++pt; + return pt; +} + +/* +** POSIX and the C Standard are unclear or inconsistent about +** what %C and %y do if the year is negative or exceeds 9999. +** Use the convention that %C concatenated with %y yields the +** same output as %Y, and that %Y contains at least 4 bytes, +** with more only if necessary. +*/ + +static char * +_yconv(int a, int b, bool convert_top, bool convert_yy, + char *pt, const char *ptlim) +{ + register int lead; + register int trail; + +#define DIVISOR 100 + trail = a % DIVISOR + b % DIVISOR; + lead = a / DIVISOR + b / DIVISOR + trail / DIVISOR; + trail %= DIVISOR; + if (trail < 0 && lead > 0) { + trail += DIVISOR; + --lead; + } else if (lead < 0 && trail > 0) { + trail -= DIVISOR; + ++lead; + } + if (convert_top) { + if (lead == 0 && trail < 0) + pt = _add("-0", pt, ptlim); + else pt = _conv(lead, "%02d", pt, ptlim); + } + if (convert_yy) + pt = _conv(((trail < 0) ? -trail : trail), "%02d", pt, ptlim); + return pt; +} diff --git a/tz/systemv b/tz/systemv new file mode 100644 index 0000000..d9e2995 --- /dev/null +++ b/tz/systemv @@ -0,0 +1,37 @@ +# This file is in the public domain, so clarified as of +# 2009-05-17 by Arthur David Olson. + +# Old rules, should the need arise. +# No attempt is made to handle Newfoundland, since it cannot be expressed +# using the System V "TZ" scheme (half-hour offset), or anything outside +# North America (no support for non-standard DST start/end dates), nor +# the changes in the DST rules in the US after 1976 (which occurred after +# the old rules were written). +# +# If you need the old rules, uncomment ## lines. +# Compile this *without* leap second correction for true conformance. + +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule SystemV min 1973 - Apr lastSun 2:00 1:00 D +Rule SystemV min 1973 - Oct lastSun 2:00 0 S +Rule SystemV 1974 only - Jan 6 2:00 1:00 D +Rule SystemV 1974 only - Nov lastSun 2:00 0 S +Rule SystemV 1975 only - Feb 23 2:00 1:00 D +Rule SystemV 1975 only - Oct lastSun 2:00 0 S +Rule SystemV 1976 max - Apr lastSun 2:00 1:00 D +Rule SystemV 1976 max - Oct lastSun 2:00 0 S + +# Zone NAME GMTOFF RULES/SAVE FORMAT [UNTIL] +## Zone SystemV/AST4ADT -4:00 SystemV A%sT +## Zone SystemV/EST5EDT -5:00 SystemV E%sT +## Zone SystemV/CST6CDT -6:00 SystemV C%sT +## Zone SystemV/MST7MDT -7:00 SystemV M%sT +## Zone SystemV/PST8PDT -8:00 SystemV P%sT +## Zone SystemV/YST9YDT -9:00 SystemV Y%sT +## Zone SystemV/AST4 -4:00 - AST +## Zone SystemV/EST5 -5:00 - EST +## Zone SystemV/CST6 -6:00 - CST +## Zone SystemV/MST7 -7:00 - MST +## Zone SystemV/PST8 -8:00 - PST +## Zone SystemV/YST9 -9:00 - YST +## Zone SystemV/HST10 -10:00 - HST diff --git a/tz/time2posix.3 b/tz/time2posix.3 new file mode 100644 index 0000000..e4b8e81 --- /dev/null +++ b/tz/time2posix.3 @@ -0,0 +1,129 @@ +.TH TIME2POSIX 3 +.SH NAME +time2posix, posix2time \- convert seconds since the Epoch +.SH SYNOPSIS +.nf +.ie \n(.g .ds - \f(CW-\fP +.el ds - \- +.B #include <time.h> +.PP +.B time_t time2posix(time_t t); +.PP +.B time_t posix2time(time_t t); +.PP +.B cc ... \*-ltz +.fi +.SH DESCRIPTION +.ie '\(en'' .ds en \- +.el .ds en \(en +.ie '\(lq'' .ds lq \&"\" +.el .ds lq \(lq\" +.ie '\(rq'' .ds rq \&"\" +.el .ds rq \(rq\" +.de q +\\$3\*(lq\\$1\*(rq\\$2 +.. +IEEE Standard 1003.1 +(POSIX) +requires the time_t value 536457599 to stand for 1986-12-31 23:59:59 UTC. +This effectively implies that POSIX time_t values cannot include leap +seconds and, +therefore, +that the system time must be adjusted as each leap occurs. +.PP +If the time package is configured with leap-second support +enabled, +however, +no such adjustment is needed and +time_t values continue to increase over leap events +(as a true +.q "seconds since..." +value). +This means that these values will differ from those required by POSIX +by the net number of leap seconds inserted since the Epoch. +.PP +Typically this is not a problem as the type time_t is intended +to be +(mostly) +opaque \*(en time_t values should only be obtained-from and +passed-to functions such as +.IR time(2) , +.IR localtime(3) , +.IR mktime(3) , +and +.IR difftime(3) . +However, +POSIX gives an arithmetic +expression for directly computing a time_t value from a given date/time, +and the same relationship is assumed by some +(usually older) +applications. +Any programs creating/dissecting time_t's +using such a relationship will typically not handle intervals +over leap seconds correctly. +.PP +The +.I time2posix +and +.I posix2time +functions are provided to address this time_t mismatch by converting +between local time_t values and their POSIX equivalents. +This is done by accounting for the number of time-base changes that +would have taken place on a POSIX system as leap seconds were inserted +or deleted. +These converted values can then be used in lieu of correcting the older +applications, +or when communicating with POSIX-compliant systems. +.PP +.I Time2posix +is single-valued. +That is, +every local time_t +corresponds to a single POSIX time_t. +.I Posix2time +is less well-behaved: +for a positive leap second hit the result is not unique, +and for a negative leap second hit the corresponding +POSIX time_t doesn't exist so an adjacent value is returned. +Both of these are good indicators of the inferiority of the +POSIX representation. +.PP +The following table summarizes the relationship between a time +T and it's conversion to, +and back from, +the POSIX representation over the leap second inserted at the end of June, +1993. +.nf +.ta \w'93/06/30 'u +\w'23:59:59 'u +\w'A+0 'u +\w'X=time2posix(T) 'u +DATE TIME T X=time2posix(T) posix2time(X) +93/06/30 23:59:59 A+0 B+0 A+0 +93/06/30 23:59:60 A+1 B+1 A+1 or A+2 +93/07/01 00:00:00 A+2 B+1 A+1 or A+2 +93/07/01 00:00:01 A+3 B+2 A+3 + +A leap second deletion would look like... + +DATE TIME T X=time2posix(T) posix2time(X) +??/06/30 23:59:58 A+0 B+0 A+0 +??/07/01 00:00:00 A+1 B+2 A+1 +??/07/01 00:00:01 A+2 B+3 A+2 +.sp +.ce + [Note: posix2time(B+1) => A+0 or A+1] +.fi +.PP +If leap-second support is not enabled, +local time_t's and +POSIX time_t's are equivalent, +and both +.I time2posix +and +.I posix2time +degenerate to the identity function. +.SH SEE ALSO +difftime(3), +localtime(3), +mktime(3), +time(2) +.\" This file is in the public domain, so clarified as of +.\" 1996-06-05 by Arthur David Olson. diff --git a/tz/tz-art.htm b/tz/tz-art.htm new file mode 100644 index 0000000..c06d805 --- /dev/null +++ b/tz/tz-art.htm @@ -0,0 +1,574 @@ +<!DOCTYPE html +PUBLIC "-//W3C//DTD HTML 4.01//EN" +"http://www.w3.org/TR/html4/strict.dtd"> +<html> +<head> +<meta http-equiv="Content-type" content='text/html; charset="UTF-8"'> +<title>Time and the Arts</title> +</head> +<body> +<h1>Time and the Arts</h1> +<h2>Documentaries</h2> +<ul> +<li> +"<a href="https://www.youtube.com/watch?v=84aWtseb2-4">Daylight +Saving Time Explained</a>" (2011; 6:39) lightly covers daylight saving +time's theory, history, pros and cons. Among other things, it explains +Arizona's daylight-saving enclaves quite well.</li> +<li> +"<a href="https://www.youtube.com/watch?v=-5wpm-gesOY">The Problem +with Time & Timezones – Computerphile</a>" (2013; 10:12) delves +into problems that programmers have with timekeeping.</li> +<li> +"About Time" (1962; 53 minutes) is part of the the +Bell Science extravaganza, with Frank Baxter, Richard Deacon, and Les Tremayne. +(<a href="http://www.imdb.com/title/tt0154110/">IMDb entry</a>.)</li> +</ul> +<h2>Music</h2> +<p> +Data on recordings of "Save That Time," Russ Long, Serrob Publishing, BMI:</p> +<table> +<tr><td>Artist</td><td>Karrin Allyson</td></tr> +<tr><td>CD</td><td>I Didn't Know About You</td></tr> +<tr><td>Copyright Date</td><td>1993</td></tr> +<tr><td>Label</td><td>Concord Jazz, Inc.</td></tr> +<tr><td>ID</td><td>CCD-4543</td></tr> +<tr><td>Track Time</td><td>3:44</td></tr> +<tr><td>Personnel</td><td>Karrin Allyson, vocal; +Russ Long, piano; +Gerald Spaits, bass; +Todd Strait, drums</td></tr> +<tr><td>Notes</td><td>CD notes "additional lyric by Karrin Allyson; +arranged by Russ Long and Karrin Allyson"</td></tr> +<tr><td>ADO Rating</td><td>1 star</td></tr> +<tr><td><a href="http://www.allmusic.com/album/i-didnt-know-about-you-mw0000618657">AMG Rating</a></td><td>4 stars</td></tr> +<tr><td>Penguin Rating</td><td>3.5 stars</td></tr> +<tr><td> </td></tr> +<tr><td>Artist</td><td>Kevin Mahogany</td></tr> +<tr><td>CD</td><td>Double Rainbow</td></tr> +<tr><td>Copyright Date</td><td>1993</td></tr> +<tr><td>Label</td><td>Enja Records</td></tr> +<tr><td>ID</td><td>ENJ-7097 2</td></tr> +<tr><td>Track Time</td><td>6:27</td></tr> +<tr><td>Personnel</td><td>Kevin Mahogany, vocal; +Kenny Barron, piano; +Ray Drummond, bass; +Ralph Moore, tenor saxophone; +Lewis Nash, drums</td></tr> +<tr><td>ADO Rating</td><td>1.5 stars</td></tr> +<tr><td><a href="http://www.allmusic.com/album/double-rainbow-mw0000620371">AMG Rating</a></td><td>3 stars</td></tr> +<tr><td>Penguin Rating</td><td>3 stars</td></tr> +<tr><td> </td></tr> +<tr><td>Artist</td><td>Joe Williams</td></tr> +<tr><td>CD</td><td>Here's to Life</td></tr> +<tr><td>Copyright Date</td><td>1994</td></tr> +<tr><td>Label</td><td>Telarc International Corporation</td></tr> +<tr><td>ID</td><td>CD-83357</td></tr> +<tr><td>Track Time</td><td>3:58</td></tr> +<tr><td>Personnel</td><td>Joe Williams, vocal +The Robert Farnon [39 piece] Orchestra</td></tr> +<tr><td>Notes</td><td>This CD is also available as part of a 3-CD package from +Telarc, "Triple Play" (CD-83461)</td></tr> +<tr><td>ADO Rating</td><td>black dot</td></tr> +<tr><td><a href="http://www.allmusic.com/album/heres-to-life-mw0000623648">AMG Rating</a></td><td>2 stars</td></tr> +<tr><td>Penguin Rating</td><td>3 stars</td></tr> +<tr><td> </td></tr> +<tr><td>Artist</td><td>Charles Fambrough</td></tr> +<tr><td>CD</td><td>Keeper of the Spirit</td></tr> +<tr><td>Copyright Date</td><td>1995</td></tr> +<tr><td>Label</td><td>AudioQuest Music</td></tr> +<tr><td>ID</td><td>AQ-CD1033</td></tr> +<tr><td>Track Time</td><td>7:07</td></tr> +<tr><td>Personnel</td><td>Charles Fambrough, bass; +Joel Levine, tenor recorder; +Edward Simon, piano; +Lenny White, drums; +Marion Simon, percussion</td></tr> +<tr><td>ADO Rating</td><td>2 stars</td></tr> +<tr><td><a href="http://www.allmusic.com/album/keeper-of-the-spirit-mw0000176559">AMG Rating</a></td><td>unrated</td></tr> +<tr><td>Penguin Rating</td><td>3 stars</td></tr> +</table> +<hr> +<p>Also of note:</p> +<table> +<tr><td>Artist</td><td>Holly Cole Trio</td></tr> +<tr><td>CD</td><td>Blame It On My Youth</td></tr> +<tr><td>Copyright Date</td><td>1992</td></tr> +<tr><td>Label</td><td>Manhattan</td></tr> +<tr><td>ID</td><td>CDP 7 97349 2</td></tr> +<tr><td>Total Time</td><td>37:45</td></tr> +<tr><td>Personnel</td><td>Holly Cole, voice; +Aaron Davis, piano; +David Piltch, string bass</td></tr> +<tr><td>Notes</td><td>Lyrical reference to "Eastern Standard Time" in +Tom Waits' "Purple Avenue"</td></tr> +<tr><td>ADO Rating</td><td>2.5 stars</td></tr> +<tr><td><a href="http://www.allmusic.com/album/blame-it-on-my-youth-mw0000274303">AMG Rating</a></td><td>3 stars</td></tr> +<tr><td>Penguin Rating</td><td>unrated</td></tr> +<tr><td> </td></tr> +<tr><td>Artist</td><td>Milt Hinton</td></tr> +<tr><td>CD</td><td>Old Man Time</td></tr> +<tr><td>Copyright Date</td><td>1990</td></tr> +<tr><td>Label</td><td>Chiaroscuro</td></tr> +<tr><td>ID</td><td>CR(D) 310</td></tr> +<tr><td>Total Time</td><td>149:38 (two CDs)</td></tr> +<tr><td>Personnel</td><td>Milt Hinton, bass; +Doc Cheatham, Dizzy Gillespie, Clark Terry, trumpet; +Al Grey, trombone; +Eddie Barefield, Joe Camel (Flip Phillips), Buddy Tate, +clarinet and saxophone; +John Bunch, Red Richards, Norman Simmons, Derek Smith, +Ralph Sutton, piano; +Danny Barker, Al Casey, guitar; +Gus Johnson, Gerryck King, Bob Rosengarden, Jackie Williams, +drums; +Lionel Hampton, vibraphone; +Cab Calloway, Joe Williams, vocal; +Buck Clayton, arrangements</td></tr> +<tr><td>Notes</td><td>tunes include Old Man Time, Time After Time, +Sometimes I'm Happy, +A Hot Time in the Old Town Tonight, +Four or Five Times, Now's the Time, +Time on My Hands, This Time It's Us, +and Good Time Charlie. +<a href="http://www.chiaroscurojazz.com/album.php?C=310">Album info</a> +is available.</td></tr> +<tr><td>ADO Rating</td><td>3 stars</td></tr> +<tr><td><a href="http://www.allmusic.com/album/old-man-time-mw0000269353">AMG Rating</a></td><td>4.5 stars</td></tr> +<tr><td>Penguin Rating</td><td>3 stars</td></tr> +<tr><td> </td></tr> +<tr><td>Artist</td><td>Alan Broadbent</td></tr> +<tr><td>CD</td><td>Pacific Standard Time</td></tr> +<tr><td>Copyright Date</td><td>1995</td></tr> +<tr><td>Label</td><td>Concord Jazz, Inc.</td></tr> +<tr><td>ID</td><td>CCD-4664</td></tr> +<tr><td>Total Time</td><td>62:42</td></tr> +<tr><td>Personnel</td><td>Alan Broadbent, piano; +Putter Smith, Bass; +Frank Gibson, Jr., drums</td></tr> +<tr><td>Notes</td><td>The CD cover features an analemma for equation-of-time fans</td></tr> +<tr><td>ADO Rating</td><td>1 star</td></tr> +<tr><td><a href="http://www.allmusic.com/album/pacific-standard-time-mw0000645433">AMG Rating</a></td><td>4 stars</td></tr> +<tr><td>Penguin Rating</td><td>3.5 stars</td></tr> +<tr><td> </td></tr> +<tr><td>Artist</td><td>Anthony Braxton/Richard Teitelbaum</td></tr> +<tr><td>CD</td><td>Silence/Time Zones</td></tr> +<tr><td>Copyright Date</td><td>1996</td></tr> +<tr><td>Label</td><td>Black Lion</td></tr> +<tr><td>ID</td><td>BLCD 760221</td></tr> +<tr><td>Total Time</td><td>72:58</td></tr> +<tr><td>Personnel</td><td>Anthony Braxton, sopranino and alto saxophones, +contrebasse clarinet, miscellaneous instruments; +Leo Smith, trumpet and miscellaneous instruments; +Leroy Jenkins, violin and miscellaneous instruments; +Richard Teitelbaum, modular moog and micromoog synthesizer</td></tr> +<tr><td>ADO Rating</td><td>black dot</td></tr> +<tr><td><a href="http://www.allmusic.com/album/silence-time-zones-mw0000595735">AMG Rating</a></td><td>4 stars</td></tr> +<tr><td> </td></tr> +<tr><td>Artist</td><td>Charles Gayle</td></tr> +<tr><td>CD</td><td>Time Zones</td></tr> +<tr><td>Copyright Date</td><td>2006</td></tr> +<tr><td>Label</td><td>Tompkins Square</td></tr> +<tr><td>ID</td><td>TSQ2839</td></tr> +<tr><td>Total Time</td><td>49:06</td></tr> +<tr><td>Personnel</td><td>Charles Gayle, piano</td></tr> +<tr><td>ADO Rating</td><td>1 star</td></tr> +<tr><td><a href="http://www.allmusic.com/album/time-zones-mw0000349642">AMG Rating</a></td><td>4.5 stars</td></tr> +<tr><td> </td></tr> +<tr><td>Artist</td><td>The Get Up Kids</td></tr> +<tr><td>CD</td><td>Eudora</td></tr> +<tr><td>Copyright Date</td><td>2001</td></tr> +<tr><td>Label</td><td>Vagrant</td></tr> +<tr><td>ID</td><td>357</td></tr> +<tr><td>Total Time</td><td>65:12</td></tr> +<tr><td>Notes</td><td>Includes the song "Central Standard Time." Thanks to Colin Bowern for this information.</td></tr> +<tr><td><a href="http://www.allmusic.com/album/eudora-mw0000592063">AMG Rating</a></td><td>2.5 stars</td></tr> +<tr><td> </td></tr> + +<tr><td>Artist</td><td>Coldplay</td></tr> +<tr><td>Song</td><td>Clocks</td></tr> +<tr><td>Copyright Date</td><td>2003</td></tr> +<tr><td>Label</td><td>Capitol Records</td></tr> +<tr><td>ID</td><td>52608</td></tr> +<tr><td>Total Time</td><td>4:13</td></tr> +<tr><td>Notes</td><td>Won the 2004 Record of the Year honor at the +Grammy Awards. Co-written and performed by Chris Martin, +great-great-grandson of DST inventor William Willett. The song's first +line is "Lights go out and I can't be saved".</td></tr> +<tr><td> </td></tr> + +<tr><td>Artist</td><td>Irving Kahal and Harry Richman</td></tr> +<tr><td>Song</td><td>There Ought to be a Moonlight Saving Time</td></tr> +<tr><td>Copyright Date</td><td>1931</td> +<tr><td>Notes</td><td>This musical standard was a No. 1 hit for Guy Lombardo +in 1931, and was also performed by Maurice Chevalier, Blossom Dearie +and many others. The phrase "Moonlight saving time" also appears in +the 1995 country song "Not Enough Hours in the Night" written by Aaron +Barker, Kim Williams and Rob Harbin and performed by Doug +Supernaw.</td></tr> +<tr><td> </td></tr> + +<tr><td>Artist</td><td>The Microscopic Septet</td></tr> +<tr><td>CD</td><td>Lobster Leaps In</td></tr> +<tr><td>Copyright Date</td><td>2008</td></tr> +<tr><td>Label</td><td>Cuneiform</td></tr> +<tr><td>ID</td><td>272</td></tr> +<tr><td>Total Time</td><td>73:05</td></tr> +<tr><td>Notes</td><td>Includes the song "Twilight Time Zone."</td></tr> +<tr><td><a href="http://www.allmusic.com/album/lobster-leaps-in-mw0000794929">AMG Rating</a></td><td>3.5 stars</td></tr> +<tr><td>ADO Rating</td><td>2 stars</td></tr> + +<tr><td> </td></tr> + +<tr><td>Artist</td><td>Bob Dylan</td></tr> +<tr><td>CD</td><td>The Times They Are a-Changin'</td></tr> +<tr><td>Copyright Date</td><td>1964</td></tr> +<tr><td>Label</td><td>Columbia</td></tr> +<tr><td>ID</td><td>CK-8905</td></tr> +<tr><td>Total Time</td><td>45:36</td></tr> +<tr><td><a href="http://www.allmusic.com/album/the-times-they-a-changin-mw0000202344">AMG Rating</a></td><td>4.5 stars</td></tr> +<tr><td>ADO Rating</td><td>1.5 stars</td></tr> +<tr><td>Notes<td>The title song is also available on "Bob Dylan's Greatest Hits" and "The Essential Bob Dylan."</td></tr> +<tr><td> </td></tr> + +<tr><td>Artist</td><td>Luciana Souza</td></tr> +<tr><td>CD</td><td>Tide</td></tr> +<tr><td>Copyright Date</td><td>2009</td></tr> +<tr><td>Label</td><td>Universal Jazz France</td></tr> +<tr><td>ID</td><td>B0012688-02</td></tr> +<tr><td>Total Time</td><td>42:31</td></tr> +<tr><td><a href="http://www.allmusic.com/album/tide-mw0000815692">AMG Rating</a></td><td>3.5 stars</td></tr> +<tr><td>ADO Rating</td><td>2.5 stars</td></tr> +<tr><td>Notes<td>Includes the song "Fire and Wood" with the lyric +"The clocks were turned back you remember/Think it's still November." +</td></tr> +<tr><td> </td></tr> +<tr><td>Artist</td><td>Ken Nordine</td></tr> +<tr><td>CD</td><td>You're Getting Better: The Word Jazz Dot Masters</td></tr> +<tr><td>Copyright Date</td><td>2005</td></tr> +<tr><td>Label</td><td>Geffen</td></tr> +<tr><td>ID</td><td>B0005171-02</td></tr> +<tr><td>Total Time</td><td>156:22</td></tr> +<tr><td>ADO Rating</td><td>1 star</td></tr> +<tr><td><a href="http://www.allmusic.com/album/youre-getting-better-the-word-jazz-dot-masters-mw0000736197">AMG Rating</a></td><td>4.5 stars</td></tr> +<tr><td>Notes</td><td>Includes the piece "What Time Is It" +("He knew what time it was everywhere...that counted").</td></tr> +</table> + +<h2>TV episodes</h2> + +<ul> +<li> +An episode of <em>The Adventures of Superman</em> entitled "The Mysterious +Cube," first aired 1958-02-24, had Superman convincing the controllers +of the Arlington Time Signal to broadcast ahead of actual time; +doing so got a crook trying to be declared dead to +emerge a bit too early from the titular enclosure. +</li> +<li> +The 1960s ITC television series <em>The Prisoner</em> included an episode +entitled "The Chimes of Big Ben" in which our protagonist tumbled to +the fraudulent nature of a Poland-to-England escape upon hearing "Big +Ben" chiming on Polish local time. +</li> +<li> +The series <em>Seinfeld</em> included an episode entitled "The Susie," first +broadcast 1997-02-13, in which Kramer decides that daylight saving time +isn't coming fast enough, so he sets his watch ahead an hour. +</li> +<li> +The "20 Hours in America" episode of <em>The West Wing</em>, +first aired 2002-09-25, +saw White House staffers stranded in Indiana; they thought they had time to +catch Air Force One but were done in by intra-Indiana local time changes. +</li> +<li> +"In what time zone would you find New York City?" was a $200 question on +the 1999-11-13 United States airing of <em>Who Wants to Be a Millionaire?</em>, +and "In 1883, what industry led the movement to divide the U.S. into four time +zones?" was a $32,000 question on the 2001-05-23 United States airing of +the same show. At this rate, the million-dollar time-zone +question should have been asked 2002-06-04. +</li> +<li> +A private jet's mid-flight change of time zones distorts Alison Dubois' +premonition in the "We Had a Dream" episode of <em>Medium</em> +(originally aired 2007-02-28). +</li> +<li> +In the <em>30 Rock</em> episode "Anna Howard Shaw Day" +(first broadcast 2010-02-11), +Jack Donaghy's date realizes that a Geneva-to-New-York business phone call +received in the evening must be fake given the difference in local times. +</li> +<li> +In the "Run by the Monkeys" episode of <em>Da Vinci's Inquest</em> +(first broadcast 2002-11-17), +a witness in a five-year-old fire case realizes they may not have set +their clock back when daylight saving ended on the day of the fire, +introducing the possibility of an hour when arson might have occurred. +</li> +<li> +In "The Todd Couple" episode of <em>Outsourced</em> (first aired 2011-02-10), +Manmeet sets up Valentine's Day teledates for 6:00 and 9:00pm; +since one is with a New Yorker and the other with a San Franciscan, +hilarity ensues. +(Never mind that this should be 7:30am in Mumbai, yet for some reason the show +proceeds as though it's also mid-evening there.) +</li> +<li> +In the "14 Days to Go"/"T Minus..." episode of +<em>You, Me and the Apocalypse</em> +(first aired 2015-11-11 in the UK, 2016-03-10 in the US), +the success of a mission to deal with a comet +hinges on whether or not Russia observes daylight saving time. +(In the US, the episode first aired in the week before the switch to DST.) +</li> +</ul> + +<table> +<tr><td>TV episode title</td><td>The Lost Hour</td> +<tr><td>TV series</td><td><em>Eerie, Indiana</em></td> +<tr><td>TV episode number</td><td>10</td> +<tr><td>Network</td><td>NBC</td> +<tr><td>Air date</td><td>1991-12-01</td> +<tr><td>Notes</td><td>Despite Indiana's then-lack of DST, Marshall changes his clock with unusual consequences.</td></tr> +<tr><td> </td></tr> + +<tr><td>TV episode title</td><td>Time Tunnel</td> +<tr><td>TV series</td><td><em>The Adventures of Pete & Pete</em></td> +<tr><td>TV episode number</td><td>5, season 2</td> +<tr><td>Network</td><td>Nickelodeon</td> +<tr><td>Air date</td><td>1994-10-23</td> +<tr><td>Notes</td><td>The two Petes travel back in time an hour on the day that DST ends.</td></tr> +<tr><td> </td></tr> + +<tr><td>TV episode title</td><td>King-Size Homer</td> +<tr><td>TV series</td><td><em>The Simpsons</em></td> +<tr><td>TV episode number</td><td>135</td> +<tr><td>Network</td><td>Fox</td> +<tr><td>Air date</td><td>1995-11-05</td> +<tr><td>Notes</td><td>Homer, working from home, remarks "8:58, first +time I've ever been early for work. Except for all those daylight +savings days. Lousy farmers."</td></tr> +<tr><td> </td></tr> + +<tr><td>TV episode title</td><td>Tracks</td></tr> +<tr><td>TV series</td><td><em>The Good Wife</em></td></tr> +<tr><td>TV episode number</td><td>12, season 7</td></tr> +<tr><td>Network</td><td>CBS</td></tr> +<tr><td>Air date</td><td>2016-01-17</td></tr> +<tr><td>Notes</td><td>The applicability of a contract hinges on the +time zone associated with a video time stamp.</td></tr> +</table> + +<h2>Books, plays, and magazines</h2> + +<table> +<tr><td>Artist</td><td>Jules Verne</td></tr> +<tr><td>Book</td><td><em>Around the World in Eighty Days</em> +(<em>Le tour du monde en quatre-vingts jours</em>)</td></tr> +<tr><td>Notes</td><td>Wall-clock time plays a central role in the plot. +European readers of the 1870s clearly held the U.S. press in +deep contempt; the protagonists cross the U.S. without once +reading a paper. +An on-line French-language version of the book +"with illustrations from the original 1873 French-language edition" +is available at +<a href="http://fourmilab.ch/etexts/www/tdm80j">http://fourmilab.ch/etexts/www/tdm80j</a> +An on-line English-language translation of the book is available at +<a href="http://www.literature.org/Works/Jules-Verne/eighty">http://www.literature.org/Works/Jules-Verne/eighty</a></td></tr> + +<tr><td> </td></tr> +<tr><td>Artist</td><td>Nick Enright</td></tr> +<tr><td>Play</td><td><em>Daylight Saving</em></td></tr> +<tr><td>Copyright Date</td><td>1989</td></tr> +<tr><td>Notes</td><td> +A fast-paced comedy about love and loneliness as the clocks turn back. +</td></tr> + +<tr><td> </td></tr> +<tr><td>Artist</td><td>Umberto Eco</td></tr> +<tr><td>Book</td><td><em>The Island of the Day Before</em> +(<em>L'isola del giorno prima</em>)</td></tr> +<tr><td>Copyright Date</td><td>1994</td></tr> +<tr><td>Notes</td><td> +"...the story of a 17th century Italian nobleman trapped near an island +on the International Date Line. Time and time zones play an integral +part in the novel." (Paul Eggert, 2006-04-22) +</td></tr> +<tr><td> </td></tr> +<tr><td>Artist</td><td>John Dunning</td></tr> +<tr><td>Book</td><td><a +href="http://books.simonandschuster.com/Two-OClock-Eastern-Wartime/John-Dunning/9781439171530"><em>Two +O'Clock, Eastern Wartime</em></a></td></tr> +<tr><td>Copyright Date</td><td>2001</td></tr> +<tr><td>Notes</td><td> +Mystery, history, daylight saving time, and old-time radio. +</td></tr> +</table> +<hr> +<ul> +<li> +Surrealist artist Guy Billout's work "Date Line" appeared on page 103 +of the 1999-11 <em>Atlantic Monthly</em>. +</li> +<li> +"Gloom, Gloom, Go Away" by Walter Kirn appeared on page 106 of <em>Time</em> +magazine's 2002-11-11 issue; among other things, it proposed +year-round DST as a way of lessening wintertime despair. +</li> +</ul> +<h2>Movies</h2> +<ul> +<li> +In the 1946 movie <em>A Matter of Life and Death</em> +(U.S. title <em>Stairway to Heaven</em>) +there is a reference to British Double Summer Time. +The time does not play a large part in the plot; +it's just a passing reference to the time when one of the +characters was supposed to have died (but didn't). +The IMDb page is at +<a href="http://us.imdb.com/title/tt0038733/"> +http://us.imdb.com/title/tt0038733/ +</a>. (Dave Cantor) +<li> +The 1953 railway comedy movie <em>The Titfield Thunderbolt</em> includes a +play on words on British Double Summer Time. Valentine's wife wants +him to leave the pub and asks him, "Do you know what time it is?" +And he, happy where he is, replies: "Yes, my love. Summer double time." +IMDb page: +<a href="http://us.imdb.com/title/tt0046436/"> +http://us.imdb.com/title/tt0046436/ +</a>. (Mark Brader, 2009-10-02) +</li> +<li> +The premise of the 1999 caper movie <em>Entrapment</em> involves computers +in an international banking network being shut down briefly at +midnight in each time zone to avoid any problems at the transition +from the year 1999 to 2000 in that zone. (Hmmmm.) If this shutdown +is extended by 10 seconds, it will create a one-time opportunity for +a gigantic computerized theft. To achieve this, at one location the +crooks interfere with the microwave system supplying time signals to +the computer, advancing the time by 0.1 second each minute over the +last hour of 1999. (So this movie teaches us that 0.1 × 60 = 10.) +IMDb page: +<a href="http://us.imdb.com/title/tt0137494/"> +http://us.imdb.com/title/tt0137494/ +</a>. (Mark Brader, 2009-10-02) +</li> +<li> +One mustn't forget the +<a href="https://www.youtube.com/watch?v=k4EUTMPuvHo">trailer</a> +(2014; 2:23) for the movie <em>Daylight Saving</em>. +</li> +</ul> +<h2>Comics</h2> +<ul> +<li> +The webcomic <em>xkcd</em> has the strip +"<a href='http://xkcd.com/673/'>The Sun</a>" (2009-12-09) and the panels +"<a href='http://xkcd.com/1017/'>Backward in Time</a>" (2012-02-14), +"<a href='http://xkcd.com/1061/'>EST</a>" (2012-05-28), and +"<a href='http://xkcd.com/1335/'>Now</a>" (2014-02-26), and +"<a href='http://xkcd.com/1655/'>Doomsday Clock</a>" (2016-03-14). +The related book <em>What If?</em> has an entry +"<a href='http://what-if.xkcd.com/26/'>Leap Seconds</a>" (2012-12-31). +</li> +<li> +The syndicated comic strip <em>Dilbert</em> featured an +<a href='http://dilbert.com/strip/1998-03-14'>example of +time zone humor</a> on 1998-03-14. +</li> +<li> +Peppermint Patty: "What if the world comes to an end tonight, Marcie?" +<br> +Marcie: "I promise there'll be a tomorrow, sir ... in fact, +it's already tomorrow in Australia!" +<br> +(Charles M. Schulz, <a href='http://www.gocomics.com/peanuts/1980/06/13'><em>Peanuts</em>, 1980-06-13</a>) +</li> +</ul> +<h2>Jokes</h2> +<ul> +<li> +"We've been using the five-cent nickel in this country since 1492. +Now that's pretty near 100 years, daylight saving." +(Groucho Marx as Captain Spaulding in <em>Animal Crackers</em>, 1930, +as noted by Will Fitzgerald) +</li> +<li> +BRADY. ...[Bishop Usher] determined that the Lord began the Creation +on the 23rd of October in the Year 4,004 B.C. at – uh, 9 A.M.! +<br> +DRUMMOND. That Eastern Standard Time? (<em>Laughter.</em>) Or Rocky Mountain +Time? (<em>More laughter.</em>) It wasn't daylight-saving time, was it? Because +the Lord didn't make the sun until the fourth day! +<br> +(From the play <em>Inherit the Wind</em> by Jerome Lawrence and Robert E. Lee, +filmed in 1960 with Spencer Tracy as Drummond and Fredric March as +Brady, and several other times. Thanks to Mark Brader.) +</li> +<li> +"Good news." +"What did they do? Extend Daylight Saving Time year round?" +(Professional tanner George Hamilton, in dialog from a +May, 1999 episode of the syndicated television series <em>Baywatch</em>) +</li> +<li> +"A fundamental belief held by Americans is that if you are on land, you +cannot be killed by a fish...So most Americans remain on land, believing +they're safe. Unfortunately, this belief – like so many myths, such as that +there's a reason for 'Daylight Saving Time' – is false." +(Dave Barry column, 2000-07-02) +</li> +<li> +"I once had sex for an hour and five minutes, but that was on the day +when you turn the clocks ahead." +(Garry Shandling, 52nd Annual Emmys, 2000-09-10) +</li> +<li> +"Would it impress you if I told you I invented Daylight Savings Time?" +("Sahjhan" to "Lilah" in dialog from the "Loyalty" episode of <em>Angel</em>, +originally aired 2002-02-25) +</li> +<li> +"I thought you said Tulsa was a three-hour flight." +"Well, you're forgetting about the time difference." +("Joey" and "Chandler" in dialog from the episode of <em>Friends</em> +entitled "The One With Rachel's Phone Number," originally aired 2002-12-05) +</li> +<li> +"Is that a pertinent fact, +or are you just trying to dazzle me with your command of time zones?" +(Kelsey Grammer as "Frasier Crane" to "Roz" from the episode of <em>Frasier</em> +entitled "The Kid," originally aired 1997-11-04) +</li> +<li> +"I put myself and my staff through this crazy, huge ordeal, all because +I refused to go on at midnight, okay? And so I work, you know, and +then I get this job at eleven, supposed to be a big deal. Then +yesterday daylight [saving] time ended. Right now it's basically +midnight." (Conan O'Brien on the 2010-11-08 premiere of <em>Conan</em>.) +</li> +<li> +"Well, in my time zone that's all the time I have, +but maybe in your time zone I haven't finished yet. So stay tuned!" +(Goldie Hawn, <em>Rowan & Martin's Laugh-In</em> No. 65, 1970-03-09) +</li> +</ul> +<h2>See also</h2> +<ul> +<li><a href="tz-link.htm">Sources for Time Zone and Daylight Saving +Time Data</a></li> +</ul> +<hr> +<address> +This web page is in the public domain, so clarified as of +2009-05-17 by Arthur David Olson. +<br> +Please send corrections to this web page to the +<a href="mailto:tz@iana.org">time zone mailing list</a>. +</address> +</body> +</html> diff --git a/tz/tz-how-to.html b/tz/tz-how-to.html new file mode 100644 index 0000000..a777a4e --- /dev/null +++ b/tz/tz-how-to.html @@ -0,0 +1,680 @@ +<!DOCTYPE html + PUBLIC "-//W3C//DTD HTML 4.01//EN" + "http://www.w3.org/TR/html4/strict.dtd"> +<html> +<head><title>How to Read the tz Database</title></head> +<body> +<h2>How to Read the <a href="https://en.wikipedia.org/wiki/Tz_database">tz +Database</a> Source Files</h2> +<h3>by Bill Seymour</h3> +<p>This page uses the <code>America/Chicago</code> and +<code>Pacific/Honolulu</code> zones as examples of how to infer +times of day from the <a href="tz-link.htm">tz database</a> +source files. It might be helpful, but not absolutely necessary, +for the reader to have already downloaded the +<a href="http://www.iana.org/time-zones/repository/tzdata-latest.tar.gz">latest +release of the database</a> and become familiar with the basic layout +of the data files. The format is explained in the “man +page” for the zic compiler, <code>zic.8.txt</code>, in +the <code>code</code> subdirectory.</p> + +<p>We’ll begin by talking about the rules for changing between standard +and daylight saving time since we’ll need that information when we talk +about the zones.</p> + +<p>First, let’s consider the special daylight saving time rules +for Chicago (from the <code>northamerica</code> file in +the <code>data</code> subdirectory):</p> + +<table border="1"> +<tr> + <th colspan="6">From the Source File</th> +</tr> +<tr> + <td colspan="6" align="center"><table><tr><td> +<pre> +#Rule NAME FROM TO TYPE IN ON AT SAVE LETTER +Rule Chicago 1920 only - Jun 13 2:00 1:00 D +Rule Chicago 1920 1921 - Oct lastSun 2:00 0 S +Rule Chicago 1921 only - Mar lastSun 2:00 1:00 D +Rule Chicago 1922 1966 - Apr lastSun 2:00 1:00 D +Rule Chicago 1922 1954 - Sep lastSun 2:00 0 S +Rule Chicago 1955 1966 - Oct lastSun 2:00 0 S +</pre> + </td></tr></table></td> +</tr> +<tr> + <th colspan="6">Reformatted a Bit</th> +</tr> +<tr> + <th>From</th> + <th>To</th> + <th colspan="2">On</th> + <th>At</th> + <th>Action</th> +</tr> +<tr align="center"> + <td colspan="2">1920 only</td> + <td colspan="2">June 13<small><sup>th</sup></small></td> + <td rowspan="6">02:00 local</td> + <td>go to daylight saving time</td> +</tr> +<tr align="center"> + <td>1920</td> + <td>1921</td> + <td rowspan="5">last Sunday</td> + <td>in October</td> + <td>return to standard time</td> +</tr> +<tr align="center"> + <td colspan="2">1921 only</td> + <td>in March</td> + <td rowspan="2">go to daylight saving time</td> +</tr> +<tr align="center"> + <td rowspan="2">1922</td> + <td>1966</td> + <td>in April</td> +</tr> +<tr align="center"> + <td>1954</td> + <td>in September</td> + <td rowspan="2">return to standard time</td> +</tr> +<tr align="center"> + <td>1955</td> + <td>1966</td> + <td>in October</td> +</tr> +</table> + +<p>We’ll basically just ignore the <code>TYPE</code> column. +In the 2007j release, the most recent as of this writing, the +<code>TYPE</code> column never contains anything but a hyphen, +a kind of null value. (From the description in <code>zic.8.txt</code>, +this appears to be a mechanism for removing years from a set +in some localizable way. It’s used in the file, <code>pacificnew</code>, +to determine whether a given year will have a US presidential election; +but everything related to that use is commented out.) + +<p>The <code>SAVE</code> column contains the wall clock offset from +local standard time. +This is usually either zero for standard time or one hour for daylight +saving time; but there’s no reason, in principle, why it can’t +take on other values. + +<p>The <code>LETTER</code> (sometimes called <code>LETTER/S</code>) +column can contain a variable +part of the usual abbreviation of the time zone’s name, or it can just +be a hyphen if there’s no variable part. For example, the abbreviation +used in the central time zone will be either “CST” or +“CDT”. The variable part is ‘S’ or ‘D’; +and, sure enough, that’s just what we find in +the <code>LETTER</code> column +in the <code>Chicago</code> rules. More about this when we talk about +“Zone” lines. + +<p>One important thing to notice is that “Rule” lines +want at once to be both <i>transitions</i> and <i>steady states</i>: +<ul> +<li>On the one hand, they represent transitions between standard and +daylight saving time; and any number of Rule lines can be in effect +during a given period (which will always be a non-empty set of +contiguous calendar years).</li> +<li>On the other hand, the <code>SAVE</code> and <code>LETTER</code> +columns contain state that exists between transitions. More about this +when we talk about the US rules.</li> +</ul> + +<p>In the example above, the transition to daylight saving time +happened on the 13<small><sup>th</sup></small> of June in 1920, and on +the last Sunday in March in 1921; but the return to standard time +happened on the last Sunday in October in both of those +years. Similarly, the rule for changing to daylight saving time was +the same from 1922 to 1966; but the rule for returning to standard +time changed in 1955. Got it?</p> + +<p>OK, now for the somewhat more interesting “US” rules:</p> + +<table border="1"> +<tr> + <th colspan="6">From the Source File</th> +</tr> +<tr> + <td colspan="6" align="center"><table><tr><td> +<pre> +#Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule US 1918 1919 - Mar lastSun 2:00 1:00 D +Rule US 1918 1919 - Oct lastSun 2:00 0 S +Rule US 1942 only - Feb 9 2:00 1:00 W # War +Rule US 1945 only - Aug 14 23:00u 1:00 P # Peace +Rule US 1945 only - Sep 30 2:00 0 S +Rule US 1967 2006 - Oct lastSun 2:00 0 S +Rule US 1967 1973 - Apr lastSun 2:00 1:00 D +Rule US 1974 only - Jan 6 2:00 1:00 D +Rule US 1975 only - Feb 23 2:00 1:00 D +Rule US 1976 1986 - Apr lastSun 2:00 1:00 D +Rule US 1987 2006 - Apr Sun>=1 2:00 1:00 D +Rule US 2007 max - Mar Sun>=8 2:00 1:00 D +Rule US 2007 max - Nov Sun>=1 2:00 0 S +</pre> + </td></tr></table></td> +</tr> +<tr> + <th colspan="6">Reformatted a Bit</th> +</tr> +<tr> + <th>From</th> + <th>To</th> + <th colspan="2">On</th> + <th>At</th> + <th>Action</th> +</tr> +<tr align="center"> + <td rowspan="2">1918</td> + <td rowspan="2">1919</td> + <td rowspan="2">last Sunday</td> + <td>in March</td> + <td rowspan="3">02:00 local</td> + <td>go to daylight saving time</td> +</tr> +<tr align="center"> + <td>in October</td> + <td>return to standard time</td> +</tr> +<tr align="center"> + <td colspan="2">1942 only</td> + <td colspan="2">February 9<small><sup>th</sup></small></td> + <td>go to “war time”</td> +</tr> +<tr align="center"> + <td colspan="2" rowspan="2">1945 only</td> + <td colspan="2">August 14<small><sup>th</sup></small></td> + <td>23:00 <a href="https://en.wikipedia.org/wiki/Universal_Time">UT</a></td> + <td> + rename “war time” to “peace<br>time;” + clocks don’t change + </td> +</tr> +<tr align="center"> + <td colspan="2">September 30<small><sup>th</sup></small></td> + <td rowspan="9">02:00 local</td> + <td rowspan="2">return to standard time</td> +</tr> +<tr align="center"> + <td rowspan="2">1967</td> + <td>2006</td> + <td rowspan="2">last Sunday</td> + <td>in October</td> +</tr> +<tr align="center"> + <td>1973</td> + <td>in April</td> + <td rowspan="6">go to daylight saving time</td> +</tr> +<tr align="center"> + <td colspan="2">1974 only</td> + <td colspan="2">January 6<small><sup>th</sup></small></td> +</tr> +<tr align="center"> + <td colspan="2">1975 only</td> + <td colspan="2">February 23<small><sup>rd</sup></small></td> +</tr> +<tr align="center"> + <td>1976</td> + <td>1986</td> + <td>last Sunday</td> + <td rowspan="2">in April</td> +</tr> +<tr align="center"> + <td>1987</td> + <td>2006</td> + <td>first Sunday</td> +</tr> +<tr align="center"> + <td rowspan="2">2007</td> + <td rowspan="2">present</td> + <td colspan="2">second Sunday in March</td> +</tr> +<tr align="center"> + <td colspan="2">first Sunday in November</td> + <td>return to standard time</td> +</tr> +</table> + +<p>There are two interesting things to note here.</p> + +<p>First, the time that something happens (in the <code>AT</code> +column) is not necessarily the local wall clock time. The time can be +suffixed with ‘s’ (for “standard”) to mean +local standard time (different from wall clock time when observing +daylight saving time); or it can be suffixed with ‘g’, +‘u’, or ‘z’, all three of which mean the +standard time at the +<a href="https://en.wikipedia.org/wiki/Prime_Meridian">prime meridan</a>. +‘g’ stands for “<a +href="https://en.wikipedia.org/wiki/Greenwich_Mean_Time">GMT</a>”; +‘u’ stands for “<a +href="https://en.wikipedia.org/wiki/Universal_Time">UT</a>” or “<a +href="https://en.wikipedia.org/wiki/Coordinated_Universal_Time">UTC</a>” +(whichever was official at the time); ‘z’ stands for the +<a href="https://en.wikipedia.org/wiki/Nautical_time">nautical time zone</a> +Z (a.k.a. “Zulu” which, in turn, stands for ‘Z’). +The time can also be suffixed with ‘w’ meaning “wall +clock time;” but it usually isn’t because that’s the +default.</p> + +<p>Second, the day in the <code>ON</code> column, in addition to +“<code>lastSun</code>” or a particular day of the month, +can have the form, “<code>Sun>=</code><i>x</i>” or +“<code>Sun<=</code><i>x</i>,” where <i>x</i> is a day +of the month. For example, “<code>Sun>=8</code>” means +“the first Sunday on or after the eighth of the month,” in +other words, the second Sunday of the month. Furthermore, although +there are no examples above, the weekday needn’t be +“<code>Sun</code>” in either form, but can be the usual +three-character English abbreviation for any day of the week.</p> + +<p>And the US rules give us more examples of a couple of things +already mentioned:</p> + +<ul> +<li>The rules for changing to and from daylight saving time are +actually <i>different sets</i> of rules; and the two sets can change +independently. Consider, for example, that the rule for the return to +standard time stayed the same from 1967 to 2006; but the rule for the +transition to daylight saving time changed several times in the same +period. There can also be periods, 1946 to 1966 for example, when no +rule from this group is in effect, and so either no transition +happened in those years, or some other rule is in effect (perhaps a +state or other more local rule).</li> + +<li>The <code>SAVE</code> and <code>LETTER</code> columns +contain <i>steady state</i>, not transitions. Consider, for example, +the transition from “war time” to “peace time” +that happened on August 14, 1945. The “1:00” in +the <code>SAVE</code> column is <i>not</i> an instruction to advance +the clock an hour. It means that clocks should <i>be</i> one hour +ahead of standard time, which they already are because of the previous +rule, so there should be no change.</li> + +</ul> + +<p>OK, now let’s look at a Zone record:</p> + +<table border="1"> +<tr> + <th colspan="5">From the Source File</th> +</tr> +<tr> + <td colspan="6" align="center"><table><tr><td> +<pre> +#Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone America/Chicago -5:50:36 - LMT 1883 Nov 18 12:09:24 + -6:00 US C%sT 1920 + -6:00 Chicago C%sT 1936 Mar 1 2:00 + -5:00 - EST 1936 Nov 15 2:00 + -6:00 Chicago C%sT 1942 + -6:00 US C%sT 1946 + -6:00 Chicago C%sT 1967 + -6:00 US C%sT +</pre> + </td></tr></table></td> +</tr> +<tr> + <th colspan="5">Columns Renamed</th> +</tr> +<tr> + <th rowspan="2">Standard Offset<br> + from <a href="https://en.wikipedia.org/wiki/Prime_Meridian">Prime + Meridian</a></th> + <th rowspan="2">Daylight<br>Saving Time</th> + <th rowspan="2">Abbreviation(s)</th> + <th colspan="2">Ending at Local Time</th> +</tr> +<tr> + <th>Date</th> + <th>Time</th> +</tr> +<tr align="center"> + <td>−5:50:36</td> + <td>not observed</td> + <td>LMT</td> + <td>1883-11-18</td> + <td>12:09:24</td> +</tr> +<tr align="center"> + <td rowspan="2">−6:00:00</td> + <td>US rules</td> + <td rowspan="2">CST or CDT</td> + <td>1920-01-01</td> + <td>00:00:00</td> +</tr> +<tr align="center"> + <td>Chicago rules</td> + <td>1936-03-01</td> + <td rowspan="2">02:00:00</td> +</tr> +<tr align="center"> + <td>−5:00:00</td> + <td>not observed</td> + <td>EST</td> + <td>1936-11-15</td> +</tr> +<tr align="center"> + <td rowspan="4">−6:00:00</td> + <td>Chicago rules</td> + <td>CST or CDT</td> + <td>1942-01-01</td> + <td rowspan="3">00:00:00</td> +</tr> +<tr align="center"> + <td>US rules</td> + <td>CST, CWT or CPT</td> + <td>1946-01-01</td> +</tr> +<tr align="center"> + <td>Chicago rules</td> + <td rowspan="2">CST or CDT</td> + <td>1967-01-01</td> +</tr> +<tr align="center"> + <td>US rules</td> + <td colspan="2">—</td> +</tr> +</table> + +<p>There are a couple of interesting differences between Zones and Rules.</p> + +<p>First, and somewhat trivially, whereas Rules are considered to +contain one or more records, a Zone is considered to be a single +record with zero or more <i>continuation lines</i>. Thus, the keyword, +“<code>Zone</code>,” and the zone name are not +repeated. The last line is the one without anything in +the <code>[UNTIL]</code> column.</p> + +<p>Second, and more fundamentally, each line of a Zone represents a +steady state, not a transition between states. The state exists from +the date and time in the previous line’s <code>[UNTIL]</code> +column up to the date and time in the current +line’s <code>[UNTIL]</code> column. In other words, the date and +time in the <code>[UNTIL]</code> column is the instant that separates +this state from the next. Where that would be ambiguous because +we’re setting our clocks back, the <code>[UNTIL]</code> column +specifies the first occurrence of the instant. The state specified by +the last line, the one without anything in the <code>[UNTIL]</code> +column, continues to the present.</p> + +<p>The first line typically specifies the mean solar time observed +before the introduction of standard time. Since there’s no line before +that, it has no beginning. <code>8-) </code> For some places near the <a +href="https://en.wikipedia.org/wiki/International_Date_Line">International +Date Line</a>, the first <i>two</i> lines will show solar times +differing by 24 hours; this corresponds to a movement of the Date +Line. For example:</p> + +<pre> +#Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone America/Juneau 15:02:19 - LMT 1867 Oct 18 + -8:57:41 - LMT ... +</pre> + +<p>When Alaska was purchased from Russia in 1867, the Date Line moved +from the Alaska/Canada border to the Bering Strait; and the time in +Alaska was then 24 hours earlier than it had +been. <code><aside></code>(6 October in the Julian calendar, +which Russia was still using then for religious reasons, was followed +by <i>a second instance of the same day with a different name</i>, 18 +October in the Gregorian calendar. Isn’t civil time +wonderful? <code>8-)</code>)<code></aside></code></p> + +<p>The abbreviation, “LMT” stands for “local mean +time”, which is an invention of +the <a href="https://en.wikipedia.org/wiki/Tz_database">tz +database</a> and was probably never actually used during the +period. Furthermore, the value is almost certainly wrong except in the +archetypal place after which the zone is named. (The tz database +usually doesn’t provide a separate Zone record for places where +nothing significant happened after 1970.)</p> + +<p>The <code>RULES</code> column tells us whether daylight saving time is being observed: +<ul> +<li>A hyphen, a kind of null value, means that we have not set our +clocks ahead of standard time.</li> + +<li>An amount of time (usually but not necessarily “1:00” +meaning one hour) means that we have set our clocks ahead by that +amount.</li> + +<li>Some alphabetic string means that we <i>might have</i> set our +clocks ahead; and we need to check the rule the name of which is the +given alphabetic string.</li> +</ul> + +<p>An example of a specific amount of time is:</p> +<pre> +#Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Pacific/Honolulu ... 1933 Apr 30 2:00 + -10:30 1:00 HDT 1933 May 21 2:00 + ... +</pre> + +<p>Hawaii tried daylight saving time for three weeks in 1933 and +decided they didn’t like it. <code>8-) </code>Note that +the <code>GMTOFF</code> column always contains the standard time +offset, so the wall clock time during this period was GMT − +10:30 + 1:00 = GMT − 9:30.</p> + +<p>The <code>FORMAT</code> column specifies the usual abbreviation of +the time zone name. It can have one of three forms:</p> +<ul> + +<li>a string of three or more characters that are either ASCII alphanumerics, +“<code>+</code>”, or “<code>-</code>”, +in which case that’s the abbreviation</li> + +<li>a pair of strings separated by a slash +(‘<code>/</code>’), in which case the first string is the +abbreviation for the standard time name and the second string is the +abbreviation for the daylight saving time name</li> + +<li>a string containing “<code>%s</code>,” in which case +the “<code>%s</code>” will be replaced by the text in the +appropriate Rule’s <code>LETTER</code> column</li> +</ul> + +<p>The last two make sense only if there’s a named rule in effect.</p> + +<p>An example of a slash is:</p> +<pre> +#Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Europe/London ... 1996 + 0:00 EU GMT/BST +</pre> + +<p>The current time in the UK is called either Greenwich mean time or +British summer time.</p> + +<p>One wrinkle, not fully explained in <code>zic.8.txt</code>, is what +happens when switching to a named rule. To what values should +the <code>SAVE</code> and <code>LETTER</code> data be initialized?</p> + +<ul> +<li>If at least one transition has happened, use +the <code>SAVE</code> and <code>LETTER</code> data from the most +recent.</li> + +<li>If switching to a named rule before any transition has happened, +assume standard time (<code>SAVE</code> zero), and use +the <code>LETTER</code> data from the earliest transition with +a <code>SAVE</code> of zero. + +</ul> + +<p>And three last things about the <code>FORMAT</code> column:</p> +<ul> + +<li>The <a href="https://en.wikipedia.org/wiki/Tz_database">tz +database</a> gives abbreviations for time zone names in <i>popular +usage</i>, which is not necessarily “correct” by law. For +example, the last line in +<code>Zone</code> <code>Pacific/Honolulu</code> (shown below) gives +“HST” for “Hawaii standard time” even though the +<a href="http://www.law.cornell.edu/uscode/html/uscode15/usc_sec_15_00000263----000-.html">legal</a> +name for that time zone is “Hawaii-Aleutian standard time.” +This author has read that there are also some places in Australia where +popular time zone names differ from the legal ones. + +<li>No attempt is made to <a +href="https://en.wikipedia.org/wiki/Internationalization_and_localization">localize</a> +the abbreviations. They are intended to be the values returned through the +<code>"%Z"</code> format specifier to +<a href="https://en.wikipedia.org/wiki/C_(programming_language)">C</a>’s +<a href="http://pubs.opengroup.org/onlinepubs/9699919799/functions/strftime.html"><code>strftime</code></a> +function in the +<a href="http://www.chemie.fu-berlin.de/chemnet/use/info/libc/libc_19.html#SEC324">“C” locale</a>. + +<li>If there is no generally-accepted abbreviation for a time zone, +a numeric offset is used instead, e.g., <code>+07</code> for 7 hours +ahead of Greenwich. By convention, <code>-00</code> is used in a +zone while uninhabited, where the offset is zero but in some sense +the true offset is undefined. +</ul> + +<p>As a final example, here’s the complete history for Hawaii:</p> + +<table border="1"> +<tr> + <th colspan="6">Relevant Excerpts from the US Rules</th> +</tr> +<tr> + <td colspan="6" align="center"><table><tr><td> +<pre> +#Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule US 1918 1919 - Oct lastSun 2:00 0 S +Rule US 1942 only - Feb 9 2:00 1:00 W # War +Rule US 1945 only - Aug 14 23:00u 1:00 P # Peace +Rule US 1945 only - Sep 30 2:00 0 S +</pre> + </td></tr></table></td> +</tr> +<tr> + <th colspan="6">The Zone Record</th> +</tr> +<tr> + <td colspan="6" align="center"><table><tr><td> +<pre> +#Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Pacific/Honolulu -10:31:26 - LMT 1900 Jan 1 12:00 + -10:30 - HST 1933 Apr 30 2:00 + -10:30 1:00 HDT 1933 May 21 2:00 + -10:30 US H%sT 1947 Jun 8 2:00 + -10:00 - HST +</pre> + </td></tr></table></td> +</tr> +<tr> + <th colspan="6">What We Infer</th> +</tr> +<tr> + <th rowspan="2">Wall-Clock<br>Offset from<br>Prime Meridian</th> + <th rowspan="2">Adjust<br>Clocks</th> + <th colspan="2">Time Zone</th> + <th colspan="2">Ending at Local Time</th> +</tr> +<tr> + <th>Abbrv.</th> + <th>Name</th> + <th>Date</th> + <th>Time</th> +</tr> +<tr align="center"> + <td>−10:31:26</td> + <td>—</td> + <td>LMT</td> + <td>local mean time</td> + <td>1900-01-01</td> + <td>12:00</td> +</tr> +<tr align="center"> + <td>−10:30</td> + <td>+0:01:26</td> + <td>HST</td> + <td>Hawaii standard time</td> + <td>1933-04-30</td> + <td rowspan="3">02:00</td> +</tr> +<tr align="center"> + <td>−9:30</td> + <td>+1:00</td> + <td>HDT</td> + <td>Hawaii daylight time</td> + <td>1933-05-21</td> +</tr> +<tr align="center"> + <td>−10:30¹</td> + <td>−1:00¹</td> + <td>HST¹</td> + <td>Hawaii standard time</td> + <td>1942-02-09</td> +</tr> +<tr align="center"> + <td rowspan="2">−9:30</td> + <td>+1:00</td> + <td>HWT</td> + <td>Hawaii war time</td> + <td>1945-08-14</td> + <td>13:30²</td> +</tr> +<tr align="center"> + <td>0</td> + <td>HPT</td> + <td>Hawaii peace time</td> + <td>1945-09-30</td> + <td rowspan="2">02:00</td> +</tr> +<tr align="center"> + <td>−10:30</td> + <td>−1:00</td> + <td rowspan="2">HST</td> + <td rowspan="2">Hawaii standard time</td> + <td>1947-06-08</td> +</tr> +<tr align="center"> + <td>−10:00³</td> + <td>+0:30³</td> + <td colspan="2">—</td> +</tr> +<tr> + <td colspan="6"> + ¹Switching to US rules…most recent transition (in 1919) was to standard time + </td> +</tr> +<tr> + <td colspan="6"> + ²23:00 <a href="https://en.wikipedia.org/wiki/Universal_Time">UT</a> + + (−9:30) = 13:30 local + </td> +</tr> +<tr> + <td colspan="6"> + ³Since <a href="https://en.wikipedia.org/wiki/ISO_8601">1947–06–08T12:30Z</a>, + the civil time in Hawaii has been + <a href="https://en.wikipedia.org/wiki/Universal_Time">UT</a>/<a href="https://en.wikipedia.org/wiki/Coordinated_Universal_Time">UTC</a> + − 10:00 year-round. + </td> +</tr> +</table> + +<p>There will be a short quiz later. <code>8-)</code></p> + +<hr> +<address> +This web page is in the public domain, so clarified as of +2015-10-20 by Bill Seymour. +<br> +All suggestions and corrections will be welcome; all flames will be amusing. +Mail to was at pobox dot com. +</address> +</body> +</html> diff --git a/tz/tz-link.htm b/tz/tz-link.htm new file mode 100644 index 0000000..adb4fac --- /dev/null +++ b/tz/tz-link.htm @@ -0,0 +1,847 @@ +<!DOCTYPE html + PUBLIC "-//W3C//DTD HTML 4.01//EN" + "http://www.w3.org/TR/html4/strict.dtd"> +<html> +<head profile="http://dublincore.org/documents/2008/08/04/dc-html/"> +<title>Sources for time zone and daylight saving time data</title> +<link rel="schema.DC" href="http://purl.org/DC/elements/1.1/"> +<meta http-equiv="Content-type" content='text/html; charset="UTF-8"'> +<meta name="DC.Title" + content="Sources for time zone and daylight saving time data"> +<meta name="DC.Creator" content="Eggert, Paul"> +<meta name="DC.Contributor" content="Olson, Arthur David"> +<meta name="DC.Date" content="2016-06-14"> +<meta name="DC.Description" + content="Sources of information about time zones and daylight saving time"> +<meta name="DC.Identifier" + content="http://www.iana.org/time-zones/repository/tz-link.htm"> +<meta name="Keywords" + content="database,daylight saving,DST,time zone,timezone,tz,zoneinfo"> +</head> +<body> +<h1>Sources for time zone and daylight saving time data</h1> +<p> +Time zone and daylight saving rules are controlled by individual +governments. They are sometimes changed with little notice, and their +histories and planned futures are often recorded only fitfully. Here +is a summary of attempts to organize and record relevant data in this +area. +</p> +<h2>The <code><abbr title="time zone">tz</abbr></code> database</h2> +<p> +The <a href="https://en.wikipedia.org/wiki/Public_domain">public-domain</a> +time zone database contains code and data +that represent the history of local time +for many representative locations around the globe. +It is updated periodically to reflect changes made by political bodies +to <a href="https://en.wikipedia.org/wiki/Time_zone">time zone</a> +boundaries and +<a href="https://en.wikipedia.org/wiki/Daylight_saving_time">daylight-saving</a> +rules. +This database (often called <code>zoneinfo</code> or +<code><abbr>tz</abbr></code>) +is used by several implementations, +including +<a href="http://www.gnu.org/software/libc/">the +<abbr title="GNU's Not Unix">GNU</abbr> +C Library</a> (used in +<a href="https://en.wikipedia.org/wiki/Linux"><abbr>GNU</abbr>/Linux</a>), +<a href="https://www.android.com">Android</a>, +<a href="https://developer.mozilla.org/en-US/docs/Mozilla/B2G_OS">B2G +<abbr title="Operating System">OS</abbr></a>, +<a href="https://www.freebsd.org">Free<abbr +title="Berkeley Software Distribution">BSD</abbr></a>, +<a href="http://netbsd.org">Net<abbr>BSD</abbr></a>, +<a href="http://www.openbsd.org">Open<abbr>BSD</abbr></a>, +<a href="http://www.chromium.org/chromium-os">Chromium OS</a>, +<a href="https://cygwin.com">Cygwin</a>, +<a href="http://www.delorie.com/djgpp/"><abbr +title="DJ's GNU Programming Platform">DJGPP</abbr></a>, +<a href="https://en.wikipedia.org/wiki/MINIX">MINIX</a>, +<a href="https://en.wikipedia.org/wiki/WebOS"><abbr +title="Web Operating System">webOS</abbr></a>, +<a href="http://ibm.com/aix"><abbr +title="Advanced Interactive eXecutive">AIX</abbr></a>, +<a href="https://en.wikipedia.org/wiki/BlackBerry_10">BlackBerry 10</a>, +<a href="http://www.apple.com/ios/"><abbr +title="iPhone OS">iOS</abbr></a>, +<a href="http://windows.microsoft.com">Microsoft Windows</a>, +<a href="http://www.hp.com/go/openvms/">Open<abbr +title="Virtual Memory System">VMS</abbr></a>, +<a href="https://www.oracle.com/database/index.html">Oracle Database</a>, +<a href="http://oracle.com/solaris">Oracle Solaris</a>, and +<a href="http://www.apple.com/osx/"><abbr title="Operating System Ten">OS +X</abbr></a>.</p> +<p> +Each location in the database represents a region where all +clocks keeping local time have agreed since 1970. +Locations are identified by continent or ocean and then by the name of +the location, which is typically the largest city within the region. +For example, <code>America/New_York</code> +represents most of the <abbr title="United States">US</abbr> eastern time zone; +<code>America/Phoenix</code> represents most of Arizona, which +uses mountain time without daylight saving time (<abbr +title="daylight saving time">DST</abbr>); +<code>America/Detroit</code> represents most of Michigan, which uses +eastern time but with different <abbr>DST</abbr> rules in 1975; +and other entries represent smaller regions like Starke County, +Indiana, which switched from central to eastern time in 1991 +and switched back in 2006. +To use the database on an extended <a +href="https://en.wikipedia.org/wiki/POSIX"><abbr +title="Portable Operating System Interface">POSIX</abbr></a> +implementation set the <code><abbr>TZ</abbr></code> +environment variable to the location's full name, +e.g., <code><abbr>TZ</abbr>="America/New_York"</code>.</p> +<p> +Associated with each region is a history of offsets from +<a href="https://en.wikipedia.org/wiki/Universal_Time">Universal +Time</a> (<abbr>UT</abbr>), which is <a +href="https://en.wikipedia.org/wiki/Greenwich_Mean_Time">Greenwich Mean +Time</a> (<abbr>GMT</abbr>) with days beginning at midnight; +for time stamps after 1960 this is more precisely <a +href="https://en.wikipedia.org/wiki/Coordinated_Universal_Time">Coordinated +Universal Time</a> (<abbr>UTC</abbr>). +The database also records when daylight saving time was in use, +along with alphabetic time zone abbreviations such as <abbr>EST</abbr> +for Eastern Standard Time in the <abbr>US</abbr>.</p> +<p> +In the <code><abbr>tz</abbr></code> database's +<a href="ftp://ftp.iana.org/tz/releases/"><abbr +title="File Transfer Protocol">FTP</abbr> releases</a> +the code is in the file <code>tzcode<var>C</var>.tar.gz</code>, +where <code><var>C</var></code> is the code's version; +similarly, the data entries are in <code>tzdata<var>D</var>.tar.gz</code>, +where <code><var>D</var></code> is the data's version. +Since 1996, each version has been a four-digit year followed by +lower-case letter (<samp>a</samp> through <samp>z</samp>, +then <samp>za</samp> through <samp>zz</samp>, then <samp>zza</samp> +through <samp>zzz</samp>, and so on). +Convenience links to +the <a href="ftp://ftp.iana.org/tz/tzcode-latest.tar.gz">latest +code</a> and +<a href="ftp://ftp.iana.org/tz/tzdata-latest.tar.gz">latest data</a> revisions +are also available. +The following <a +href="https://en.wikipedia.org/wiki/Unix_shell">shell</a> commands download +these files to a <abbr>GNU</abbr>/Linux or similar host; +see the downloaded +<code>README</code> file for what to do next.</p> +<pre style="margin-left: 2em"><code>mkdir tz +cd tz +<a href="http://www.gnu.org/software/wget/">wget</a> --retr-symlinks 'ftp://ftp.iana.org/tz/tz*-latest.tar.gz' +<a href="http://www.gnu.org/software/gzip/">gzip</a> -dc tzcode-latest.tar.gz | <a href="http://www.gnu.org/software/tar/">tar</a> -xf - +gzip -dc tzdata-latest.tar.gz | tar -xf - +</code></pre> +<p> +The code and data files can also be obtained from the +<a href="http://www.iana.org/time-zones">Time Zone Database website</a> +of the <a href="http://www.iana.org">Internet Assigned Numbers +Authority (IANA)</a>. +An <a href="https://github.com/eggert/tz">unofficial development +repository</a> of the code and data is available +in <a href="http://git-scm.com">Git</a> form +from <a href="https://github.com">GitHub</a>; be careful, as this +repository is less well tested and probably contains more errors. +<p> +The code lets you compile the <code><abbr>tz</abbr></code> source files into +machine-readable binary files, one for each location. It also lets +you read a <code><abbr>tz</abbr></code> binary file and interpret time stamps for that +location.</p> +<h2>Changes to the <code><abbr>tz</abbr></code> database</h2> +<p> +The <code><abbr>tz</abbr></code> code and data +are by no means authoritative. If you find errors, please +send changes to the <a href="mailto:tz@iana.org">time zone +mailing list</a>. You can also <a +href="http://news.gmane.org/gmane.comp.time.tz">browse recent +messages</a> sent to the mailing list, <a +href="https://mm.icann.org/mailman/listinfo/tz">subscribe</a> to it, +and browse the <a +href="http://mm.icann.org/pipermail/tz/">archive of old +messages</a>.</p> +<p> +If your government plans to change its time zone boundaries or +daylight saving rules, let the mailing list know well in advance. With +less than a year's notice there is a good chance that some +computer-based clocks will operate incorrectly after the change, due +to delays in propagating updates to software and data. The shorter +the notice, the more likely clock problems will arise. +</p> +<p>Sources for the <code><abbr>tz</abbr></code> database are +<a href="https://en.wikipedia.org/wiki/UTF-8"><abbr +title="Unicode Transformation Format 8-bit">UTF-8</abbr></a> +<a href="https://en.wikipedia.org/wiki/Text_file">text files</a> +with lines terminated by <a href="https://en.wikipedia.org/wiki/Newline"><abbr +title="linefeed">LF</abbr></a>, +which can be modified by common text editors such +as <a href="https://www.gnu.org/software/emacs/">GNU Emacs</a>, +<a href="https://wiki.gnome.org/Apps/Gedit">gedit</a>, and +<a href="http://www.vim.org">vim</a>. One +editor has a package to simplify editing further:</p> +<ul> +<li><a href="https://packagecontrol.io/packages/zoneinfo">Sublime +zoneinfo</a> is a <a href="http://www.sublimetext.com">Sublime +Text</a> package for syntax highlighting <code><abbr>tz</abbr></code> +source files.</li> +</ul> +<p> +For further information about updates, please see +<a href="https://tools.ietf.org/html/rfc6557">Procedures for +Maintaining the Time Zone Database</a> (Internet <abbr +title="Request For Comments">RFC</abbr> 6557).</p> +<h2>Commentary on the <code><abbr>tz</abbr></code> database</h2> +<ul> +<li>The article +<a href="https://en.wikipedia.org/wiki/Tz_database">tz database</a> is +an encyclopedic summary.</li> +<li><a href="tz-how-to.html">How to Read the +tz Database Source Files</a> explains the <code><abbr>tz</abbr></code> +database format.</li> +<li><a +href="http://codeofmatt.com/2016/04/23/on-the-timing-of-time-zone-changes/">On +the Timing of Time Zone Changes</a> gives examples of problems caused +by inadequate notice by governments of time zone and daylight saving +rule changes.</li> +<li><a +href="http://blog.jonudell.net/2009/10/23/a-literary-appreciation-of-the-olsonzoneinfotz-database/">A +literary appreciation of the Olson/Zoneinfo/tz database</a> comments on the +database's style.</li> +</ul> +<h2>Web sites using recent versions of the <code><abbr>tz</abbr></code> database</h2> +<p> +These are listed roughly in ascending order of complexity and fanciness. +</p> +<ul> +<li><a href="http://time.is">Time.is</a> shows locations' +time and zones in a simple format.</li> +<li><a href="https://www.timejones.com">TimeJones.com</a> is a simple +time zone converter.</li> +<li><a +href="http://twiki.org/cgi-bin/xtra/tzdatepick.html">Date and Time Gateway</a> +lets you see the <code><abbr>TZ</abbr></code> values directly.</li> +<li><a +href="http://www.convertit.com/Go/ConvertIt/World_Time/Current_Time.ASP">Current +Time in 1000 Places</a> uses descriptions of the values.</li> +<li><a href="http://www.timezoneconverter.com/cgi-bin/tzc.tzc">Time Zone +Converter</a> +uses a pulldown menu.</li> +<li><a href="http://home.kpn.nl/vanadovv/time/TZworld.html">Complete +timezone information for all countries</a> displays tables of DST rules. +<li><a href="http://www.timeanddate.com/worldclock/">The World Clock – +Worldwide</a> lets you sort zone names and convert times.</li> +<li><a href="http://www.zeitverschiebung.net/en/">Time Difference</a> +calculates the current time difference between locations.</li> +<li><a href="http://www.wx-now.com">Weather Now</a> lists the weather too.</li> +<li><a href="http://www.thetimenow.com">The Time Now</a> also lists weather.</li> +<li><a href="https://worldtime.io">worldtime.io</a> +also contains data about time zone boundaries; it supports queries via place +names and shows location maps.</li> +</ul> +<h2>Network protocols for <code><abbr>tz</abbr></code> data</h2> +<ul> +<li>The <a href="http://www.ietf.org">Internet Engineering Task Force</a>'s +<a href="https://datatracker.ietf.org/wg/tzdist/charter/">Time Zone Data +Distribution Service (tzdist) working group</a> defined <a +href="https://tools.ietf.org/html/rfc7808">TZDIST</a> +(Internet <abbr>RFC</abbr> 7808), a time zone data distribution service, +along with a <a href="https://tools.ietf.org/html/rfc7809">calendar access +protocol for transferring time zone data by reference</a> +(Internet <abbr>RFC</abbr> 7809). This work was based +on the iCalendar and CalConnect efforts described below.</li> +<li>The <a href="https://tools.ietf.org/html/rfc5545"> +Internet Calendaring and Scheduling Core Object Specification +(iCalendar)</a> (Internet <abbr>RFC</abbr> 5445) +covers time zone +data; see its VTIMEZONE calendar component. +The iCalendar format requires specialized parsers and generators; a +variant <a href="https://tools.ietf.org/html/rfc6321">xCal</a> +(Internet <abbr>RFC</abbr> 6321) uses +<a href="http://www.w3.org/XML/"><abbr +title="Extensible Markup Language">XML</abbr></a> format, and a variant +<a href="https://tools.ietf.org/html/rfc7265">jCal</a> +(Internet <abbr>RFC</abbr> 7265) +uses <a href="http://www.json.org"><abbr +title="JavaScript Object Notation">JSON</abbr></a> format. +<a href="https://www.calconnect.org">CalConnect, The Calendaring and Scheduling +Consortium</a> is promoting further work in this area. <a +href="http://calconnect.org/publications/icalendartimezoneproblemsandrecommendationsv1.0.pdf">iCalendar +TIMEZONE Problems and Recommendations</a> offers guidelines and +recommendations for the use of VTIMEZONE and <code><abbr>tz</abbr></code>.</li> +<li>The <a +href="http://calconnect.org/publications/timezoneregistryandservicerecommendationsv1.0.pdf">Timezone +Registry and Service Recommendations</a> of CalConnect's +<a href="https://www.calconnect.org/about/technical-committees/tc-timezone">TIMEZONE +Technical Committee</a> discusses a +strategy for defining and deploying a time zone +registration process that would establish unique names for each +version of each <code><abbr>tz</abbr></code> zone, along with a polygonal +representation of the geographical area corresponding to the +zone.</li> +<li>The <a +href="http://lists.w3.org/Archives/Public/www-rdf-calendar/">www-rdf-calendar</a> +list discusses <a +href="http://www.w3.org/RDF/"><abbr +title="Resource Description Framework">RDF</abbr></a>-based calendar +and group scheduling systems, and has a <a +href="http://www.w3.org/2002/12/cal/#tzd">workspace on time zone +data</a> converted from <code><abbr>tz</abbr></code>.</li> +</ul> +<h2>Other <code><abbr>tz</abbr></code> compilers</h2> +<ul> +<li><a href="https://sourceforge.net/projects/vzic/">Vzic</a> is a <a +href="https://en.wikipedia.org/wiki/C_%28programming_language%29">C</a> +program that compiles +<code><abbr>tz</abbr></code> source into iCalendar-compatible VTIMEZONE files. +Vzic is freely +available under the <a +href="http://www.gnu.org/copyleft/gpl.html"><abbr>GNU</abbr> +General Public License (<abbr +title="General Public License">GPL</abbr>)</a>.</li> +<li><a href="https://sourceforge.net/projects/tzical/">tziCal – tz +database conversion utility</a> is like Vzic, except for the <a +href="https://www.microsoft.com/net">.NET framework</a> +and with a <abbr>BSD</abbr>-style license.</li> +<li><a +href="http://search.cpan.org/dist/DateTime-TimeZone/">DateTime::TimeZone</a> +contains a script <code>parse_olson</code> that compiles +<code><abbr>tz</abbr></code> source into <a href="https://www.perl.org">Perl</a> +modules. It is part of the Perl <a +href="http://datetime.perl.org">DateTime Project</a>, which is freely +available under both the <abbr>GPL</abbr> and the Perl Artistic +License. DateTime::TimeZone also contains a script +<code>tests_from_zdump</code> that generates test cases for each clock +transition in the <code><abbr>tz</abbr></code> database.</li> +<li>The <a href="https://howardhinnant.github.io/date/tz.html">Time Zone +Database Parser</a> is a +<a href="https://en.wikipedia.org/wiki/C%2B%2B">C++</a> parser and +runtime library. It is freely available under the +<a href="http://creativecommons.org/licenses/by/4.0/">Creative Commons +Attribution 4.0 International Public License</a>.</li> +<li><a href="http://site.icu-project.org">International Components for +Unicode (<abbr>ICU</abbr>)</a> contains C/C++ and <a +href="https://en.wikipedia.org/wiki/Java_%28programming_language%29">Java</a> +libraries for internationalization that +has a compiler from <code><abbr>tz</abbr></code> source +and from <abbr title="Common Locale Data Repository">CLDR</abbr> data +(mentioned below) +into an <abbr>ICU</abbr>-specific format. +<abbr>ICU</abbr> is freely available under a +<abbr>BSD</abbr>-style license.</li> +<li>The <a href="https://github.com/lau/tzdata">Tzdata</a> package for +the <a href="http://elixir-lang.org">Elixir</a> language downloads +and compiles tz source and exposes <abbr +title="Application Program Interface">API</abbr>s for use. It is +freely available under the <abbr +title="Massachusetts Institute of Technology">MIT</abbr> license.</li> +<li>The <a +href="http://www.oracle.com/technetwork/java/javase/tzupdater-readme-136440.html">TZUpdater +tool</a> compiles <code><abbr>tz</abbr></code> source into the format used by +Oracle Java.</li> +<li><a href="http://www.joda.org/joda-time/">Joda-Time – Java date +and time <abbr>API</abbr></a> contains a class +<code>org.joda.time.tz.ZoneInfoCompiler</code> that compiles +<code><abbr>tz</abbr></code> source into a Joda-specific binary format. Joda Time +is freely available under a <abbr>BSD</abbr>-style license.</li> +<li><a href="http://nodatime.org">Noda Time – Date and +time <abbr>API</abbr> for .NET</a> +and <a href="http://www.babiej.demon.nl/Tz4Net/main.htm">TZ4Net</a> +are similar to Joda Time, but for the .NET framework instead of +Java. They are freely available under the +<a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License</a> +and a <abbr>BSD</abbr>-style license, respectively.</li> +<li><a href="https://en.wikipedia.org/wiki/JavaScript">JavaScript</a>-based +compilers and libraries include: +<ul> +<li><a href="http://momentjs.com/timezone/">Moment Timezone</a> is a +plugin for the <a href="http://momentjs.com">Moment.js</a> date +manipulation library. It is freely available under the <abbr>MIT</abbr> +license.</li> +<li><a href="https://github.com/mde/timezone-js">TimezoneJS.Date</a>'s +<abbr>API</abbr> is upward compatible with standard JavaScript +Dates. It is freely available under the Apache License.</li> +<li><a href="https://github.com/sproutsocial/walltime-js">Walltime-js</a> +translates <abbr>UT</abbr> to local time. It is freely available under +the <abbr>MIT</abbr> license.</li> +</ul> +<li><a href="http://pytz.sourceforge.net">pytz – World Timezone +Definitions for Python</a> compiles <code><abbr>tz</abbr></code> source into +<a href="https://www.python.org">Python</a>. +It is freely available under a <abbr>BSD</abbr>-style license.</li> +<li><a href="http://tzinfo.github.io">TZInfo – +Ruby Timezone Library</a> +compiles <code><abbr>tz</abbr></code> source into +<a href="https://www.ruby-lang.org/en/">Ruby</a>. +It is freely available under the <abbr>MIT</abbr> license.</li> +<li>The <a href="http://www.squeaksource.com/Chronos/">Chronos Date/Time +Library</a> is +a <a href="https://en.wikipedia.org/wiki/Smalltalk">Smalltalk</a> class +library that compiles <code><abbr>tz</abbr></code> source into a time +zone repository whose format +is either proprietary or an <abbr>XML</abbr>-encoded +representation.</li> +<li><a href="http://tcl.tk">Tcl</a> +contains a developer-oriented parser that compiles <code><abbr>tz</abbr></code> +source into text files, along with a runtime that can read those +files. Tcl is freely available under a <abbr>BSD</abbr>-style +license.</li> +</ul> +<h2>Other <code><abbr>tz</abbr></code> binary file readers</h2> +<ul> +<li>The <a +href="http://www.gnu.org/software/libc/"><abbr>GNU</abbr> C +Library</a> +has an independent, thread-safe implementation of +a <code><abbr>tz</abbr></code> binary file reader. +This library is freely available under the +<a href="http://www.gnu.org/copyleft/lesser.html"> +<abbr>GNU</abbr> Lesser General Public License +(<abbr title="Lesser General Public License">LGPL</abbr>)</a>, +and is widely used in <abbr>GNU</abbr>/Linux systems.</li> +<li><a href="https://www.gnome.org">GNOME</a>'s Glib has +a <code><abbr>tz</abbr></code> binary file reader written in C that +creates a <code>GTimeZone</code> object representing sets +of <abbr>UT</abbr> offsets. +It is freely available under the <abbr>LGPL</abbr>.</li> +<li>The +<a href="https://github.com/bloomberg/bde/wiki">BDE Standard Library</a>'s +<code>baltzo::TimeZoneUtil</code> component contains a C++ +implementation of a binary file reader. It is freely available under +the Apache License.</li> +<li><a href="https://github.com/google/cctz">CCTZ</a> is a simple C++ +library that translates between UTC and civil time and can read binary +files. It is freely available under the Apache License.</li> +<li><a href="http://bmsi.com/java/#TZ">ZoneInfo.java</a> +is a <code><abbr>tz</abbr></code> binary file reader written in Java. +It is freely available under the <abbr>LGPL</abbr>.</li> +<li><a href="https://github.com/bigeasy/timezone">Timezone</a> is a +JavaScript library that supports date arithmetic that is time zone +aware. It is freely available under the <abbr>MIT</abbr> license.</li> +<li>Tcl, mentioned above, also contains a +<code><abbr>tz</abbr></code> binary file reader.</li> +<li><a href="http://search.cpan.org/perldoc?DateTime::TimeZone::Tzfile"> +DateTime::TimeZone::Tzfile</a> +is a <code><abbr>tz</abbr></code> binary file reader written in Perl. +It is freely available under the same terms as Perl +(dual <abbr>GPL</abbr> and Artistic license).</li> +<li>The +public-domain <a href="https://github.com/dbaron/tz.js">tz.js</a> +library contains a Python tool that +converts <code><abbr>tz</abbr></code> binary data into +<abbr>JSON</abbr>-format data suitable for use +in its JavaScript library for time zone conversion. Dates before 1970 +are not supported.</li> +<li>The <a +href="http://hackage.haskell.org/package/timezone-olson">timezone-olson</a> +package contains <a href="https://www.haskell.org">Haskell</a> code that +parses and uses <code><abbr>tz</abbr></code> binary data. It is freely +available under a <abbr>BSD</abbr>-style license.</li> +</ul> +<h2>Other <code><abbr>tz</abbr></code>-based time zone software</h2> +<ul> +<li><a href="https://foxclocks.org">FoxClocks</a> +is an extension for <a href="https://www.google.com/chrome/">Google +Chrome</a> and for <a +href="https://developer.mozilla.org/en-US/docs/Mozilla/Tech/Toolkit_API">Mozilla +Toolkit</a> applications like <a +href="https://www.mozilla.org/en-US/firefox/new/">Firefox</a> and <a +href="https://www.mozilla.org/en-US/thunderbird/">Thunderbird</a>. +It displays multiple clocks in the application window, and has a mapping +interface to <a href="https://www.google.com/earth/">Google Earth</a>. +It is freely available under the <abbr>GPL</abbr>.</li> +<li><a href="https://golang.org">Go programming language</a> +implementations contain a copy of a 32-bit subset of a recent +<code><abbr>tz</abbr></code> database in a +Go-specific format.</li> +<li><a +href="http://users.skynet.be/Peter.Verthez/projects/intclock/">International +clock (intclock)</a> is a clock that displays multiple time zones on +<abbr>GNU</abbr>/Linux and similar systems. It is freely available +under the <abbr>GPL</abbr>.</li> +<li>Microsoft Windows 8.1 +and later has <code><abbr>tz</abbr></code> data and <abbr>CLDR</abbr> +data (mentioned below) used by +<a href="https://en.wikipedia.org/wiki/Windows_Runtime">Windows Runtime</a> +classes such as <a +href="https://msdn.microsoft.com/en-us/library/windows/apps/windows.globalization.datetimeformatting.datetimeformatter.aspx"><code>DateTimeFormatter</code></a>. +<a +href="https://blogs.msdn.microsoft.com/bclteam/2007/06/07/exploring-windows-time-zones-with-system-timezoneinfo-josh-free/">Exploring +Windows Time Zones with <code>System.TimeZoneInfo</code></a> describes +the older, proprietary method of Microsoft Windows 2000 and later, +which stores time zone data in the +<a href="https://en.wikipedia.org/wiki/Windows_Registry">Windows Registry</a>. The +<a +href="http://www.unicode.org/cldr/charts/latest/supplemental/zone_tzid.html">Zone → +Tzid table</a> or <a +href="http://unicode.org/repos/cldr/trunk/common/supplemental/windowsZones.xml"><abbr>XML</abbr> +file</a> of the <abbr>CLDR</abbr> data maps proprietary zone IDs +to <code><abbr>tz</abbr></code> names. +<li><a +href="https://www.oracle.com/java/index.html">Oracle +Java</a> contains a copy of a subset of a recent +<code><abbr>tz</abbr></code> database in a +Java-specific format.</li> +<li><a href="https://kimmo.suominen.com/sw/timezone/">Time Zone</a> is +a <a href="https://wordpress.org">WordPress</a> plugin. It is freely +available under a <abbr>BSD</abbr>-style license.</li> +<li><a href="http://www.relativedata.com/time-zone-master">Time Zone +Master</a> is a Microsoft Windows clock program that can automatically +download, compile and use the <code>tzdata<var>D</var>.tar.gz</code> +files as they are released. The Basic version is free.</li> +<li><a +href="http://veladg.com/velaterra.html">VelaTerra</a> is +an <abbr>OS X</abbr> program. Its developers +<a href="http://veladg.com/tzoffer.html">offer free +licenses</a> to <code><abbr>tz</abbr></code> contributors.</li> +</ul> +<h2>Other time zone databases</h2> +<ul> +<li><a href="http://www.astro.com/atlas">Time-zone Atlas</a> +is Astrodienst's Web version of Shanks and Pottenger's +time zone history atlases published in both <a +href="http://astrocom.com/astrology-products/software/acs-atlas-software">computer</a> +and book form (<a +href="http://www.astrocom.com/astrology/books/american-atlas">one volume +for the <abbr>US</abbr></a>, and <a +href="http://www.astrocom.com/astrology/books/international-atlas">one for +other locations</a>) by <a +href="http://astrocom.com">Astro Computing Services</a>. +These atlases are extensive but unreliable, as Shanks appears to have +guessed many <abbr>UT</abbr> offsets and transitions. The atlases cite no +sources and do not indicate which entries are guesswork.</li> +<li><a href="https://en.wikipedia.org/wiki/HP-UX">HP-UX</a> has a database in +its own <code>tztab</code>(4) format.</li> +<li>Microsoft Windows has proprietary data mentioned above.</li> +<li><a href="http://www.worldtimeserver.com">World Time Server</a> +is another time zone database.</li> +<li><a href="http://tycho.usno.navy.mil/tzones.html">World Time Zones</a> +contains data from the Time Service Department of the +<abbr>US</abbr> Naval Observatory.</li> +<li>The <a href="http://www.iata.org/publications/Pages/ssim.aspx">Standard +Schedules Information Manual</a> of the +International Air Transport Association +gives current time zone rules for airports served by commercial aviation.</li> +</ul> +<h2>Maps</h2> +<ul> +<li>The <a href="https://www.cia.gov/index.html">United States Central +Intelligence Agency (<abbr +title="Central Intelligence Agency">CIA</abbr>)</a> publishes a <a +href="https://www.cia.gov/library/publications/the-world-factbook/graphics/ref_maps/physical/pdf/standard_time_zones_of_the_world.pdf">time +zone map</a>; the +<a +href="http://www.lib.utexas.edu/maps/world.html">Perry–Castañeda +Library Map Collection</a> +of the University of Texas at Austin has copies of +recent editions. +The pictorial quality is good, +but the maps do not indicate summer time, +and parts of the data are a few years out of date.</li> +<li><a href="http://www.worldtimezone.com">Current time around the world +and standard time zones map of the world</a> +has several fancy time zone maps; it covers Russia particularly well. +The maps' pictorial quality is not quite as good as the +<abbr>CIA</abbr>'s +but the maps are more up to date.</li> +<li><a +href="http://blog.poormansmath.net/how-much-is-time-wrong-around-the-world/">How +much is time wrong around the world?</a> maps the difference between +mean solar and standard time, highlighting areas such as western China +where the two differ greatly. It's a bit out of date, unfortunately.</li> +</ul> +<h2>Time zone boundaries</h2> +<ul> +<li><a href="http://efele.net/maps/tz/"><abbr>TZ</abbr> timezones +maps</a> contains <a +href="https://en.wikipedia.org/wiki/Shapefile">shapefiles</a> of +sets of <code><abbr>tz</abbr></code> regions.</li> +<li>The <a href="https://github.com/bradfitz/latlong">latlong package</a> +maps geographical coordinates to a <code><abbr>tz</abbr></code> region. +It is written in Go and is freely available under the Apache License.</li> +<li><a href="https://derickrethans.nl/what-time-is-it.html">What Time +is It Here?</a> applies <a href="https://www.mongodb.com">MongoDB</a> +geospatial query operators to shapefiles' data.</li> +<li><a href="http://statoids.com/statoids.html">Administrative +Divisions of Countries ("Statoids")</a> contains lists of +political subdivision data related to time zones.</li> +<li><a href="http://home.kpn.nl/vanadovv/time/Multizones.html">Time +zone boundaries for multizone countries</a> summarizes legal +boundaries between time zones within countries.</li> +<li>Manifold.net's <a +href="http://manifold.net/info/freestuff.shtml">Free Stuff for +Manifold System Users</a> includes a Manifold-format map of +world time zone boundaries distributed under the +<abbr>GPL</abbr>.</li> +<li>The GeoCommunity lists several commercial sources for <a +href="http://spatialnews.geocomm.com/features/timezones/">International +Time Zones and Time Zone Data</a>.</li> +<li>A ship within the <a +href="https://en.wikipedia.org/wiki/Territorial_waters">territorial +waters</a> of any nation uses that nation's time. In international +waters, time zone boundaries are meridians 15° apart, except that +<abbr>UTC</abbr>−12 and <abbr>UTC</abbr>+12 are each 7.5° +wide and are separated by +the 180° meridian (not by the International Date Line, which is +for land and territorial waters only). A captain can change ship's +clocks any time after entering a new time zone; midnight changes are +common.</li> +</ul> +<h2>Civil time concepts and history</h2> +<ul> +<li><a href="http://www.nist.gov/pml/general/time/index.cfm">A +Walk through Time</a> +surveys the evolution of timekeeping.</li> +<li><a href="http://www.webexhibits.org/daylightsaving/">About Daylight +Saving Time – History, rationale, laws & dates</a> +is an overall history of <abbr>DST</abbr>.</li> +<li><a href="https://www.w3.org/TR/timezone/">Working with Time Zones</a> +contains guidelines and best practices for software applications that +deal with civil time.</li> +<li><a href="http://energy.ca.gov/daylightsaving.html">Saving Time, +Saving Energy</a> discusses a primary justification for <abbr>DST</abbr>.</li> +<li><a href="http://seizethedaylight.com/dst/">A Brief +History of Daylight Saving Time</a> summarizes some of the contentious +history of <abbr>DST</abbr>.</li> +<li><a href="http://www.staff.science.uu.nl/~gent0113/idl/idl.htm">A History of +the International Date Line</a> tells the story of the most important +time zone boundary.</li> +<li><a href="http://statoids.com/tconcept.html">Basic Time +Zone Concepts</a> discusses terminological issues behind time zones.</li> +</ul> +<h2>National histories of legal time</h2> +<dl> +<dt>Australia</dt> +<dd>The Parliamentary Library has commissioned a <a +href="http://www.aph.gov.au/binaries/library/pubs/rp/2009-10/10rp10.pdf">research +paper on daylight saving time in Australia</a>. +The Bureau of Meteorology publishes a list of <a +href="http://www.bom.gov.au/climate/averages/tables/dst_times.shtml">Implementation +Dates of Daylight Savings Time within Australia</a>.</dd> +<dt>Belgium</dt> +<dd>The Royal Observatory of Belgium maintains a table of <a +href="http://www.astro.oma.be/GENERAL/INFO/nli001a.html" +hreflang="nl">time in Belgium (in Dutch)</a>.</dd> +<dt>Brazil</dt> +<dd>The Time Service Department of the National Observatory +records <a href="http://pcdsh01.on.br/DecHV.html" +hreflang="pt-BR">Brazil's daylight saving time decrees (in +Portuguese)</a>.</dd> +<dt>Canada</dt> +<dd>National Research Council Canada publishes current +and some older information about <a +href="http://www.nrc-cnrc.gc.ca/eng/services/time/time_zones.html">time +zones & daylight saving time</a>.</dd> +<dt>Chile</dt> +<dd>The Hydrographic and Oceanographic Service of the Chilean Navy publishes a +<a href="http://www.horaoficial.cl/historia_hora.html" hreflang="es">history of +Chile's official time (in Spanish)</a>.</dd> +<dt>Germany</dt> +<dd>The National Institute for Science and Technology maintains the <a +href="http://www.ptb.de/cms/en/fachabteilungen/abt4/fb-44/ag-441/realisation-of-legal-time-in-germany.html">Realisation +of Legal Time in Germany</a>.</dd> +<dt>Israel</dt> +<dd>The Interior Ministry periodically issues <a +href="ftp://ftp.cs.huji.ac.il/pub/tz/announcements" +hreflang="he">announcements (in Hebrew)</a>.</dd> +<dt>Mexico</dt> +<dd>The Investigation and Analysis Service of the Mexican Library of +Congress has published a <a +href="http://www.diputados.gob.mx/bibliot/publica/inveyana/polisoc/horver/index.htm" +hreflang="es">history of Mexican local time (in Spanish)</a>.</dd> +<dt>Malaysia</dt> +<dd>See Singapore below.</dd> +<dt>Netherlands</dt> +<dd><a href="http://www.staff.science.uu.nl/~gent0113/wettijd/wettijd.htm" +hreflang="nl">Legal time in the Netherlands (in Dutch)</a> +covers the history of local time in the Netherlands from ancient times.</dd> +<dt>New Zealand</dt> +<dd>The Department of Internal Affairs maintains a brief <a +href="http://www.dia.govt.nz/Daylight-Saving-History">History of +Daylight Saving</a>. The privately-maintained <a +href="http://astrologyschool.com/nztime.html">History of New Zealand +time</a> has more details.</dd> +<dt>Singapore</dt> +<dd><a +href="http://www.math.nus.edu.sg/aslaksen/teaching/timezone.html">Why +is Singapore in the "Wrong" Time Zone?</a> details the +history of legal time in Singapore and Malaysia.</dd> +<dt>United Kingdom</dt> +<dd><a +href="https://www.polyomino.org.uk/british-time/">History of +legal time in Britain</a> discusses in detail the country +with perhaps the best-documented history of clock adjustments. +The National Physical Laboratory also maintains an <a +href="http://www.npl.co.uk/educate-explore/what-is-time/archive-of-summer-time-dates-1916-2006">Archive +of Summer time dates</a>.</dd> +<dt>United States</dt> +<dd>The Department of Transportation's <a +href="https://www.transportation.gov/regulations/recent-time-zone-proceedings">Recent +Time Zone Proceedings</a> lists changes to time zone boundaries.</dd> +</dl> +<h2>Precision timekeeping</h2> +<ul> +<li><a +href="http://literature.agilent.com/litweb/pdf/5965-7984E.pdf">The +Science of Timekeeping</a> is a thorough introduction +to the theory and practice of precision timekeeping.</li> +<li><a href="http://www.ntp.org"><abbr +title="Network Time Protocol">NTP</abbr>: The Network +Time Protocol</a> +discusses how to synchronize clocks of +Internet hosts.</li> +<li>The <a href="http://www.nist.gov/el/isd/ieee/ieee1588.cfm">Precision +Time Protocol</a> (<abbr +title="Institute of Electrical and Electronics Engineers">IEEE</abbr> 1588) +can achieve submicrosecond clock accuracy on a local area network.</li> +<li><a +href="https://tools.ietf.org/html/rfc4833">Timezone +Options for <abbr title="Dynamic Host Configuration Protocol">DHCP</abbr></a> +(Internet <abbr>RFC</abbr> 4833) +specifies a <a +href="https://en.wikipedia.org/wiki/Dynamic_Host_Configuration_Protocol"><abbr>DHCP</abbr></a> +option for a server to configure +a client's time zone and daylight saving settings automatically.</li> +<li><a href="http://gauss.gge.unb.ca/GMT.UT.and.the.RGO.html">A Few Facts +Concerning <abbr>GMT</abbr>, <abbr>UT</abbr>, and +the <abbr title="Royal Greenwich Observatory">RGO</abbr></a> +answers questions like "What is the +difference between <abbr>GMT</abbr> and <abbr>UTC</abbr>?"</li> +<li><a +href="http://www.cv.nrao.edu/~rfisher/Ephemerides/times.html">Astronomical +Times</a> explains more abstruse astronomical time scales like +<abbr title="Terrestrial Dynamic Time">TDT</abbr>, +<abbr title="Geocentric Coordinate Time">TCG</abbr>, and +<abbr title="Barycentric Dynamic Time">TDB</abbr>. +<a href="http://www.ucolick.org/~sla/leapsecs/timescales.html">Time +Scales</a> goes into more detail, particularly for historical variants.</li> +<li>The <a href="http://iau.org"><abbr +title="International Astronomical Union">IAU</abbr></a>'s <a +href="http://www.iausofa.org"><abbr +title="Standards Of Fundamental Astronomy">SOFA</abbr></a> +collection contains C and <a +href="https://en.wikipedia.org/wiki/Fortran">Fortran</a> +code for converting among time scales like +<abbr title="International Atomic Time">TAI</abbr>, +<abbr>TDB</abbr>, <abbr>TDT</abbr> and +<abbr>UTC</abbr>.</li> +<li><a href="http://solarsystem.nasa.gov/basics/bsf2-3.php">Basics of +Space Flight – Reference Systems – Time Conventions</a> +briefly explains interplanetary space flight timekeeping.</li> +<li><a +href="http://www.giss.nasa.gov/tools/mars24/help/notes.html">Technical +Notes on Mars Solar Time as Adopted by the Mars24 Sunclock</a> briefly +describes Mars Coordinated Time (<abbr +title="Mars Coordinated Time">MTC</abbr>) and the +diverse local time +scales used by each landed mission on Mars.</li> +<li><a href="http://leapsecond.com">LeapSecond.com</a> is +dedicated not only to leap seconds but to precise time and frequency +in general. It covers the state of the art in amateur timekeeping, and +how the art has progressed over the past few decades.</li> +<li><a +href="https://www.iers.org/IERS/EN/Publications/Bulletins/bulletins.html"><abbr +title="International Earth Rotation and Reference Systems Service">IERS</abbr> +Bulletins</a> contains official publications of the International +Earth Rotation and Reference Systems Service, which decides +when leap seconds occur.</li> +<li>The <a +href="https://pairlist6.pair.net/mailman/listinfo/leapsecs">Leap +Second Discussion List</a> covers <a +href="http://gauss.gge.unb.ca/papers.pdf/gpsworld.november99.pdf">McCarthy +and Klepczynski's proposal to discontinue leap seconds</a>, +discussed further in +<a href="http://www.cl.cam.ac.uk/~mgk25/time/metrologia-leapsecond.pdf">The +leap second: its history and possible future</a>. +<a href="http://www.ucolick.org/~sla/leapsecs/"><abbr>UTC</abbr> +might be redefined +without Leap Seconds</a> gives pointers on this +contentious issue.</li> +</ul> +<h2>Time notation</h2> +<ul> +<li>The <a href="http://cldr.unicode.org">Unicode Common Locale Data +Repository (<abbr>CLDR</abbr>) Project</a> has localizations for time +zone names, abbreviations, identifiers, and formats. For example, it +contains French translations for "Eastern European Summer Time", +"<abbr title="Eastern European Summer Time">EEST</abbr>", and +"Bucharest". Its +<a href="http://unicode.org/cldr/charts/by_type/index.html">by-type +charts</a> show these values for many locales. Data values are available in +both <abbr title="Locale Data Markup Language">LDML</abbr> +(an <abbr>XML</abbr> format) and <abbr>JSON</abbr>. +<li> +<a href="http://www.cl.cam.ac.uk/~mgk25/iso-time.html">A summary of +the international standard date and time notation</a> is a good +summary of +<a +href="http://www.iso.org/iso/catalogue_detail?csnumber=40874"><abbr +title="International Organization for Standardization">ISO</abbr> +8601:2004 – Data elements and interchange formats – Information +interchange – Representation of dates and times</a>.</li> +<li> +<a href="https://www.w3.org/TR/xmlschema-2/#dateTime"><abbr>XML</abbr> +Schema: Datatypes – dateTime</a> specifies a format inspired by +<abbr>ISO</abbr> 8601 that is in common use in <abbr>XML</abbr> data.</li> +<li> +<a href="https://tools.ietf.org/html/rfc5322">Internet +Message Format</a> (Internet <abbr>RFC</abbr> 5322) §3.3 +specifies the time notation used in email and <a +href="https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol"><abbr>HTTP</abbr></a> +headers.</li> +<li> +<a href="https://tools.ietf.org/html/rfc3339">Date and Time +on the Internet: Timestamps</a> (Internet <abbr>RFC</abbr> 3339) +specifies an <abbr>ISO</abbr> 8601 +profile for use in new Internet +protocols.</li> +<li> +<a href="https://www.hackcraft.net/web/datetime/">Date & Time +Formats on the Web</a> surveys web- and Internet-oriented date and time +formats.</li> +<li> +<a href="http://exit109.com/~ghealton/y2k/yrexamples.html">The +Best of Dates, the Worst of Dates</a> covers many problems encountered +by software developers when handling dates and time stamps.</li> +<li>Alphabetic time zone abbreviations should not be used as unique +identifiers for <abbr>UTC</abbr> offsets as they are ambiguous in +practice. For example, in English-speaking North America +"<abbr>CST</abbr>" denotes 6 hours behind <abbr>UTC</abbr>, +but in China it denotes 8 hours ahead of <abbr>UTC</abbr>, +and French-speaking North Americans prefer +"<abbr title="Heure Normale du Centre">HNC</abbr>" to +"<abbr>CST</abbr>". For <abbr>POSIX</abbr> the <code><abbr>tz</abbr></code> +database contains English abbreviations for all time stamps but in +many cases these are merely inventions of the database +maintainers.</li> +<li>Numeric time zone abbreviations typically count hours east of +<abbr>UTC</abbr>, e.g., +09 for Japan and +−10 for Hawaii. However, the <abbr>POSIX</abbr> +<code><abbr>TZ</abbr></code> environment variable uses the opposite convention. +For example, one might use <code><abbr>TZ</abbr>="<abbr +title="Japan Standard Time">JST</abbr>-9"</code> and +<code><abbr>TZ</abbr>="<abbr title="Hawaii Standard Time">HST</abbr>10"</code> +for Japan and Hawaii, respectively. If the +<code><abbr>tz</abbr></code> database is available, it is usually better to use +settings like <code><abbr>TZ</abbr>="Asia/Tokyo"</code> and +<code><abbr>TZ</abbr>="Pacific/Honolulu"</code> instead, as this should avoid +confusion, handle old time stamps better, and insulate you better from +any future changes to the rules. One should never set +<abbr>POSIX</abbr> <code><abbr>TZ</abbr></code> to a value like +<code>"GMT-9"</code>, though, since this would falsely claim that +local time is nine hours ahead of <abbr>UTC</abbr> and the time zone +is called "<abbr>GMT</abbr>".</li> +</ul> +<h2>See also</h2> +<ul> +<li><a href="tz-art.htm">Time and the Arts</a></li> +</ul> +<hr> +<address> +This web page is in the public domain, so clarified as of +2009-05-17 by Arthur David Olson. +<br> +Please send corrections to this web page to the +<a href="mailto:tz@iana.org">time zone mailing list</a>. +</address> +</body> +</html> diff --git a/tz/tzfile.5 b/tz/tzfile.5 new file mode 100644 index 0000000..b7e6d45 --- /dev/null +++ b/tz/tzfile.5 @@ -0,0 +1,155 @@ +.TH TZFILE 5 +.SH NAME +tzfile \- time zone information +.SH DESCRIPTION +The time zone information files used by +.IR tzset (3) +begin with the magic characters "TZif" to identify them as +time zone information files, +followed by a character identifying the version of the file's format +(as of 2013, either an ASCII NUL, or '2', or '3') +followed by fifteen bytes containing zeroes reserved for future use, +followed by six four-byte integer values +written in a standard byte order +(the high-order byte of the value is written first). +These values are, +in order: +.TP +.I tzh_ttisgmtcnt +The number of UT/local indicators stored in the file. +.TP +.I tzh_ttisstdcnt +The number of standard/wall indicators stored in the file. +.TP +.I tzh_leapcnt +The number of leap seconds for which data entries are stored in the file. +.TP +.I tzh_timecnt +The number of transition times for which data entries are stored +in the file. +.TP +.I tzh_typecnt +The number of local time types for which data entries are stored +in the file (must not be zero). +.TP +.I tzh_charcnt +The number of characters of time zone abbreviation strings +stored in the file. +.PP +The above header is followed by +.I tzh_timecnt +four-byte signed integer values sorted in ascending order. +These values are written in standard byte order. +Each is used as a transition time (as returned by +.IR time (2)) +at which the rules for computing local time change. +Next come +.I tzh_timecnt +one-byte unsigned integer values; +each one tells which of the different types of local time types +described in the file is associated with the time period +starting with the same-indexed transition time. +These values serve as indices into an array of +.I ttinfo +structures (with +.I tzh_typecnt +entries) that appears next in the file; +these structures are defined as follows: +.in +.5i +.sp +.nf +.ta .5i +\w'unsigned char\0\0'u +struct ttinfo { + int32_t tt_gmtoff; + unsigned char tt_isdst; + unsigned char tt_abbrind; +}; +.in -.5i +.fi +.sp +Each structure is written as a four-byte signed integer value for +.IR tt_gmtoff , +in a standard byte order, followed by a one-byte value for +.I tt_isdst +and a one-byte value for +.IR tt_abbrind . +In each structure, +.I tt_gmtoff +gives the number of seconds to be added to UT, +.I tt_isdst +tells whether +.I tm_isdst +should be set by +.I localtime (3) +and +.I tt_abbrind +serves as an index into the array of time zone abbreviation characters +that follow the +.I ttinfo +structure(s) in the file. +.PP +Then there are +.I tzh_leapcnt +pairs of four-byte values, written in standard byte order; +the first value of each pair gives the time +(as returned by +.IR time(2)) +at which a leap second occurs; +the second gives the +.I total +number of leap seconds to be applied during the time period +starting at the given time. +The pairs of values are sorted in ascending order by time. +.PP +Then there are +.I tzh_ttisstdcnt +standard/wall indicators, each stored as a one-byte value; +they tell whether the transition times associated with local time types +were specified as standard time or wall clock time, +and are used when a time zone file is used in handling POSIX-style +time zone environment variables. +.PP +Finally there are +.I tzh_ttisgmtcnt +UT/local indicators, each stored as a one-byte value; +they tell whether the transition times associated with local time types +were specified as UT or local time, +and are used when a time zone file is used in handling POSIX-style +time zone environment variables. +.PP +.I Localtime +uses the first standard-time +.I ttinfo +structure in the file +(or simply the first +.I ttinfo +structure in the absence of a standard-time structure) +if either +.I tzh_timecnt +is zero or the time argument is less than the first transition time recorded +in the file. +.PP +For version-2-format time zone files, +the above header and data are followed by a second header and data, +identical in format except that +eight bytes are used for each transition time or leap second time. +After the second header and data comes a newline-enclosed, +POSIX-TZ-environment-variable-style string for use in handling instants +after the last transition time stored in the file +(with nothing between the newlines if there is no POSIX representation for +such instants). +.PP +For version-3-format time zone files, the POSIX-TZ-style string may +use two minor extensions to the POSIX TZ format, as described in +.IR newtzset (3). +First, the hours part of its transition times may be signed and range from +\-167 through 167 instead of the POSIX-required unsigned values +from 0 through 24. Second, DST is in effect all year if it starts +January 1 at 00:00 and ends December 31 at 24:00 plus the difference +between daylight saving and standard time. +.PP +Future changes to the format may append more data. +.SH SEE ALSO +newctime(3), newtzset(3), zdump(8), zic(8) +.\" This file is in the public domain, so clarified as of +.\" 1996-06-05 by Arthur David Olson. diff --git a/tz/tzfile.h b/tz/tzfile.h new file mode 100644 index 0000000..ebecd68 --- /dev/null +++ b/tz/tzfile.h @@ -0,0 +1,169 @@ +#ifndef TZFILE_H + +#define TZFILE_H + +/* +** This file is in the public domain, so clarified as of +** 1996-06-05 by Arthur David Olson. +*/ + +/* +** This header is for use ONLY with the time conversion code. +** There is no guarantee that it will remain unchanged, +** or that it will remain at all. +** Do NOT copy it to any system include directory. +** Thank you! +*/ + +/* +** Information about time zone files. +*/ + +#ifndef TZDIR +#define TZDIR "/usr/local/etc/zoneinfo" /* Time zone object file directory */ +#endif /* !defined TZDIR */ + +#ifndef TZDEFAULT +#define TZDEFAULT "localtime" +#endif /* !defined TZDEFAULT */ + +#ifndef TZDEFRULES +#define TZDEFRULES "posixrules" +#endif /* !defined TZDEFRULES */ + +/* +** Each file begins with. . . +*/ + +#define TZ_MAGIC "TZif" + +struct tzhead { + char tzh_magic[4]; /* TZ_MAGIC */ + char tzh_version[1]; /* '\0' or '2' or '3' as of 2013 */ + char tzh_reserved[15]; /* reserved; must be zero */ + char tzh_ttisgmtcnt[4]; /* coded number of trans. time flags */ + char tzh_ttisstdcnt[4]; /* coded number of trans. time flags */ + char tzh_leapcnt[4]; /* coded number of leap seconds */ + char tzh_timecnt[4]; /* coded number of transition times */ + char tzh_typecnt[4]; /* coded number of local time types */ + char tzh_charcnt[4]; /* coded number of abbr. chars */ +}; + +/* +** . . .followed by. . . +** +** tzh_timecnt (char [4])s coded transition times a la time(2) +** tzh_timecnt (unsigned char)s types of local time starting at above +** tzh_typecnt repetitions of +** one (char [4]) coded UT offset in seconds +** one (unsigned char) used to set tm_isdst +** one (unsigned char) that's an abbreviation list index +** tzh_charcnt (char)s '\0'-terminated zone abbreviations +** tzh_leapcnt repetitions of +** one (char [4]) coded leap second transition times +** one (char [4]) total correction after above +** tzh_ttisstdcnt (char)s indexed by type; if 1, transition +** time is standard time, if 0, +** transition time is wall clock time +** if absent, transition times are +** assumed to be wall clock time +** tzh_ttisgmtcnt (char)s indexed by type; if 1, transition +** time is UT, if 0, +** transition time is local time +** if absent, transition times are +** assumed to be local time +*/ + +/* +** If tzh_version is '2' or greater, the above is followed by a second instance +** of tzhead and a second instance of the data in which each coded transition +** time uses 8 rather than 4 chars, +** then a POSIX-TZ-environment-variable-style string for use in handling +** instants after the last transition time stored in the file +** (with nothing between the newlines if there is no POSIX representation for +** such instants). +** +** If tz_version is '3' or greater, the above is extended as follows. +** First, the POSIX TZ string's hour offset may range from -167 +** through 167 as compared to the POSIX-required 0 through 24. +** Second, its DST start time may be January 1 at 00:00 and its stop +** time December 31 at 24:00 plus the difference between DST and +** standard time, indicating DST all year. +*/ + +/* +** In the current implementation, "tzset()" refuses to deal with files that +** exceed any of the limits below. +*/ + +#ifndef TZ_MAX_TIMES +#define TZ_MAX_TIMES 2000 +#endif /* !defined TZ_MAX_TIMES */ + +#ifndef TZ_MAX_TYPES +/* This must be at least 17 for Europe/Samara and Europe/Vilnius. */ +#define TZ_MAX_TYPES 256 /* Limited by what (unsigned char)'s can hold */ +#endif /* !defined TZ_MAX_TYPES */ + +#ifndef TZ_MAX_CHARS +#define TZ_MAX_CHARS 50 /* Maximum number of abbreviation characters */ + /* (limited by what unsigned chars can hold) */ +#endif /* !defined TZ_MAX_CHARS */ + +#ifndef TZ_MAX_LEAPS +#define TZ_MAX_LEAPS 50 /* Maximum number of leap second corrections */ +#endif /* !defined TZ_MAX_LEAPS */ + +#define SECSPERMIN 60 +#define MINSPERHOUR 60 +#define HOURSPERDAY 24 +#define DAYSPERWEEK 7 +#define DAYSPERNYEAR 365 +#define DAYSPERLYEAR 366 +#define SECSPERHOUR (SECSPERMIN * MINSPERHOUR) +#define SECSPERDAY ((int_fast32_t) SECSPERHOUR * HOURSPERDAY) +#define MONSPERYEAR 12 + +#define TM_SUNDAY 0 +#define TM_MONDAY 1 +#define TM_TUESDAY 2 +#define TM_WEDNESDAY 3 +#define TM_THURSDAY 4 +#define TM_FRIDAY 5 +#define TM_SATURDAY 6 + +#define TM_JANUARY 0 +#define TM_FEBRUARY 1 +#define TM_MARCH 2 +#define TM_APRIL 3 +#define TM_MAY 4 +#define TM_JUNE 5 +#define TM_JULY 6 +#define TM_AUGUST 7 +#define TM_SEPTEMBER 8 +#define TM_OCTOBER 9 +#define TM_NOVEMBER 10 +#define TM_DECEMBER 11 + +#define TM_YEAR_BASE 1900 + +#define EPOCH_YEAR 1970 +#define EPOCH_WDAY TM_THURSDAY + +#define isleap(y) (((y) % 4) == 0 && (((y) % 100) != 0 || ((y) % 400) == 0)) + +/* +** Since everything in isleap is modulo 400 (or a factor of 400), we know that +** isleap(y) == isleap(y % 400) +** and so +** isleap(a + b) == isleap((a + b) % 400) +** or +** isleap(a + b) == isleap(a % 400 + b % 400) +** This is true even if % means modulo rather than Fortran remainder +** (which is allowed by C89 but not C99). +** We use this to avoid addition overflow problems. +*/ + +#define isleap_sum(a, b) isleap((a) % 400 + (b) % 400) + +#endif /* !defined TZFILE_H */ diff --git a/tz/tzselect.8 b/tz/tzselect.8 new file mode 100644 index 0000000..fb39e1f --- /dev/null +++ b/tz/tzselect.8 @@ -0,0 +1,113 @@ +.TH TZSELECT 8 +.SH NAME +tzselect \- select a time zone +.SH SYNOPSIS +.ie \n(.g .ds - \f(CW-\fP +.el ds - \- +.B tzselect +[ +.B \*-c +.I coord +] [ +.B \*-n +.I limit +] [ +.B \*-\*-help +] [ +.B \*-\*-version +] +.SH DESCRIPTION +The +.B tzselect +program asks the user for information about the current location, +and outputs the resulting time zone description to standard output. +The output is suitable as a value for the TZ environment variable. +.PP +All interaction with the user is done via standard input and standard error. +.SH OPTIONS +.TP +.BI "\*-c " coord +Instead of asking for continent and then country and then city, +ask for selection from time zones whose largest cities +are closest to the location with geographical coordinates +.I coord. +Use ISO 6709 notation for +.I coord, +that is, a latitude immediately followed by a longitude. The latitude +and longitude should be signed integers followed by an optional +decimal point and fraction: positive numbers represent north and east, +negative south and west. Latitudes with two and longitudes with three +integer digits are treated as degrees; latitudes with four or six and +longitudes with five or seven integer digits are treated as +.I "DDMM, DDDMM, DDMMSS," +or +.I DDDMMSS +representing +.I DD +or +.I DDD +degrees, +.I MM +minutes, +and zero or +.I SS +seconds, with any trailing fractions represent fractional minutes or +(if +.I SS +is present) seconds. The decimal point is that of the current locale. +For example, in the (default) C locale, +.B "\*-c\ +40.689\*-074.045" +specifies 40.689\(de\|N, 74.045\(de\|W, +.B "\*-c\ +4041.4\*-07402.7" +specifies 40\(de\|41.4\(fm\|N, 74\(de\|2.7\(fm\|W, and +.B "\*-c\ +404121\*-0740240" +specifies 40\(de\|41\(fm\|21\(sd\|N, 74\(de\|2\(fm\|40\(sd\|W. +If +.I coord +is not one of the documented forms, the resulting behavior is unspecified. +.TP +.BI "\*-n " limit +When +.B \*-c +is used, display the closest +.I limit +locations (default 10). +.TP +.B "\*-\*-help" +Output help information and exit. +.TP +.B "\*-\*-version" +Output version information and exit. +.SH "ENVIRONMENT VARIABLES" +.TP +\f3AWK\fP +Name of a Posix-compliant +.I awk +program (default: +.BR awk ). +.TP +\f3TZDIR\fP +Name of the directory containing time zone data files (default: +.BR /usr/local/etc/zoneinfo ). +.SH FILES +.TP +\f2TZDIR\fP\f3/iso3166.tab\fP +Table of ISO 3166 2-letter country codes and country names. +.TP +\f2TZDIR\fP\f3/zone1970.tab\fP +Table of country codes, latitude and longitude, zone names, and +descriptive comments. +.TP +\f2TZDIR\fP\f3/\fP\f2TZ\fP +Time zone data file for time zone \f2TZ\fP. +.SH "EXIT STATUS" +The exit status is zero if a time zone was successfully obtained from the user, +nonzero otherwise. +.SH "SEE ALSO" +newctime(3), tzfile(5), zdump(8), zic(8) +.SH NOTES +Applications should not assume that +.BR tzselect 's +output matches the user's political preferences. +.\" This file is in the public domain, so clarified as of +.\" 2009-05-17 by Arthur David Olson. diff --git a/tz/tzselect.ksh b/tz/tzselect.ksh new file mode 100644 index 0000000..d2c3a6d --- /dev/null +++ b/tz/tzselect.ksh @@ -0,0 +1,559 @@ +#!/bin/bash + +PKGVERSION='(tzcode) ' +TZVERSION=see_Makefile +REPORT_BUGS_TO=tz@iana.org + +# Ask the user about the time zone, and output the resulting TZ value to stdout. +# Interact with the user via stderr and stdin. + +# Contributed by Paul Eggert. This file is in the public domain. + +# Porting notes: +# +# This script requires a Posix-like shell and prefers the extension of a +# 'select' statement. The 'select' statement was introduced in the +# Korn shell and is available in Bash and other shell implementations. +# If your host lacks both Bash and the Korn shell, you can get their +# source from one of these locations: +# +# Bash <http://www.gnu.org/software/bash/bash.html> +# Korn Shell <http://www.kornshell.com/> +# Public Domain Korn Shell <http://www.cs.mun.ca/~michael/pdksh/> +# +# For portability to Solaris 9 /bin/sh this script avoids some POSIX +# features and common extensions, such as $(...) (which works sometimes +# but not others), $((...)), and $10. +# +# This script also uses several features of modern awk programs. +# If your host lacks awk, or has an old awk that does not conform to Posix, +# you can use either of the following free programs instead: +# +# Gawk (GNU awk) <http://www.gnu.org/software/gawk/> +# mawk <http://invisible-island.net/mawk/> + + +# Specify default values for environment variables if they are unset. +: ${AWK=awk} +: ${TZDIR=`pwd`} + +# Output one argument as-is to standard output. +# Safer than 'echo', which can mishandle '\' or leading '-'. +say() { + printf '%s\n' "$1" +} + +# Check for awk Posix compliance. +($AWK -v x=y 'BEGIN { exit 123 }') </dev/null >/dev/null 2>&1 +[ $? = 123 ] || { + say >&2 "$0: Sorry, your '$AWK' program is not Posix compatible." + exit 1 +} + +coord= +location_limit=10 +zonetabtype=zone1970 + +usage="Usage: tzselect [--version] [--help] [-c COORD] [-n LIMIT] +Select a time zone interactively. + +Options: + + -c COORD + Instead of asking for continent and then country and then city, + ask for selection from time zones whose largest cities + are closest to the location with geographical coordinates COORD. + COORD should use ISO 6709 notation, for example, '-c +4852+00220' + for Paris (in degrees and minutes, North and East), or + '-c -35-058' for Buenos Aires (in degrees, South and West). + + -n LIMIT + Display at most LIMIT locations when -c is used (default $location_limit). + + --version + Output version information. + + --help + Output this help. + +Report bugs to $REPORT_BUGS_TO." + +# Ask the user to select from the function's arguments, +# and assign the selected argument to the variable 'select_result'. +# Exit on EOF or I/O error. Use the shell's 'select' builtin if available, +# falling back on a less-nice but portable substitute otherwise. +if + case $BASH_VERSION in + ?*) : ;; + '') + # '; exit' should be redundant, but Dash doesn't properly fail without it. + (eval 'set --; select x; do break; done; exit') </dev/null 2>/dev/null + esac +then + # Do this inside 'eval', as otherwise the shell might exit when parsing it + # even though it is never executed. + eval ' + doselect() { + select select_result + do + case $select_result in + "") echo >&2 "Please enter a number in range." ;; + ?*) break + esac + done || exit + } + + # Work around a bug in bash 1.14.7 and earlier, where $PS3 is sent to stdout. + case $BASH_VERSION in + [01].*) + case `echo 1 | (select x in x; do break; done) 2>/dev/null` in + ?*) PS3= + esac + esac + ' +else + doselect() { + # Field width of the prompt numbers. + select_width=`expr $# : '.*'` + + select_i= + + while : + do + case $select_i in + '') + select_i=0 + for select_word + do + select_i=`expr $select_i + 1` + printf >&2 "%${select_width}d) %s\\n" $select_i "$select_word" + done ;; + *[!0-9]*) + echo >&2 'Please enter a number in range.' ;; + *) + if test 1 -le $select_i && test $select_i -le $#; then + shift `expr $select_i - 1` + select_result=$1 + break + fi + echo >&2 'Please enter a number in range.' + esac + + # Prompt and read input. + printf >&2 %s "${PS3-#? }" + read select_i || exit + done + } +fi + +while getopts c:n:t:-: opt +do + case $opt$OPTARG in + c*) + coord=$OPTARG ;; + n*) + location_limit=$OPTARG ;; + t*) # Undocumented option, used for developer testing. + zonetabtype=$OPTARG ;; + -help) + exec echo "$usage" ;; + -version) + exec echo "tzselect $PKGVERSION$TZVERSION" ;; + -*) + say >&2 "$0: -$opt$OPTARG: unknown option; try '$0 --help'"; exit 1 ;; + *) + say >&2 "$0: try '$0 --help'"; exit 1 ;; + esac +done + +shift `expr $OPTIND - 1` +case $# in +0) ;; +*) say >&2 "$0: $1: unknown argument"; exit 1 ;; +esac + +# Make sure the tables are readable. +TZ_COUNTRY_TABLE=$TZDIR/iso3166.tab +TZ_ZONE_TABLE=$TZDIR/$zonetabtype.tab +for f in $TZ_COUNTRY_TABLE $TZ_ZONE_TABLE +do + <"$f" || { + say >&2 "$0: time zone files are not set up correctly" + exit 1 + } +done + +# If the current locale does not support UTF-8, convert data to current +# locale's format if possible, as the shell aligns columns better that way. +# Check the UTF-8 of U+12345 CUNEIFORM SIGN URU TIMES KI. +! $AWK 'BEGIN { u12345 = "\360\222\215\205"; exit length(u12345) != 1 }' && + { tmp=`(mktemp -d) 2>/dev/null` || { + tmp=${TMPDIR-/tmp}/tzselect.$$ && + (umask 77 && mkdir -- "$tmp") + };} && + trap 'status=$?; rm -fr -- "$tmp"; exit $status' 0 HUP INT PIPE TERM && + (iconv -f UTF-8 -t //TRANSLIT <"$TZ_COUNTRY_TABLE" >$tmp/iso3166.tab) \ + 2>/dev/null && + TZ_COUNTRY_TABLE=$tmp/iso3166.tab && + iconv -f UTF-8 -t //TRANSLIT <"$TZ_ZONE_TABLE" >$tmp/$zonetabtype.tab && + TZ_ZONE_TABLE=$tmp/$zonetabtype.tab + +newline=' +' +IFS=$newline + + +# Awk script to read a time zone table and output the same table, +# with each column preceded by its distance from 'here'. +output_distances=' + BEGIN { + FS = "\t" + while (getline <TZ_COUNTRY_TABLE) + if ($0 ~ /^[^#]/) + country[$1] = $2 + country["US"] = "US" # Otherwise the strings get too long. + } + function abs(x) { + return x < 0 ? -x : x; + } + function min(x, y) { + return x < y ? x : y; + } + function convert_coord(coord, deg, minute, ilen, sign, sec) { + if (coord ~ /^[-+]?[0-9]?[0-9][0-9][0-9][0-9][0-9][0-9]([^0-9]|$)/) { + degminsec = coord + intdeg = degminsec < 0 ? -int(-degminsec / 10000) : int(degminsec / 10000) + minsec = degminsec - intdeg * 10000 + intmin = minsec < 0 ? -int(-minsec / 100) : int(minsec / 100) + sec = minsec - intmin * 100 + deg = (intdeg * 3600 + intmin * 60 + sec) / 3600 + } else if (coord ~ /^[-+]?[0-9]?[0-9][0-9][0-9][0-9]([^0-9]|$)/) { + degmin = coord + intdeg = degmin < 0 ? -int(-degmin / 100) : int(degmin / 100) + minute = degmin - intdeg * 100 + deg = (intdeg * 60 + minute) / 60 + } else + deg = coord + return deg * 0.017453292519943296 + } + function convert_latitude(coord) { + match(coord, /..*[-+]/) + return convert_coord(substr(coord, 1, RLENGTH - 1)) + } + function convert_longitude(coord) { + match(coord, /..*[-+]/) + return convert_coord(substr(coord, RLENGTH)) + } + # Great-circle distance between points with given latitude and longitude. + # Inputs and output are in radians. This uses the great-circle special + # case of the Vicenty formula for distances on ellipsoids. + function gcdist(lat1, long1, lat2, long2, dlong, x, y, num, denom) { + dlong = long2 - long1 + x = cos(lat2) * sin(dlong) + y = cos(lat1) * sin(lat2) - sin(lat1) * cos(lat2) * cos(dlong) + num = sqrt(x * x + y * y) + denom = sin(lat1) * sin(lat2) + cos(lat1) * cos(lat2) * cos(dlong) + return atan2(num, denom) + } + # Parallel distance between points with given latitude and longitude. + # This is the product of the longitude difference and the cosine + # of the latitude of the point that is further from the equator. + # I.e., it considers longitudes to be further apart if they are + # nearer the equator. + function pardist(lat1, long1, lat2, long2) { + return abs(long1 - long2) * min(cos(lat1), cos(lat2)) + } + # The distance function is the sum of the great-circle distance and + # the parallel distance. It could be weighted. + function dist(lat1, long1, lat2, long2) { + return gcdist(lat1, long1, lat2, long2) + pardist(lat1, long1, lat2, long2) + } + BEGIN { + coord_lat = convert_latitude(coord) + coord_long = convert_longitude(coord) + } + /^[^#]/ { + here_lat = convert_latitude($2) + here_long = convert_longitude($2) + line = $1 "\t" $2 "\t" $3 + sep = "\t" + ncc = split($1, cc, /,/) + for (i = 1; i <= ncc; i++) { + line = line sep country[cc[i]] + sep = ", " + } + if (NF == 4) + line = line " - " $4 + printf "%g\t%s\n", dist(coord_lat, coord_long, here_lat, here_long), line + } +' + +# Begin the main loop. We come back here if the user wants to retry. +while + + echo >&2 'Please identify a location' \ + 'so that time zone rules can be set correctly.' + + continent= + country= + region= + + case $coord in + ?*) + continent=coord;; + '') + + # Ask the user for continent or ocean. + + echo >&2 'Please select a continent, ocean, "coord", or "TZ".' + + quoted_continents=` + $AWK ' + BEGIN { FS = "\t" } + /^[^#]/ { + entry = substr($3, 1, index($3, "/") - 1) + if (entry == "America") + entry = entry "s" + if (entry ~ /^(Arctic|Atlantic|Indian|Pacific)$/) + entry = entry " Ocean" + printf "'\''%s'\''\n", entry + } + ' <"$TZ_ZONE_TABLE" | + sort -u | + tr '\n' ' ' + echo '' + ` + + eval ' + doselect '"$quoted_continents"' \ + "coord - I want to use geographical coordinates." \ + "TZ - I want to specify the time zone using the Posix TZ format." + continent=$select_result + case $continent in + Americas) continent=America;; + *" "*) continent=`expr "$continent" : '\''\([^ ]*\)'\''` + esac + ' + esac + + case $continent in + TZ) + # Ask the user for a Posix TZ string. Check that it conforms. + while + echo >&2 'Please enter the desired value' \ + 'of the TZ environment variable.' + echo >&2 'For example, GST-10 is a zone named GST' \ + 'that is 10 hours ahead (east) of UTC.' + read TZ + $AWK -v TZ="$TZ" 'BEGIN { + tzname = "(<[[:alnum:]+-]{3,}>|[[:alpha:]]{3,})" + time = "(2[0-4]|[0-1]?[0-9])" \ + "(:[0-5][0-9](:[0-5][0-9])?)?" + offset = "[-+]?" time + mdate = "M([1-9]|1[0-2])\\.[1-5]\\.[0-6]" + jdate = "((J[1-9]|[0-9]|J?[1-9][0-9]" \ + "|J?[1-2][0-9][0-9])|J?3[0-5][0-9]|J?36[0-5])" + datetime = ",(" mdate "|" jdate ")(/" time ")?" + tzpattern = "^(:.*|" tzname offset "(" tzname \ + "(" offset ")?(" datetime datetime ")?)?)$" + if (TZ ~ tzpattern) exit 1 + exit 0 + }' + do + say >&2 "'$TZ' is not a conforming Posix time zone string." + done + TZ_for_date=$TZ;; + *) + case $continent in + coord) + case $coord in + '') + echo >&2 'Please enter coordinates' \ + 'in ISO 6709 notation.' + echo >&2 'For example, +4042-07403 stands for' + echo >&2 '40 degrees 42 minutes north,' \ + '74 degrees 3 minutes west.' + read coord;; + esac + distance_table=`$AWK \ + -v coord="$coord" \ + -v TZ_COUNTRY_TABLE="$TZ_COUNTRY_TABLE" \ + "$output_distances" <"$TZ_ZONE_TABLE" | + sort -n | + sed "${location_limit}q" + ` + regions=`say "$distance_table" | $AWK ' + BEGIN { FS = "\t" } + { print $NF } + '` + echo >&2 'Please select one of the following' \ + 'time zone regions,' + echo >&2 'listed roughly in increasing order' \ + "of distance from $coord". + doselect $regions + region=$select_result + TZ=`say "$distance_table" | $AWK -v region="$region" ' + BEGIN { FS="\t" } + $NF == region { print $4 } + '` + ;; + *) + # Get list of names of countries in the continent or ocean. + countries=`$AWK \ + -v continent="$continent" \ + -v TZ_COUNTRY_TABLE="$TZ_COUNTRY_TABLE" \ + ' + BEGIN { FS = "\t" } + /^#/ { next } + $3 ~ ("^" continent "/") { + ncc = split($1, cc, /,/) + for (i = 1; i <= ncc; i++) + if (!cc_seen[cc[i]]++) cc_list[++ccs] = cc[i] + } + END { + while (getline <TZ_COUNTRY_TABLE) { + if ($0 !~ /^#/) cc_name[$1] = $2 + } + for (i = 1; i <= ccs; i++) { + country = cc_list[i] + if (cc_name[country]) { + country = cc_name[country] + } + print country + } + } + ' <"$TZ_ZONE_TABLE" | sort -f` + + + # If there's more than one country, ask the user which one. + case $countries in + *"$newline"*) + echo >&2 'Please select a country' \ + 'whose clocks agree with yours.' + doselect $countries + country=$select_result;; + *) + country=$countries + esac + + + # Get list of names of time zone rule regions in the country. + regions=`$AWK \ + -v country="$country" \ + -v TZ_COUNTRY_TABLE="$TZ_COUNTRY_TABLE" \ + ' + BEGIN { + FS = "\t" + cc = country + while (getline <TZ_COUNTRY_TABLE) { + if ($0 !~ /^#/ && country == $2) { + cc = $1 + break + } + } + } + /^#/ { next } + $1 ~ cc { print $4 } + ' <"$TZ_ZONE_TABLE"` + + + # If there's more than one region, ask the user which one. + case $regions in + *"$newline"*) + echo >&2 'Please select one of the following' \ + 'time zone regions.' + doselect $regions + region=$select_result;; + *) + region=$regions + esac + + # Determine TZ from country and region. + TZ=`$AWK \ + -v country="$country" \ + -v region="$region" \ + -v TZ_COUNTRY_TABLE="$TZ_COUNTRY_TABLE" \ + ' + BEGIN { + FS = "\t" + cc = country + while (getline <TZ_COUNTRY_TABLE) { + if ($0 !~ /^#/ && country == $2) { + cc = $1 + break + } + } + } + /^#/ { next } + $1 ~ cc && $4 == region { print $3 } + ' <"$TZ_ZONE_TABLE"` + esac + + # Make sure the corresponding zoneinfo file exists. + TZ_for_date=$TZDIR/$TZ + <"$TZ_for_date" || { + say >&2 "$0: time zone files are not set up correctly" + exit 1 + } + esac + + + # Use the proposed TZ to output the current date relative to UTC. + # Loop until they agree in seconds. + # Give up after 8 unsuccessful tries. + + extra_info= + for i in 1 2 3 4 5 6 7 8 + do + TZdate=`LANG=C TZ="$TZ_for_date" date` + UTdate=`LANG=C TZ=UTC0 date` + TZsec=`expr "$TZdate" : '.*:\([0-5][0-9]\)'` + UTsec=`expr "$UTdate" : '.*:\([0-5][0-9]\)'` + case $TZsec in + $UTsec) + extra_info=" +Selected time is now: $TZdate. +Universal Time is now: $UTdate." + break + esac + done + + + # Output TZ info and ask the user to confirm. + + echo >&2 "" + echo >&2 "The following information has been given:" + echo >&2 "" + case $country%$region%$coord in + ?*%?*%) say >&2 " $country$newline $region";; + ?*%%) say >&2 " $country";; + %?*%?*) say >&2 " coord $coord$newline $region";; + %%?*) say >&2 " coord $coord";; + *) say >&2 " TZ='$TZ'" + esac + say >&2 "" + say >&2 "Therefore TZ='$TZ' will be used.$extra_info" + say >&2 "Is the above information OK?" + + doselect Yes No + ok=$select_result + case $ok in + Yes) break + esac +do coord= +done + +case $SHELL in +*csh) file=.login line="setenv TZ '$TZ'";; +*) file=.profile line="TZ='$TZ'; export TZ" +esac + +test -t 1 && say >&2 " +You can make this change permanent for yourself by appending the line + $line +to the file '$file' in your home directory; then log out and log in again. + +Here is that TZ value again, this time on standard output so that you +can use the $0 command in shell scripts:" + +say "$TZ" diff --git a/tz/workman.sh b/tz/workman.sh new file mode 100644 index 0000000..4b3b64a --- /dev/null +++ b/tz/workman.sh @@ -0,0 +1,32 @@ +#! /bin/sh + +# This file is in the public domain, so clarified as of +# 2009-05-17 by Arthur David Olson. + +# Tell groff not to emit SGR escape sequences (ANSI color escapes). +GROFF_NO_SGR=1 +export GROFF_NO_SGR + +echo ".am TH +.hy 0 +.na +.. +.rm }H +.rm }F" | nroff -man - ${1+"$@"} | perl -ne ' + binmode STDIN, '\'':encoding(utf8)'\''; + binmode STDOUT, '\'':encoding(utf8)'\''; + chomp; + s/.\010//g; + s/\s*$//; + if (/^$/) { + $sawblank = 1; + next; + } else { + if ($sawblank && $didprint) { + print "\n"; + $sawblank = 0; + } + print "$_\n"; + $didprint = 1; + } +' diff --git a/tz/yearistype.sh b/tz/yearistype.sh new file mode 100644 index 0000000..dfdcdf0 --- /dev/null +++ b/tz/yearistype.sh @@ -0,0 +1,38 @@ +#! /bin/sh + +: 'This file is in the public domain, so clarified as of' +: '2006-07-17 by Arthur David Olson.' + +case $#-$1 in + 2-|2-0*|2-*[!0-9]*) + echo "$0: wild year: $1" >&2 + exit 1 ;; +esac + +case $#-$2 in + 2-even) + case $1 in + *[24680]) exit 0 ;; + *) exit 1 ;; + esac ;; + 2-nonpres|2-nonuspres) + case $1 in + *[02468][048]|*[13579][26]) exit 1 ;; + *) exit 0 ;; + esac ;; + 2-odd) + case $1 in + *[13579]) exit 0 ;; + *) exit 1 ;; + esac ;; + 2-uspres) + case $1 in + *[02468][048]|*[13579][26]) exit 0 ;; + *) exit 1 ;; + esac ;; + 2-*) + echo "$0: wild type: $2" >&2 ;; +esac + +echo "$0: usage is $0 year even|odd|uspres|nonpres|nonuspres" >&2 +exit 1 diff --git a/tz/zdump.8 b/tz/zdump.8 new file mode 100644 index 0000000..db73f49 --- /dev/null +++ b/tz/zdump.8 @@ -0,0 +1,92 @@ +.TH ZDUMP 8 +.SH NAME +zdump \- time zone dumper +.SH SYNOPSIS +.B zdump +[ +.I option +\&... ] [ +.I zonename +\&... ] +.SH DESCRIPTION +.ie \n(.g .ds - \f(CW-\fP +.el ds - \- +.I Zdump +prints the current time in each +.I zonename +named on the command line. +.PP +These options are available: +.TP +.BI "\*-\*-version" +Output version information and exit. +.TP +.B \*-v +For each +.I zonename +on the command line, +print the time at the lowest possible time value, +the time one day after the lowest possible time value, +the times both one second before and exactly at +each detected time discontinuity, +the time at one day less than the highest possible time value, +and the time at the highest possible time value. +Each line is followed by +.BI isdst= D +where +.I D +is positive, zero, or negative depending on whether +the given time is daylight saving time, standard time, +or an unknown time type, respectively. +Each line is also followed by +.BI gmtoff= N +if the given local time is known to be +.I N +seconds east of Greenwich. +.TP +.B \*-V +Like +.BR \*-v , +except omit the times relative to the extreme time values. +This generates output that is easier to compare to that of +implementations with different time representations. +.TP +.BI "\*-c " [loyear,]hiyear +Cut off verbose output at the given year(s). +Cutoff times are computed using the proleptic Gregorian calendar with year 0 +and with Universal Time (UT) ignoring leap seconds. +The lower bound is exclusive and the upper is inclusive; for example, a +.I loyear +of 1970 excludes a transition occurring at 1970-01-01 00:00:00 UTC but a +.I hiyear +of 1970 includes the transition. +The default cutoff is +.BR \*-500,2500 . +.TP +.BI "\*-t " [lotime,]hitime +Cut off verbose output at the given time(s), +given in decimal seconds since 1970-01-01 00:00:00 +Coordinated Universal Time (UTC). +The +.I zonename +determines whether the count includes leap seconds. +As with +.BR \*-c , +the cutoff's lower bound is exclusive and its upper bound is inclusive. +.SH LIMITATIONS +Time discontinuities are found by sampling the results returned by localtime +at twelve-hour intervals. +This works in all real-world cases; +one can construct artificial time zones for which this fails. +.PP +In the output, "UT" denotes the value returned by +.IR gmtime (3), +which uses UTC for modern time stamps and some other UT flavor for +time stamps that predate the introduction of UTC. +No attempt is currently made to have the output use "UTC" for newer +and "UT" for older time stamps, +partly because the exact date of the introduction of UTC is problematic. +.SH "SEE ALSO" +newctime(3), tzfile(5), zic(8) +.\" This file is in the public domain, so clarified as of +.\" 2009-05-17 by Arthur David Olson. diff --git a/tz/zdump.c b/tz/zdump.c new file mode 100644 index 0000000..64d90f6 --- /dev/null +++ b/tz/zdump.c @@ -0,0 +1,1014 @@ +/* +** This file is in the public domain, so clarified as of +** 2009-05-17 by Arthur David Olson. +*/ + +#include "version.h" + +/* +** This code has been made independent of the rest of the time +** conversion package to increase confidence in the verification it provides. +** You can use this code to help in verifying other implementations. +** To do this, compile with -DUSE_LTZ=0 and link without the tz library. +*/ + +#ifndef NETBSD_INSPIRED +# define NETBSD_INSPIRED 1 +#endif +#ifndef USE_LTZ +# define USE_LTZ 1 +#endif + +#if USE_LTZ +# include "private.h" +#endif + +/* Enable tm_gmtoff and tm_zone on GNUish systems. */ +#define _GNU_SOURCE 1 +/* Enable strtoimax on Solaris 10. */ +#define __EXTENSIONS__ 1 + +#include "stdio.h" /* for stdout, stderr, perror */ +#include "string.h" /* for strcpy */ +#include "sys/types.h" /* for time_t */ +#include "time.h" /* for struct tm */ +#include "stdlib.h" /* for exit, malloc, atoi */ +#include "limits.h" /* for CHAR_BIT, LLONG_MAX */ +#include <errno.h> + +/* +** Substitutes for pre-C99 compilers. +** Much of this section of code is stolen from private.h. +*/ + +#ifndef HAVE_STDINT_H +# define HAVE_STDINT_H \ + (199901 <= __STDC_VERSION__ \ + || 2 < __GLIBC__ + (1 <= __GLIBC_MINOR__) \ + || __CYGWIN__) +#endif +#if HAVE_STDINT_H +# include "stdint.h" +#endif +#ifndef HAVE_INTTYPES_H +# define HAVE_INTTYPES_H HAVE_STDINT_H +#endif +#if HAVE_INTTYPES_H +# include <inttypes.h> +#endif + +#ifndef INT_FAST32_MAX +# if INT_MAX >> 31 == 0 +typedef long int_fast32_t; +# else +typedef int int_fast32_t; +# endif +#endif + +/* Pre-C99 GCC compilers define __LONG_LONG_MAX__ instead of LLONG_MAX. */ +#if !defined LLONG_MAX && defined __LONG_LONG_MAX__ +# define LLONG_MAX __LONG_LONG_MAX__ +#endif + +#ifndef INTMAX_MAX +# ifdef LLONG_MAX +typedef long long intmax_t; +# define strtoimax strtoll +# define INTMAX_MAX LLONG_MAX +# else +typedef long intmax_t; +# define strtoimax strtol +# define INTMAX_MAX LONG_MAX +# endif +#endif + +#ifndef PRIdMAX +# if INTMAX_MAX == LLONG_MAX +# define PRIdMAX "lld" +# else +# define PRIdMAX "ld" +# endif +#endif + +/* Infer TM_ZONE on systems where this information is known, but suppress + guessing if NO_TM_ZONE is defined. Similarly for TM_GMTOFF. */ +#if (defined __GLIBC__ \ + || defined __FreeBSD__ || defined __NetBSD__ || defined __OpenBSD__ \ + || (defined __APPLE__ && defined __MACH__)) +# if !defined TM_GMTOFF && !defined NO_TM_GMTOFF +# define TM_GMTOFF tm_gmtoff +# endif +# if !defined TM_ZONE && !defined NO_TM_ZONE +# define TM_ZONE tm_zone +# endif +#endif + +#ifndef HAVE_LOCALTIME_R +# define HAVE_LOCALTIME_R 1 +#endif + +#ifndef HAVE_LOCALTIME_RZ +# ifdef TM_ZONE +# define HAVE_LOCALTIME_RZ (NETBSD_INSPIRED && USE_LTZ) +# else +# define HAVE_LOCALTIME_RZ 0 +# endif +#endif + +#ifndef HAVE_TZSET +# define HAVE_TZSET 1 +#endif + +#ifndef ZDUMP_LO_YEAR +#define ZDUMP_LO_YEAR (-500) +#endif /* !defined ZDUMP_LO_YEAR */ + +#ifndef ZDUMP_HI_YEAR +#define ZDUMP_HI_YEAR 2500 +#endif /* !defined ZDUMP_HI_YEAR */ + +#ifndef MAX_STRING_LENGTH +#define MAX_STRING_LENGTH 1024 +#endif /* !defined MAX_STRING_LENGTH */ + +#if __STDC_VERSION__ < 199901 +# define true 1 +# define false 0 +# define bool int +#else +# include <stdbool.h> +#endif + +#ifndef EXIT_SUCCESS +#define EXIT_SUCCESS 0 +#endif /* !defined EXIT_SUCCESS */ + +#ifndef EXIT_FAILURE +#define EXIT_FAILURE 1 +#endif /* !defined EXIT_FAILURE */ + +#ifndef SECSPERMIN +#define SECSPERMIN 60 +#endif /* !defined SECSPERMIN */ + +#ifndef MINSPERHOUR +#define MINSPERHOUR 60 +#endif /* !defined MINSPERHOUR */ + +#ifndef SECSPERHOUR +#define SECSPERHOUR (SECSPERMIN * MINSPERHOUR) +#endif /* !defined SECSPERHOUR */ + +#ifndef HOURSPERDAY +#define HOURSPERDAY 24 +#endif /* !defined HOURSPERDAY */ + +#ifndef EPOCH_YEAR +#define EPOCH_YEAR 1970 +#endif /* !defined EPOCH_YEAR */ + +#ifndef TM_YEAR_BASE +#define TM_YEAR_BASE 1900 +#endif /* !defined TM_YEAR_BASE */ + +#ifndef DAYSPERNYEAR +#define DAYSPERNYEAR 365 +#endif /* !defined DAYSPERNYEAR */ + +#ifndef isleap +#define isleap(y) (((y) % 4) == 0 && (((y) % 100) != 0 || ((y) % 400) == 0)) +#endif /* !defined isleap */ + +#ifndef isleap_sum +/* +** See tzfile.h for details on isleap_sum. +*/ +#define isleap_sum(a, b) isleap((a) % 400 + (b) % 400) +#endif /* !defined isleap_sum */ + +#define SECSPERDAY ((int_fast32_t) SECSPERHOUR * HOURSPERDAY) +#define SECSPERNYEAR (SECSPERDAY * DAYSPERNYEAR) +#define SECSPERLYEAR (SECSPERNYEAR + SECSPERDAY) +#define SECSPER400YEARS (SECSPERNYEAR * (intmax_t) (300 + 3) \ + + SECSPERLYEAR * (intmax_t) (100 - 3)) + +/* +** True if SECSPER400YEARS is known to be representable as an +** intmax_t. It's OK that SECSPER400YEARS_FITS can in theory be false +** even if SECSPER400YEARS is representable, because when that happens +** the code merely runs a bit more slowly, and this slowness doesn't +** occur on any practical platform. +*/ +enum { SECSPER400YEARS_FITS = SECSPERLYEAR <= INTMAX_MAX / 400 }; + +#ifndef HAVE_GETTEXT +#define HAVE_GETTEXT 0 +#endif +#if HAVE_GETTEXT +#include "locale.h" /* for setlocale */ +#include "libintl.h" +#endif /* HAVE_GETTEXT */ + +#if 2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__) +# define ATTRIBUTE_PURE __attribute__ ((__pure__)) +#else +# define ATTRIBUTE_PURE /* empty */ +#endif + +/* +** For the benefit of GNU folk... +** '_(MSGID)' uses the current locale's message library string for MSGID. +** The default is to use gettext if available, and use MSGID otherwise. +*/ + +#ifndef _ +#if HAVE_GETTEXT +#define _(msgid) gettext(msgid) +#else /* !HAVE_GETTEXT */ +#define _(msgid) msgid +#endif /* !HAVE_GETTEXT */ +#endif /* !defined _ */ + +#if !defined TZ_DOMAIN && defined HAVE_GETTEXT +# define TZ_DOMAIN "tz" +#endif + +#if ! HAVE_LOCALTIME_RZ +# undef timezone_t +# define timezone_t char ** +#endif + +#if !HAVE_POSIX_DECLS +extern char ** environ; +extern int getopt(int argc, char * const argv[], + const char * options); +extern char * optarg; +extern int optind; +extern char * tzname[]; +#endif + +/* The minimum and maximum finite time values. */ +enum { atime_shift = CHAR_BIT * sizeof (time_t) - 2 }; +static time_t const absolute_min_time = + ((time_t) -1 < 0 + ? (- ((time_t) ~ (time_t) 0 < 0) + - (((time_t) 1 << atime_shift) - 1 + ((time_t) 1 << atime_shift))) + : 0); +static time_t const absolute_max_time = + ((time_t) -1 < 0 + ? (((time_t) 1 << atime_shift) - 1 + ((time_t) 1 << atime_shift)) + : -1); +static int longest; +static char * progname; +static bool warned; +static bool errout; + +static char const *abbr(struct tm const *); +static intmax_t delta(struct tm *, struct tm *) ATTRIBUTE_PURE; +static void dumptime(struct tm const *); +static time_t hunt(timezone_t, char *, time_t, time_t); +static void show(timezone_t, char *, time_t, bool); +static const char *tformat(void); +static time_t yeartot(intmax_t) ATTRIBUTE_PURE; + +/* Unlike <ctype.h>'s isdigit, this also works if c < 0 | c > UCHAR_MAX. */ +#define is_digit(c) ((unsigned)(c) - '0' <= 9) + +/* Is A an alphabetic character in the C locale? */ +static bool +is_alpha(char a) +{ + switch (a) { + default: + return false; + case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': case 'G': + case 'H': case 'I': case 'J': case 'K': case 'L': case 'M': case 'N': + case 'O': case 'P': case 'Q': case 'R': case 'S': case 'T': case 'U': + case 'V': case 'W': case 'X': case 'Y': case 'Z': + case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': case 'g': + case 'h': case 'i': case 'j': case 'k': case 'l': case 'm': case 'n': + case 'o': case 'p': case 'q': case 'r': case 's': case 't': case 'u': + case 'v': case 'w': case 'x': case 'y': case 'z': + return true; + } +} + +/* Return A + B, exiting if the result would overflow. */ +static size_t +sumsize(size_t a, size_t b) +{ + size_t sum = a + b; + if (sum < a) { + fprintf(stderr, "%s: size overflow\n", progname); + exit(EXIT_FAILURE); + } + return sum; +} + +#if ! HAVE_TZSET +# undef tzset +# define tzset zdump_tzset +static void tzset(void) { } +#endif + +/* Assume gmtime_r works if localtime_r does. + A replacement localtime_r is defined below if needed. */ +#if ! HAVE_LOCALTIME_R + +# undef gmtime_r +# define gmtime_r zdump_gmtime_r + +static struct tm * +gmtime_r(time_t *tp, struct tm *tmp) +{ + struct tm *r = gmtime(tp); + if (r) { + *tmp = *r; + r = tmp; + } + return r; +} + +#endif + +/* Platforms with TM_ZONE don't need tzname, so they can use the + faster localtime_rz or localtime_r if available. */ + +#if defined TM_ZONE && HAVE_LOCALTIME_RZ +# define USE_LOCALTIME_RZ true +#else +# define USE_LOCALTIME_RZ false +#endif + +#if ! USE_LOCALTIME_RZ + +# if !defined TM_ZONE || ! HAVE_LOCALTIME_R || ! HAVE_TZSET +# undef localtime_r +# define localtime_r zdump_localtime_r +static struct tm * +localtime_r(time_t *tp, struct tm *tmp) +{ + struct tm *r = localtime(tp); + if (r) { + *tmp = *r; + r = tmp; + } + return r; +} +# endif + +# undef localtime_rz +# define localtime_rz zdump_localtime_rz +static struct tm * +localtime_rz(timezone_t rz, time_t *tp, struct tm *tmp) +{ + return localtime_r(tp, tmp); +} + +# ifdef TYPECHECK +# undef mktime_z +# define mktime_z zdump_mktime_z +static time_t +mktime_z(timezone_t tz, struct tm *tmp) +{ + return mktime(tmp); +} +# endif + +# undef tzalloc +# undef tzfree +# define tzalloc zdump_tzalloc +# define tzfree zdump_tzfree + +static timezone_t +tzalloc(char const *val) +{ + static char **fakeenv; + char **env = fakeenv; + char *env0; + if (! env) { + char **e = environ; + int to; + + while (*e++) + continue; + env = malloc(sumsize(sizeof *environ, + (e - environ) * sizeof *environ)); + if (! env) { + perror(progname); + exit(EXIT_FAILURE); + } + to = 1; + for (e = environ; (env[to] = *e); e++) + to += strncmp(*e, "TZ=", 3) != 0; + } + env0 = malloc(sumsize(sizeof "TZ=", strlen(val))); + if (! env0) { + perror(progname); + exit(EXIT_FAILURE); + } + env[0] = strcat(strcpy(env0, "TZ="), val); + environ = fakeenv = env; + tzset(); + return env; +} + +static void +tzfree(timezone_t env) +{ + environ = env + 1; + free(env[0]); +} +#endif /* ! USE_LOCALTIME_RZ */ + +/* A UTC time zone, and its initializer. */ +static timezone_t gmtz; +static void +gmtzinit(void) +{ + if (USE_LOCALTIME_RZ) { + static char const utc[] = "UTC0"; + gmtz = tzalloc(utc); + if (!gmtz) { + perror(utc); + exit(EXIT_FAILURE); + } + } +} + +/* Convert *TP to UTC, storing the broken-down time into *TMP. + Return TMP if successful, NULL otherwise. This is like gmtime_r(TP, TMP), + except typically faster if USE_LOCALTIME_RZ. */ +static struct tm * +my_gmtime_r(time_t *tp, struct tm *tmp) +{ + return USE_LOCALTIME_RZ ? localtime_rz(gmtz, tp, tmp) : gmtime_r(tp, tmp); +} + +#ifndef TYPECHECK +# define my_localtime_rz localtime_rz +#else /* !defined TYPECHECK */ + +static struct tm * +my_localtime_rz(timezone_t tz, time_t *tp, struct tm *tmp) +{ + tmp = localtime_rz(tz, tp, tmp); + if (tmp) { + struct tm tm; + register time_t t; + + tm = *tmp; + t = mktime_z(tz, &tm); + if (t != *tp) { + fflush(stdout); + fprintf(stderr, "\n%s: ", progname); + fprintf(stderr, tformat(), *tp); + fprintf(stderr, " ->"); + fprintf(stderr, " year=%d", tmp->tm_year); + fprintf(stderr, " mon=%d", tmp->tm_mon); + fprintf(stderr, " mday=%d", tmp->tm_mday); + fprintf(stderr, " hour=%d", tmp->tm_hour); + fprintf(stderr, " min=%d", tmp->tm_min); + fprintf(stderr, " sec=%d", tmp->tm_sec); + fprintf(stderr, " isdst=%d", tmp->tm_isdst); + fprintf(stderr, " -> "); + fprintf(stderr, tformat(), t); + fprintf(stderr, "\n"); + errout = true; + } + } + return tmp; +} +#endif /* !defined TYPECHECK */ + +static void +abbrok(const char *const abbrp, const char *const zone) +{ + register const char * cp; + register const char * wp; + + if (warned) + return; + cp = abbrp; + while (is_alpha(*cp) || is_digit(*cp) || *cp == '-' || *cp == '+') + ++cp; + if (cp - abbrp < 3) + wp = _("has fewer than 3 characters"); + else if (cp - abbrp > 6) + wp = _("has more than 6 characters"); + else if (*cp) + wp = _("has characters other than ASCII alphanumerics, '-' or '+'"); + else + return; + fflush(stdout); + fprintf(stderr, + _("%s: warning: zone \"%s\" abbreviation \"%s\" %s\n"), + progname, zone, abbrp, wp); + warned = errout = true; +} + +/* Return a time zone abbreviation. If the abbreviation needs to be + saved, use *BUF (of size *BUFALLOC) to save it, and return the + abbreviation in the possibly-reallocated *BUF. Otherwise, just + return the abbreviation. Get the abbreviation from TMP. + Exit on memory allocation failure. */ +static char const * +saveabbr(char **buf, size_t *bufalloc, struct tm const *tmp) +{ + char const *ab = abbr(tmp); + if (HAVE_LOCALTIME_RZ) + return ab; + else { + size_t ablen = strlen(ab); + if (*bufalloc <= ablen) { + free(*buf); + + /* Make the new buffer at least twice as long as the old, + to avoid O(N**2) behavior on repeated calls. */ + *bufalloc = sumsize(*bufalloc, ablen + 1); + + *buf = malloc(*bufalloc); + if (! *buf) { + perror(progname); + exit(EXIT_FAILURE); + } + } + return strcpy(*buf, ab); + } +} + +static void +close_file(FILE *stream) +{ + char const *e = (ferror(stream) ? _("I/O error") + : fclose(stream) != 0 ? strerror(errno) : NULL); + if (e) { + fprintf(stderr, "%s: %s\n", progname, e); + exit(EXIT_FAILURE); + } +} + +static void +usage(FILE * const stream, const int status) +{ + fprintf(stream, +_("%s: usage: %s [--version] [--help] [-{vV}] [-{ct} [lo,]hi] zonename ...\n" + "\n" + "Report bugs to %s.\n"), + progname, progname, REPORT_BUGS_TO); + if (status == EXIT_SUCCESS) + close_file(stream); + exit(status); +} + +int +main(int argc, char *argv[]) +{ + /* These are static so that they're initially zero. */ + static char * abbrev; + static size_t abbrevsize; + static struct tm newtm; + + register int i; + register bool vflag; + register bool Vflag; + register char * cutarg; + register char * cuttimes; + register time_t cutlotime; + register time_t cuthitime; + time_t now; + time_t t; + time_t newt; + struct tm tm; + register struct tm * tmp; + register struct tm * newtmp; + + cutlotime = absolute_min_time; + cuthitime = absolute_max_time; +#if HAVE_GETTEXT + setlocale(LC_ALL, ""); +#ifdef TZ_DOMAINDIR + bindtextdomain(TZ_DOMAIN, TZ_DOMAINDIR); +#endif /* defined TEXTDOMAINDIR */ + textdomain(TZ_DOMAIN); +#endif /* HAVE_GETTEXT */ + progname = argv[0]; + for (i = 1; i < argc; ++i) + if (strcmp(argv[i], "--version") == 0) { + printf("zdump %s%s\n", PKGVERSION, TZVERSION); + return EXIT_SUCCESS; + } else if (strcmp(argv[i], "--help") == 0) { + usage(stdout, EXIT_SUCCESS); + } + vflag = Vflag = false; + cutarg = cuttimes = NULL; + for (;;) + switch (getopt(argc, argv, "c:t:vV")) { + case 'c': cutarg = optarg; break; + case 't': cuttimes = optarg; break; + case 'v': vflag = true; break; + case 'V': Vflag = true; break; + case -1: + if (! (optind == argc - 1 && strcmp(argv[optind], "=") == 0)) + goto arg_processing_done; + /* Fall through. */ + default: + usage(stderr, EXIT_FAILURE); + } + arg_processing_done:; + + if (vflag | Vflag) { + intmax_t lo; + intmax_t hi; + char *loend, *hiend; + register intmax_t cutloyear = ZDUMP_LO_YEAR; + register intmax_t cuthiyear = ZDUMP_HI_YEAR; + if (cutarg != NULL) { + lo = strtoimax(cutarg, &loend, 10); + if (cutarg != loend && !*loend) { + hi = lo; + cuthiyear = hi; + } else if (cutarg != loend && *loend == ',' + && (hi = strtoimax(loend + 1, &hiend, 10), + loend + 1 != hiend && !*hiend)) { + cutloyear = lo; + cuthiyear = hi; + } else { + fprintf(stderr, _("%s: wild -c argument %s\n"), + progname, cutarg); + return EXIT_FAILURE; + } + } + if (cutarg != NULL || cuttimes == NULL) { + cutlotime = yeartot(cutloyear); + cuthitime = yeartot(cuthiyear); + } + if (cuttimes != NULL) { + lo = strtoimax(cuttimes, &loend, 10); + if (cuttimes != loend && !*loend) { + hi = lo; + if (hi < cuthitime) { + if (hi < absolute_min_time) + hi = absolute_min_time; + cuthitime = hi; + } + } else if (cuttimes != loend && *loend == ',' + && (hi = strtoimax(loend + 1, &hiend, 10), + loend + 1 != hiend && !*hiend)) { + if (cutlotime < lo) { + if (absolute_max_time < lo) + lo = absolute_max_time; + cutlotime = lo; + } + if (hi < cuthitime) { + if (hi < absolute_min_time) + hi = absolute_min_time; + cuthitime = hi; + } + } else { + fprintf(stderr, + _("%s: wild -t argument %s\n"), + progname, cuttimes); + return EXIT_FAILURE; + } + } + } + gmtzinit(); + now = time(NULL); + longest = 0; + for (i = optind; i < argc; i++) { + size_t arglen = strlen(argv[i]); + if (longest < arglen) + longest = arglen < INT_MAX ? arglen : INT_MAX; + } + + for (i = optind; i < argc; ++i) { + timezone_t tz = tzalloc(argv[i]); + char const *ab; + if (!tz) { + perror(argv[i]); + return EXIT_FAILURE; + } + if (! (vflag | Vflag)) { + show(tz, argv[i], now, false); + tzfree(tz); + continue; + } + warned = false; + t = absolute_min_time; + if (!Vflag) { + show(tz, argv[i], t, true); + t += SECSPERDAY; + show(tz, argv[i], t, true); + } + if (t < cutlotime) + t = cutlotime; + tmp = my_localtime_rz(tz, &t, &tm); + if (tmp) + ab = saveabbr(&abbrev, &abbrevsize, &tm); + while (t < cuthitime) { + newt = ((t < absolute_max_time - SECSPERDAY / 2 + && t + SECSPERDAY / 2 < cuthitime) + ? t + SECSPERDAY / 2 + : cuthitime); + newtmp = localtime_rz(tz, &newt, &newtm); + if ((tmp == NULL || newtmp == NULL) ? (tmp != newtmp) : + (delta(&newtm, &tm) != (newt - t) || + newtm.tm_isdst != tm.tm_isdst || + strcmp(abbr(&newtm), ab) != 0)) { + newt = hunt(tz, argv[i], t, newt); + newtmp = localtime_rz(tz, &newt, &newtm); + if (newtmp) + ab = saveabbr(&abbrev, &abbrevsize, + &newtm); + } + t = newt; + tm = newtm; + tmp = newtmp; + } + if (!Vflag) { + t = absolute_max_time; + t -= SECSPERDAY; + show(tz, argv[i], t, true); + t += SECSPERDAY; + show(tz, argv[i], t, true); + } + tzfree(tz); + } + close_file(stdout); + if (errout && (ferror(stderr) || fclose(stderr) != 0)) + return EXIT_FAILURE; + return EXIT_SUCCESS; +} + +static time_t +yeartot(intmax_t y) +{ + register intmax_t myy, seconds, years; + register time_t t; + + myy = EPOCH_YEAR; + t = 0; + while (myy < y) { + if (SECSPER400YEARS_FITS && 400 <= y - myy) { + intmax_t diff400 = (y - myy) / 400; + if (INTMAX_MAX / SECSPER400YEARS < diff400) + return absolute_max_time; + seconds = diff400 * SECSPER400YEARS; + years = diff400 * 400; + } else { + seconds = isleap(myy) ? SECSPERLYEAR : SECSPERNYEAR; + years = 1; + } + myy += years; + if (t > absolute_max_time - seconds) + return absolute_max_time; + t += seconds; + } + while (y < myy) { + if (SECSPER400YEARS_FITS && y + 400 <= myy && myy < 0) { + intmax_t diff400 = (myy - y) / 400; + if (INTMAX_MAX / SECSPER400YEARS < diff400) + return absolute_min_time; + seconds = diff400 * SECSPER400YEARS; + years = diff400 * 400; + } else { + seconds = isleap(myy - 1) ? SECSPERLYEAR : SECSPERNYEAR; + years = 1; + } + myy -= years; + if (t < absolute_min_time + seconds) + return absolute_min_time; + t -= seconds; + } + return t; +} + +static time_t +hunt(timezone_t tz, char *name, time_t lot, time_t hit) +{ + static char * loab; + static size_t loabsize; + char const * ab; + time_t t; + struct tm lotm; + register struct tm * lotmp; + struct tm tm; + register struct tm * tmp; + + lotmp = my_localtime_rz(tz, &lot, &lotm); + if (lotmp) + ab = saveabbr(&loab, &loabsize, &lotm); + for ( ; ; ) { + time_t diff = hit - lot; + if (diff < 2) + break; + t = lot; + t += diff / 2; + if (t <= lot) + ++t; + else if (t >= hit) + --t; + tmp = my_localtime_rz(tz, &t, &tm); + if ((lotmp == NULL || tmp == NULL) ? (lotmp == tmp) : + (delta(&tm, &lotm) == (t - lot) && + tm.tm_isdst == lotm.tm_isdst && + strcmp(abbr(&tm), ab) == 0)) { + lot = t; + lotm = tm; + lotmp = tmp; + } else hit = t; + } + show(tz, name, lot, true); + show(tz, name, hit, true); + return hit; +} + +/* +** Thanks to Paul Eggert for logic used in delta. +*/ + +static intmax_t +delta(struct tm * newp, struct tm *oldp) +{ + register intmax_t result; + register int tmy; + + if (newp->tm_year < oldp->tm_year) + return -delta(oldp, newp); + result = 0; + for (tmy = oldp->tm_year; tmy < newp->tm_year; ++tmy) + result += DAYSPERNYEAR + isleap_sum(tmy, TM_YEAR_BASE); + result += newp->tm_yday - oldp->tm_yday; + result *= HOURSPERDAY; + result += newp->tm_hour - oldp->tm_hour; + result *= MINSPERHOUR; + result += newp->tm_min - oldp->tm_min; + result *= SECSPERMIN; + result += newp->tm_sec - oldp->tm_sec; + return result; +} + +#ifndef TM_GMTOFF +/* Return A->tm_yday, adjusted to compare it fairly to B->tm_yday. + Assume A and B differ by at most one year. */ +static int +adjusted_yday(struct tm const *a, struct tm const *b) +{ + int yday = a->tm_yday; + if (b->tm_year < a->tm_year) + yday += 365 + isleap_sum(b->tm_year, TM_YEAR_BASE); + return yday; +} +#endif + +/* If A is the broken-down local time and B the broken-down UTC for + the same instant, return A's UTC offset in seconds, where positive + offsets are east of Greenwich. On failure, return LONG_MIN. */ +static long +gmtoff(struct tm const *a, struct tm const *b) +{ +#ifdef TM_GMTOFF + return a->TM_GMTOFF; +#else + if (! b) + return LONG_MIN; + else { + int ayday = adjusted_yday(a, b); + int byday = adjusted_yday(b, a); + int days = ayday - byday; + long hours = a->tm_hour - b->tm_hour + 24 * days; + long minutes = a->tm_min - b->tm_min + 60 * hours; + long seconds = a->tm_sec - b->tm_sec + 60 * minutes; + return seconds; + } +#endif +} + +static void +show(timezone_t tz, char *zone, time_t t, bool v) +{ + register struct tm * tmp; + register struct tm * gmtmp; + struct tm tm, gmtm; + + printf("%-*s ", longest, zone); + if (v) { + gmtmp = my_gmtime_r(&t, &gmtm); + if (gmtmp == NULL) { + printf(tformat(), t); + } else { + dumptime(gmtmp); + printf(" UT"); + } + printf(" = "); + } + tmp = my_localtime_rz(tz, &t, &tm); + dumptime(tmp); + if (tmp != NULL) { + if (*abbr(tmp) != '\0') + printf(" %s", abbr(tmp)); + if (v) { + long off = gmtoff(tmp, gmtmp); + printf(" isdst=%d", tmp->tm_isdst); + if (off != LONG_MIN) + printf(" gmtoff=%ld", off); + } + } + printf("\n"); + if (tmp != NULL && *abbr(tmp) != '\0') + abbrok(abbr(tmp), zone); +} + +static char const * +abbr(struct tm const *tmp) +{ +#ifdef TM_ZONE + return tmp->TM_ZONE; +#else + return (0 <= tmp->tm_isdst && tzname[0 < tmp->tm_isdst] + ? tzname[0 < tmp->tm_isdst] + : ""); +#endif +} + +/* +** The code below can fail on certain theoretical systems; +** it works on all known real-world systems as of 2004-12-30. +*/ + +static const char * +tformat(void) +{ + if (0 > (time_t) -1) { /* signed */ + if (sizeof (time_t) == sizeof (intmax_t)) + return "%"PRIdMAX; + if (sizeof (time_t) > sizeof (long)) + return "%lld"; + if (sizeof (time_t) > sizeof (int)) + return "%ld"; + return "%d"; + } +#ifdef PRIuMAX + if (sizeof (time_t) == sizeof (uintmax_t)) + return "%"PRIuMAX; +#endif + if (sizeof (time_t) > sizeof (unsigned long)) + return "%llu"; + if (sizeof (time_t) > sizeof (unsigned int)) + return "%lu"; + return "%u"; +} + +static void +dumptime(register const struct tm *timeptr) +{ + static const char wday_name[][3] = { + "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" + }; + static const char mon_name[][3] = { + "Jan", "Feb", "Mar", "Apr", "May", "Jun", + "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" + }; + register const char * wn; + register const char * mn; + register int lead; + register int trail; + + if (timeptr == NULL) { + printf("NULL"); + return; + } + /* + ** The packaged localtime_rz and gmtime_r never put out-of-range + ** values in tm_wday or tm_mon, but since this code might be compiled + ** with other (perhaps experimental) versions, paranoia is in order. + */ + if (timeptr->tm_wday < 0 || timeptr->tm_wday >= + (int) (sizeof wday_name / sizeof wday_name[0])) + wn = "???"; + else wn = wday_name[timeptr->tm_wday]; + if (timeptr->tm_mon < 0 || timeptr->tm_mon >= + (int) (sizeof mon_name / sizeof mon_name[0])) + mn = "???"; + else mn = mon_name[timeptr->tm_mon]; + printf("%.3s %.3s%3d %.2d:%.2d:%.2d ", + wn, mn, + timeptr->tm_mday, timeptr->tm_hour, + timeptr->tm_min, timeptr->tm_sec); +#define DIVISOR 10 + trail = timeptr->tm_year % DIVISOR + TM_YEAR_BASE % DIVISOR; + lead = timeptr->tm_year / DIVISOR + TM_YEAR_BASE / DIVISOR + + trail / DIVISOR; + trail %= DIVISOR; + if (trail < 0 && lead > 0) { + trail += DIVISOR; + --lead; + } else if (lead < 0 && trail > 0) { + trail -= DIVISOR; + ++lead; + } + if (lead == 0) + printf("%d", trail); + else printf("%d%d", lead, ((trail < 0) ? -trail : trail)); +} diff --git a/tz/zic.8 b/tz/zic.8 new file mode 100644 index 0000000..e5e71f5 --- /dev/null +++ b/tz/zic.8 @@ -0,0 +1,568 @@ +.TH ZIC 8 +.SH NAME +zic \- time zone compiler +.SH SYNOPSIS +.B zic +[ +.I option +\&... ] [ +.I filename +\&... ] +.SH DESCRIPTION +.ie '\(lq'' .ds lq \&"\" +.el .ds lq \(lq\" +.ie '\(rq'' .ds rq \&"\" +.el .ds rq \(rq\" +.de q +\\$3\*(lq\\$1\*(rq\\$2 +.. +.ie '\(la'' .ds < < +.el .ds < \(la +.ie '\(ra'' .ds > > +.el .ds > \(ra +.ie \n(.g \{\ +. ds : \: +. ds - \f(CW-\fP +.\} +.el \{\ +. ds : +. ds - \- +.\} +.I Zic +reads text from the file(s) named on the command line +and creates the time conversion information files specified in this input. +If a +.I filename +is +.q "\*-" , +the standard input is read. +.PP +These options are available: +.TP +.BI "\*-\*-version" +Output version information and exit. +.TP +.BI "\*-d " directory +Create time conversion information files in the named directory rather than +in the standard directory named below. +.TP +.BI "\*-l " timezone +Use the given time zone as local time. +.I Zic +will act as if the input contained a link line of the form +.sp +.ti +.5i +Link \fItimezone\fP localtime +.TP +.BI "\*-p " timezone +Use the given time zone's rules when handling POSIX-format +time zone environment variables. +.I Zic +will act as if the input contained a link line of the form +.sp +.ti +.5i +Link \fItimezone\fP posixrules +.TP +.BI "\*-L " leapsecondfilename +Read leap second information from the file with the given name. +If this option is not used, +no leap second information appears in output files. +.TP +.B \*-v +Be more verbose, and complain about the following situations: +.RS +.PP +The input specifies a link to a link. +.PP +A year that appears in a data file is outside the range +of years representable by +.IR time (2) +values. +.PP +A time of 24:00 or more appears in the input. +Pre-1998 versions of +.I zic +prohibit 24:00, and pre-2007 versions prohibit times greater than 24:00. +.PP +A rule goes past the start or end of the month. +Pre-2004 versions of +.I zic +prohibit this. +.PP +The output file does not contain all the information about the +long-term future of a zone, because the future cannot be summarized as +an extended POSIX TZ string. For example, as of 2013 this problem +occurs for Iran's daylight-saving rules for the predicted future, as +these rules are based on the Iranian calendar, which cannot be +represented. +.PP +The output contains data that may not be handled properly by client +code designed for older +.I zic +output formats. These compatibility issues affect only time stamps +before 1970 or after the start of 2038. +.PP +A time zone abbreviation has fewer than 3 characters. +POSIX requires at least 3. +.PP +An output file name contains a byte that is not an ASCII letter, +.q "\*-" , +.q "/" , +or +.q "_" ; +or it contains a file name component that contains more than 14 bytes +or that starts with +.q "\*-" . +.RE +.TP +.B \*-s +Limit time values stored in output files to values that are the same +whether they're taken to be signed or unsigned. +You can use this option to generate SVVS-compatible files. +.PP +Input files should be text files, that is, they should be a series of +zero or more lines, each ending in a newline byte and containing at +most 511 bytes, and without any NUL bytes. The input text's encoding +is typically UTF-8 or ASCII; it should have a unibyte representation +for the POSIX Portable Character Set (PPCS) +\*<http://pubs\*:.opengroup\*:.org/\*:onlinepubs/\*:9699919799/\*:basedefs/\*:V1_chap06\*:.html\*> +and the encoding's non-unibyte characters should consist entirely of +non-PPCS bytes. Non-PPCS characters typically occur only in comments: +although output file names and time zone abbreviations can contain +nearly any character, other software will work better if these are +limited to the restricted syntax described under the +.B \*-v +option. +.PP +Input lines are made up of fields. +Fields are separated from one another by one or more white space characters. +The white space characters are space, form feed, carriage return, newline, +tab, and vertical tab. +Leading and trailing white space on input lines is ignored. +An unquoted sharp character (#) in the input introduces a comment which extends +to the end of the line the sharp character appears on. +White space characters and sharp characters may be enclosed in double quotes +(") if they're to be used as part of a field. +Any line that is blank (after comment stripping) is ignored. +Non-blank lines are expected to be of one of three types: +rule lines, zone lines, and link lines. +.PP +Names (such as month names) must be in English and are case insensitive. +Abbreviations, if used, must be unambiguous in context. +.PP +A rule line has the form +.nf +.ti +.5i +.ta \w'Rule\0\0'u +\w'NAME\0\0'u +\w'FROM\0\0'u +\w'1973\0\0'u +\w'TYPE\0\0'u +\w'Apr\0\0'u +\w'lastSun\0\0'u +\w'2:00\0\0'u +\w'SAVE\0\0'u +.sp +Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +.sp +For example: +.ti +.5i +.sp +Rule US 1967 1973 \*- Apr lastSun 2:00 1:00 D +.sp +.fi +The fields that make up a rule line are: +.TP "\w'LETTER/S'u" +.B NAME +Gives the (arbitrary) name of the set of rules this rule is part of. +.TP +.B FROM +Gives the first year in which the rule applies. +Any integer year can be supplied; the proleptic Gregorian calendar is assumed. +The word +.B minimum +(or an abbreviation) means the minimum year representable as an integer. +The word +.B maximum +(or an abbreviation) means the maximum year representable as an integer. +Rules can describe times that are not representable as time values, +with the unrepresentable times ignored; this allows rules to be portable +among hosts with differing time value types. +.TP +.B TO +Gives the final year in which the rule applies. +In addition to +.B minimum +and +.B maximum +(as above), +the word +.B only +(or an abbreviation) +may be used to repeat the value of the +.B FROM +field. +.TP +.B TYPE +should be +.q \*- +and is present for compatibility with older versions of +.I zic +in which it could contain year types. +.TP +.B IN +Names the month in which the rule takes effect. +Month names may be abbreviated. +.TP +.B ON +Gives the day on which the rule takes effect. +Recognized forms include: +.nf +.in +.5i +.sp +.ta \w'Sun<=25\0\0'u +5 the fifth of the month +lastSun the last Sunday in the month +lastMon the last Monday in the month +Sun>=8 first Sunday on or after the eighth +Sun<=25 last Sunday on or before the 25th +.fi +.in -.5i +.sp +Names of days of the week may be abbreviated or spelled out in full. +Note that there must be no spaces within the +.B ON +field. +.TP +.B AT +Gives the time of day at which the rule takes effect. +Recognized forms include: +.nf +.in +.5i +.sp +.ta \w'1:28:13\0\0'u +2 time in hours +2:00 time in hours and minutes +15:00 24-hour format time (for times after noon) +1:28:14 time in hours, minutes, and seconds +\*- equivalent to 0 +.fi +.in -.5i +.sp +where hour 0 is midnight at the start of the day, +and hour 24 is midnight at the end of the day. +Any of these forms may be followed by the letter +.B w +if the given time is local +.q "wall clock" +time, +.B s +if the given time is local +.q "standard" +time, or +.B u +(or +.B g +or +.BR z ) +if the given time is universal time; +in the absence of an indicator, +wall clock time is assumed. +The intent is that a rule line describes the instants when a +clock/calendar set to the type of time specified in the +.B AT +field would show the specified date and time of day. +.TP +.B SAVE +Gives the amount of time to be added to local standard time when the rule is in +effect. +This field has the same format as the +.B AT +field +(although, of course, the +.B w +and +.B s +suffixes are not used). +Only the sum of standard time and this amount matters; for example, +.I zic +does not distinguish a 10:30 standard time plus an 0:30 +.B SAVE +from a 10:00 standard time plus a 1:00 +.BR SAVE . +.TP +.B LETTER/S +Gives the +.q "variable part" +(for example, the +.q "S" +or +.q "D" +in +.q "EST" +or +.q "EDT" ) +of time zone abbreviations to be used when this rule is in effect. +If this field is +.q \*- , +the variable part is null. +.PP +A zone line has the form +.sp +.nf +.ti +.5i +.ta \w'Zone\0\0'u +\w'Australia/Adelaide\0\0'u +\w'GMTOFF\0\0'u +\w'RULES/SAVE\0\0'u +\w'FORMAT\0\0'u +Zone NAME GMTOFF RULES/SAVE FORMAT [UNTILYEAR [MONTH [DAY [TIME]]]] +.sp +For example: +.sp +.ti +.5i +Zone Australia/Adelaide 9:30 Aus AC%sT 1971 Oct 31 2:00 +.sp +.fi +The fields that make up a zone line are: +.TP "\w'GMTOFF'u" +.B NAME +The name of the time zone. +This is the name used in creating the time conversion information file for the +zone. +It should not contain a file name component +.q ".\&" +or +.q ".." ; +a file name component is a maximal substring that does not contain +.q "/" . +.TP +.B GMTOFF +The amount of time to add to UT to get standard time in this zone. +This field has the same format as the +.B AT +and +.B SAVE +fields of rule lines; +begin the field with a minus sign if time must be subtracted from UT. +.TP +.B RULES/SAVE +The name of the rule(s) that apply in the time zone or, +alternately, an amount of time to add to local standard time. +If this field is +.B \*- +then standard time always applies in the time zone. +When an amount of time is given, only the sum of standard time and +this amount matters. +.TP +.B FORMAT +The format for time zone abbreviations in this time zone. +The pair of characters +.B %s +is used to show where the +.q "variable part" +of the time zone abbreviation goes. +Alternately, a format can use the pair of characters +.B %z +to stand for the UTC offset in the form +.RI \(+- hh , +.RI \(+- hhmm , +or +.RI \(+- hhmmss , +using the shortest form that does not lose information, where +.IR hh , +.IR mm , +and +.I ss +are the hours, minutes, and seconds east (+) or west (\(mi) of UTC. +Alternately, +a slash (/) +separates standard and daylight abbreviations. +To conform to POSIX, a time zone abbreviation should contain only +alphanumeric ASCII characters, "+" and "\*-". +.TP +.B UNTILYEAR [MONTH [DAY [TIME]]] +The time at which the UT offset or the rule(s) change for a location. +It is specified as a year, a month, a day, and a time of day. +If this is specified, +the time zone information is generated from the given UT offset +and rule change until the time specified, which is interpreted using +the rules in effect just before the transition. +The month, day, and time of day have the same format as the IN, ON, and AT +fields of a rule; trailing fields can be omitted, and default to the +earliest possible value for the missing fields. +.IP +The next line must be a +.q "continuation" +line; this has the same form as a zone line except that the +string +.q "Zone" +and the name are omitted, as the continuation line will +place information starting at the time specified as the +.q "until" +information in the previous line in the file used by the previous line. +Continuation lines may contain +.q "until" +information, just as zone lines do, indicating that the next line is a further +continuation. +.PP +If a zone changes at the same instant that a rule would otherwise take +effect in the earlier zone or continuation line, the rule is ignored. +In a single zone it is an error if two rules take effect at the same +instant, or if two zone changes take effect at the same instant. +.PP +A link line has the form +.sp +.nf +.ti +.5i +.ta \w'Link\0\0'u +\w'Europe/Istanbul\0\0'u +Link TARGET LINK-NAME +.sp +For example: +.sp +.ti +.5i +Link Europe/Istanbul Asia/Istanbul +.sp +.fi +The +.B TARGET +field should appear as the +.B NAME +field in some zone line. +The +.B LINK-NAME +field is used as an alternate name for that zone; +it has the same syntax as a zone line's +.B NAME +field. +.PP +Except for continuation lines, +lines may appear in any order in the input. +However, the behavior is unspecified if multiple zone or link lines +define the same name, or if the source of one link line is the target +of another. +.PP +Lines in the file that describes leap seconds have the following form: +.nf +.ti +.5i +.ta \w'Leap\0\0'u +\w'YEAR\0\0'u +\w'MONTH\0\0'u +\w'DAY\0\0'u +\w'HH:MM:SS\0\0'u +\w'CORR\0\0'u +.sp +Leap YEAR MONTH DAY HH:MM:SS CORR R/S +.sp +For example: +.ti +.5i +.sp +Leap 1974 Dec 31 23:59:60 + S +.sp +.fi +The +.BR YEAR , +.BR MONTH , +.BR DAY , +and +.B HH:MM:SS +fields tell when the leap second happened. +The +.B CORR +field +should be +.q "+" +if a second was added +or +.q "\*-" +if a second was skipped. +.\" There's no need to document the following, since it's impossible for more +.\" than one leap second to be inserted or deleted at a time. +.\" The C Standard is in error in suggesting the possibility. +.\" See Terry J Quinn, The BIPM and the accurate measure of time, +.\" Proc IEEE 79, 7 (July 1991), 894-905. +.\" or +.\" .q ++ +.\" if two seconds were added +.\" or +.\" .q -- +.\" if two seconds were skipped. +The +.B R/S +field +should be (an abbreviation of) +.q "Stationary" +if the leap second time given by the other fields should be interpreted as UTC +or +(an abbreviation of) +.q "Rolling" +if the leap second time given by the other fields should be interpreted as +local wall clock time. +.SH "EXTENDED EXAMPLE" +Here is an extended example of +.I zic +input, intended to illustrate many of its features. +.br +.ne 22 +.nf +.in +2m +.ta \w'# Rule\0\0'u +\w'NAME\0\0'u +\w'FROM\0\0'u +\w'1973\0\0'u +\w'TYPE\0\0'u +\w'Apr\0\0'u +\w'lastSun\0\0'u +\w'2:00\0\0'u +\w'SAVE\0\0'u +.sp +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Swiss 1941 1942 \*- May Mon>=1 1:00 1:00 S +Rule Swiss 1941 1942 \*- Oct Mon>=1 2:00 0 \*- +.sp .5 +Rule EU 1977 1980 \*- Apr Sun>=1 1:00u 1:00 S +Rule EU 1977 only \*- Sep lastSun 1:00u 0 \*- +Rule EU 1978 only \*- Oct 1 1:00u 0 \*- +Rule EU 1979 1995 \*- Sep lastSun 1:00u 0 \*- +Rule EU 1981 max \*- Mar lastSun 1:00u 1:00 S +Rule EU 1996 max \*- Oct lastSun 1:00u 0 \*- +.sp +.ta \w'# Zone\0\0'u +\w'Europe/Zurich\0\0'u +\w'GMTOFF\0\0'u +\w'RULES/SAVE\0\0'u +\w'FORMAT\0\0'u +# Zone NAME GMTOFF RULES/SAVE FORMAT UNTIL +Zone Europe/Zurich 0:34:08 \*- LMT 1853 Jul 16 + 0:29:46 \*- BMT 1894 Jun + 1:00 Swiss CE%sT 1981 + 1:00 EU CE%sT +.sp +Link Europe/Zurich Switzerland +.sp +.in +.fi +In this example, the zone is named Europe/Zurich but it has an alias +as Switzerland. This example says that Zurich was 34 minutes and 8 +seconds west of UT until 1853-07-16 at 00:00, when the legal offset +was changed to 7\(de\|26\(fm\|22.50\(sd; although this works out to +0:29:45.50, the input format cannot represent fractional seconds so it +is rounded here. After 1894-06-01 at 00:00 Swiss daylight saving rules +(defined with lines beginning with "Rule Swiss") apply, and the UT offset +became one hour. From 1981 to the present, EU daylight saving rules have +applied, and the UTC offset has remained at one hour. +.PP +In 1941 and 1942, daylight saving time applied from the first Monday +in May at 01:00 to the first Monday in October at 02:00. +The pre-1981 EU daylight-saving rules have no effect +here, but are included for completeness. Since 1981, daylight +saving has begun on the last Sunday in March at 01:00 UTC. +Until 1995 it ended the last Sunday in September at 01:00 UTC, +but this changed to the last Sunday in October starting in 1996. +.PP +For purposes of +display, "LMT" and "BMT" were initially used, respectively. Since +Swiss rules and later EU rules were applied, the display name for the +time zone has been CET for standard time and CEST for daylight saving +time. +.SH NOTES +For areas with more than two types of local time, +you may need to use local standard time in the +.B AT +field of the earliest transition time's rule to ensure that +the earliest transition time recorded in the compiled file is correct. +.PP +If, +for a particular zone, +a clock advance caused by the start of daylight saving +coincides with and is equal to +a clock retreat caused by a change in UT offset, +.IR zic +produces a single transition to daylight saving at the new UT offset +(without any change in wall clock time). +To get separate transitions +use multiple zone continuation lines +specifying transition instants using universal time. +.PP +Time stamps well before the Big Bang are silently omitted from the output. +This works around bugs in software that mishandles large negative time +stamps. Call it sour grapes, but pre-Big-Bang time stamps are +physically suspect anyway. The pre-Big-Bang cutoff time is +approximate and may change in future versions. +.SH FILE +/usr/local/etc/zoneinfo standard directory used for created files +.SH "SEE ALSO" +newctime(3), tzfile(5), zdump(8) +.\" This file is in the public domain, so clarified as of +.\" 2009-05-17 by Arthur David Olson. diff --git a/tz/zic.c b/tz/zic.c new file mode 100644 index 0000000..3eb65d3 --- /dev/null +++ b/tz/zic.c @@ -0,0 +1,3064 @@ +/* +** This file is in the public domain, so clarified as of +** 2006-07-17 by Arthur David Olson. +*/ + +#include "version.h" +#include "private.h" +#include "locale.h" +#include "tzfile.h" + +#include <stdarg.h> + +#define ZIC_VERSION_PRE_2013 '2' +#define ZIC_VERSION '3' + +typedef int_fast64_t zic_t; +#define ZIC_MIN INT_FAST64_MIN +#define ZIC_MAX INT_FAST64_MAX +#define SCNdZIC SCNdFAST64 + +#ifndef ZIC_MAX_ABBR_LEN_WO_WARN +#define ZIC_MAX_ABBR_LEN_WO_WARN 6 +#endif /* !defined ZIC_MAX_ABBR_LEN_WO_WARN */ + +#ifdef HAVE_DIRECT_H +# include <direct.h> +# include <io.h> +# undef mkdir +# define mkdir(name, mode) _mkdir(name) +#endif + +#if HAVE_SYS_STAT_H +#include <sys/stat.h> +#endif +#ifdef S_IRUSR +#define MKDIR_UMASK (S_IRUSR|S_IWUSR|S_IXUSR|S_IRGRP|S_IXGRP|S_IROTH|S_IXOTH) +#else +#define MKDIR_UMASK 0755 +#endif + +struct rule { + const char * r_filename; + int r_linenum; + const char * r_name; + + zic_t r_loyear; /* for example, 1986 */ + zic_t r_hiyear; /* for example, 1986 */ + const char * r_yrtype; + bool r_lowasnum; + bool r_hiwasnum; + + int r_month; /* 0..11 */ + + int r_dycode; /* see below */ + int r_dayofmonth; + int r_wday; + + zic_t r_tod; /* time from midnight */ + bool r_todisstd; /* above is standard time if 1 */ + /* or wall clock time if 0 */ + bool r_todisgmt; /* above is GMT if 1 */ + /* or local time if 0 */ + zic_t r_stdoff; /* offset from standard time */ + const char * r_abbrvar; /* variable part of abbreviation */ + + int r_todo; /* a rule to do (used in outzone) */ + zic_t r_temp; /* used in outzone */ +}; + +/* +** r_dycode r_dayofmonth r_wday +*/ + +#define DC_DOM 0 /* 1..31 */ /* unused */ +#define DC_DOWGEQ 1 /* 1..31 */ /* 0..6 (Sun..Sat) */ +#define DC_DOWLEQ 2 /* 1..31 */ /* 0..6 (Sun..Sat) */ + +struct zone { + const char * z_filename; + int z_linenum; + + const char * z_name; + zic_t z_gmtoff; + const char * z_rule; + const char * z_format; + char z_format_specifier; + + zic_t z_stdoff; + + struct rule * z_rules; + int z_nrules; + + struct rule z_untilrule; + zic_t z_untiltime; +}; + +#if !HAVE_POSIX_DECLS +extern int getopt(int argc, char * const argv[], + const char * options); +extern int link(const char * fromname, const char * toname); +extern char * optarg; +extern int optind; +#endif + +#if ! HAVE_LINK +# define link(from, to) (errno = ENOTSUP, -1) +#endif +#if ! HAVE_SYMLINK +# define symlink(from, to) (errno = ENOTSUP, -1) +#endif + +static void addtt(zic_t starttime, int type); +static int addtype(zic_t, char const *, bool, bool, bool); +static void leapadd(zic_t, bool, int, int); +static void adjleap(void); +static void associate(void); +static void dolink(const char * fromfield, const char * tofield); +static char ** getfields(char * buf); +static zic_t gethms(const char * string, const char * errstring, + bool); +static void infile(const char * filename); +static void inleap(char ** fields, int nfields); +static void inlink(char ** fields, int nfields); +static void inrule(char ** fields, int nfields); +static bool inzcont(char ** fields, int nfields); +static bool inzone(char ** fields, int nfields); +static bool inzsub(char **, int, bool); +static int itsdir(const char * name); +static bool is_alpha(char a); +static char lowerit(char); +static bool mkdirs(char *); +static void newabbr(const char * abbr); +static zic_t oadd(zic_t t1, zic_t t2); +static void outzone(const struct zone * zp, int ntzones); +static zic_t rpytime(const struct rule * rp, zic_t wantedy); +static void rulesub(struct rule * rp, + const char * loyearp, const char * hiyearp, + const char * typep, const char * monthp, + const char * dayp, const char * timep); +static zic_t tadd(zic_t t1, zic_t t2); +static bool yearistype(int year, const char * type); + +/* Bound on length of what %z can expand to. */ +enum { PERCENT_Z_LEN_BOUND = sizeof "+995959" - 1 }; + +/* If true, work around a bug in Qt 5.6.1 and earlier, which mishandles + tzdata binary files whose POSIX-TZ-style strings contain '<'; see + QTBUG-53071 <https://bugreports.qt.io/browse/QTBUG-53071>. This + workaround will no longer be needed when Qt 5.6.1 and earlier are + obsolete, say in the year 2021. */ +enum { WORK_AROUND_QTBUG_53071 = true }; + +static int charcnt; +static bool errors; +static bool warnings; +static const char * filename; +static int leapcnt; +static bool leapseen; +static zic_t leapminyear; +static zic_t leapmaxyear; +static int linenum; +static int max_abbrvar_len = PERCENT_Z_LEN_BOUND; +static int max_format_len; +static zic_t max_year; +static zic_t min_year; +static bool noise; +static const char * rfilename; +static int rlinenum; +static const char * progname; +static int timecnt; +static int timecnt_alloc; +static int typecnt; + +/* +** Line codes. +*/ + +#define LC_RULE 0 +#define LC_ZONE 1 +#define LC_LINK 2 +#define LC_LEAP 3 + +/* +** Which fields are which on a Zone line. +*/ + +#define ZF_NAME 1 +#define ZF_GMTOFF 2 +#define ZF_RULE 3 +#define ZF_FORMAT 4 +#define ZF_TILYEAR 5 +#define ZF_TILMONTH 6 +#define ZF_TILDAY 7 +#define ZF_TILTIME 8 +#define ZONE_MINFIELDS 5 +#define ZONE_MAXFIELDS 9 + +/* +** Which fields are which on a Zone continuation line. +*/ + +#define ZFC_GMTOFF 0 +#define ZFC_RULE 1 +#define ZFC_FORMAT 2 +#define ZFC_TILYEAR 3 +#define ZFC_TILMONTH 4 +#define ZFC_TILDAY 5 +#define ZFC_TILTIME 6 +#define ZONEC_MINFIELDS 3 +#define ZONEC_MAXFIELDS 7 + +/* +** Which files are which on a Rule line. +*/ + +#define RF_NAME 1 +#define RF_LOYEAR 2 +#define RF_HIYEAR 3 +#define RF_COMMAND 4 +#define RF_MONTH 5 +#define RF_DAY 6 +#define RF_TOD 7 +#define RF_STDOFF 8 +#define RF_ABBRVAR 9 +#define RULE_FIELDS 10 + +/* +** Which fields are which on a Link line. +*/ + +#define LF_FROM 1 +#define LF_TO 2 +#define LINK_FIELDS 3 + +/* +** Which fields are which on a Leap line. +*/ + +#define LP_YEAR 1 +#define LP_MONTH 2 +#define LP_DAY 3 +#define LP_TIME 4 +#define LP_CORR 5 +#define LP_ROLL 6 +#define LEAP_FIELDS 7 + +/* +** Year synonyms. +*/ + +#define YR_MINIMUM 0 +#define YR_MAXIMUM 1 +#define YR_ONLY 2 + +static struct rule * rules; +static int nrules; /* number of rules */ +static int nrules_alloc; + +static struct zone * zones; +static int nzones; /* number of zones */ +static int nzones_alloc; + +struct link { + const char * l_filename; + int l_linenum; + const char * l_from; + const char * l_to; +}; + +static struct link * links; +static int nlinks; +static int nlinks_alloc; + +struct lookup { + const char * l_word; + const int l_value; +}; + +static struct lookup const * byword(const char * string, + const struct lookup * lp); + +static struct lookup const line_codes[] = { + { "Rule", LC_RULE }, + { "Zone", LC_ZONE }, + { "Link", LC_LINK }, + { "Leap", LC_LEAP }, + { NULL, 0} +}; + +static struct lookup const mon_names[] = { + { "January", TM_JANUARY }, + { "February", TM_FEBRUARY }, + { "March", TM_MARCH }, + { "April", TM_APRIL }, + { "May", TM_MAY }, + { "June", TM_JUNE }, + { "July", TM_JULY }, + { "August", TM_AUGUST }, + { "September", TM_SEPTEMBER }, + { "October", TM_OCTOBER }, + { "November", TM_NOVEMBER }, + { "December", TM_DECEMBER }, + { NULL, 0 } +}; + +static struct lookup const wday_names[] = { + { "Sunday", TM_SUNDAY }, + { "Monday", TM_MONDAY }, + { "Tuesday", TM_TUESDAY }, + { "Wednesday", TM_WEDNESDAY }, + { "Thursday", TM_THURSDAY }, + { "Friday", TM_FRIDAY }, + { "Saturday", TM_SATURDAY }, + { NULL, 0 } +}; + +static struct lookup const lasts[] = { + { "last-Sunday", TM_SUNDAY }, + { "last-Monday", TM_MONDAY }, + { "last-Tuesday", TM_TUESDAY }, + { "last-Wednesday", TM_WEDNESDAY }, + { "last-Thursday", TM_THURSDAY }, + { "last-Friday", TM_FRIDAY }, + { "last-Saturday", TM_SATURDAY }, + { NULL, 0 } +}; + +static struct lookup const begin_years[] = { + { "minimum", YR_MINIMUM }, + { "maximum", YR_MAXIMUM }, + { NULL, 0 } +}; + +static struct lookup const end_years[] = { + { "minimum", YR_MINIMUM }, + { "maximum", YR_MAXIMUM }, + { "only", YR_ONLY }, + { NULL, 0 } +}; + +static struct lookup const leap_types[] = { + { "Rolling", true }, + { "Stationary", false }, + { NULL, 0 } +}; + +static const int len_months[2][MONSPERYEAR] = { + { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }, + { 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 } +}; + +static const int len_years[2] = { + DAYSPERNYEAR, DAYSPERLYEAR +}; + +static struct attype { + zic_t at; + unsigned char type; +} * attypes; +static zic_t gmtoffs[TZ_MAX_TYPES]; +static char isdsts[TZ_MAX_TYPES]; +static unsigned char abbrinds[TZ_MAX_TYPES]; +static bool ttisstds[TZ_MAX_TYPES]; +static bool ttisgmts[TZ_MAX_TYPES]; +static char chars[TZ_MAX_CHARS]; +static zic_t trans[TZ_MAX_LEAPS]; +static zic_t corr[TZ_MAX_LEAPS]; +static char roll[TZ_MAX_LEAPS]; + +/* +** Memory allocation. +*/ + +static _Noreturn void +memory_exhausted(const char *msg) +{ + fprintf(stderr, _("%s: Memory exhausted: %s\n"), progname, msg); + exit(EXIT_FAILURE); +} + +static ATTRIBUTE_PURE size_t +size_product(size_t nitems, size_t itemsize) +{ + if (SIZE_MAX / itemsize < nitems) + memory_exhausted(_("size overflow")); + return nitems * itemsize; +} + +#if !HAVE_STRDUP +static char * +strdup(char const *str) +{ + char *result = malloc(strlen(str) + 1); + return result ? strcpy(result, str) : result; +} +#endif + +static ATTRIBUTE_PURE void * +memcheck(void *ptr) +{ + if (ptr == NULL) + memory_exhausted(strerror(errno)); + return ptr; +} + +static void * +emalloc(size_t size) +{ + return memcheck(malloc(size)); +} + +static void * +erealloc(void *ptr, size_t size) +{ + return memcheck(realloc(ptr, size)); +} + +static char * +ecpyalloc (char const *str) +{ + return memcheck(strdup(str)); +} + +static void * +growalloc(void *ptr, size_t itemsize, int nitems, int *nitems_alloc) +{ + if (nitems < *nitems_alloc) + return ptr; + else { + int nitems_max = INT_MAX - WORK_AROUND_QTBUG_53071; + int amax = nitems_max < SIZE_MAX ? nitems_max : SIZE_MAX; + if ((amax - 1) / 3 * 2 < *nitems_alloc) + memory_exhausted(_("int overflow")); + *nitems_alloc = *nitems_alloc + (*nitems_alloc >> 1) + 1; + return erealloc(ptr, size_product(*nitems_alloc, itemsize)); + } +} + +/* +** Error handling. +*/ + +static void +eats(const char *const name, const int num, const char *const rname, + const int rnum) +{ + filename = name; + linenum = num; + rfilename = rname; + rlinenum = rnum; +} + +static void +eat(const char *const name, const int num) +{ + eats(name, num, NULL, -1); +} + +static void ATTRIBUTE_FORMAT((printf, 1, 0)) +verror(const char *const string, va_list args) +{ + /* + ** Match the format of "cc" to allow sh users to + ** zic ... 2>&1 | error -t "*" -v + ** on BSD systems. + */ + if (filename) + fprintf(stderr, _("\"%s\", line %d: "), filename, linenum); + vfprintf(stderr, string, args); + if (rfilename != NULL) + fprintf(stderr, _(" (rule from \"%s\", line %d)"), + rfilename, rlinenum); + fprintf(stderr, "\n"); +} + +static void ATTRIBUTE_FORMAT((printf, 1, 2)) +error(const char *const string, ...) +{ + va_list args; + va_start(args, string); + verror(string, args); + va_end(args); + errors = true; +} + +static void ATTRIBUTE_FORMAT((printf, 1, 2)) +warning(const char *const string, ...) +{ + va_list args; + fprintf(stderr, _("warning: ")); + va_start(args, string); + verror(string, args); + va_end(args); + warnings = true; +} + +static void +close_file(FILE *stream, char const *name) +{ + char const *e = (ferror(stream) ? _("I/O error") + : fclose(stream) != 0 ? strerror(errno) : NULL); + if (e) { + fprintf(stderr, "%s: ", progname); + if (name) + fprintf(stderr, "%s: ", name); + fprintf(stderr, "%s\n", e); + exit(EXIT_FAILURE); + } +} + +static _Noreturn void +usage(FILE *stream, int status) +{ + fprintf(stream, + _("%s: usage is %s [ --version ] [ --help ] [ -v ] \\\n" + "\t[ -l localtime ] [ -p posixrules ] [ -d directory ] \\\n" + "\t[ -L leapseconds ] [ filename ... ]\n\n" + "Report bugs to %s.\n"), + progname, progname, REPORT_BUGS_TO); + if (status == EXIT_SUCCESS) + close_file(stream, NULL); + exit(status); +} + +static const char * psxrules; +static const char * lcltime; +static const char * directory; +static const char * leapsec; +static const char * yitcommand; + +int +main(int argc, char **argv) +{ + register int i; + register int j; + register int c; + +#ifdef S_IWGRP + umask(umask(S_IWGRP | S_IWOTH) | (S_IWGRP | S_IWOTH)); +#endif +#if HAVE_GETTEXT + setlocale(LC_ALL, ""); +#ifdef TZ_DOMAINDIR + bindtextdomain(TZ_DOMAIN, TZ_DOMAINDIR); +#endif /* defined TEXTDOMAINDIR */ + textdomain(TZ_DOMAIN); +#endif /* HAVE_GETTEXT */ + progname = argv[0]; + if (TYPE_BIT(zic_t) < 64) { + fprintf(stderr, "%s: %s\n", progname, + _("wild compilation-time specification of zic_t")); + return EXIT_FAILURE; + } + for (i = 1; i < argc; ++i) + if (strcmp(argv[i], "--version") == 0) { + printf("zic %s%s\n", PKGVERSION, TZVERSION); + close_file(stdout, NULL); + return EXIT_SUCCESS; + } else if (strcmp(argv[i], "--help") == 0) { + usage(stdout, EXIT_SUCCESS); + } + while ((c = getopt(argc, argv, "d:l:p:L:vsy:")) != EOF && c != -1) + switch (c) { + default: + usage(stderr, EXIT_FAILURE); + case 'd': + if (directory == NULL) + directory = optarg; + else { + fprintf(stderr, +_("%s: More than one -d option specified\n"), + progname); + return EXIT_FAILURE; + } + break; + case 'l': + if (lcltime == NULL) + lcltime = optarg; + else { + fprintf(stderr, +_("%s: More than one -l option specified\n"), + progname); + return EXIT_FAILURE; + } + break; + case 'p': + if (psxrules == NULL) + psxrules = optarg; + else { + fprintf(stderr, +_("%s: More than one -p option specified\n"), + progname); + return EXIT_FAILURE; + } + break; + case 'y': + if (yitcommand == NULL) + yitcommand = optarg; + else { + fprintf(stderr, +_("%s: More than one -y option specified\n"), + progname); + return EXIT_FAILURE; + } + break; + case 'L': + if (leapsec == NULL) + leapsec = optarg; + else { + fprintf(stderr, +_("%s: More than one -L option specified\n"), + progname); + return EXIT_FAILURE; + } + break; + case 'v': + noise = true; + break; + case 's': + warning(_("-s ignored")); + break; + } + if (optind == argc - 1 && strcmp(argv[optind], "=") == 0) + usage(stderr, EXIT_FAILURE); /* usage message by request */ + if (directory == NULL) + directory = TZDIR; + if (yitcommand == NULL) + yitcommand = "yearistype"; + + if (optind < argc && leapsec != NULL) { + infile(leapsec); + adjleap(); + } + + for (i = optind; i < argc; ++i) + infile(argv[i]); + if (errors) + return EXIT_FAILURE; + associate(); + for (i = 0; i < nzones; i = j) { + /* + ** Find the next non-continuation zone entry. + */ + for (j = i + 1; j < nzones && zones[j].z_name == NULL; ++j) + continue; + outzone(&zones[i], j - i); + } + /* + ** Make links. + */ + for (i = 0; i < nlinks; ++i) { + eat(links[i].l_filename, links[i].l_linenum); + dolink(links[i].l_from, links[i].l_to); + if (noise) + for (j = 0; j < nlinks; ++j) + if (strcmp(links[i].l_to, + links[j].l_from) == 0) + warning(_("link to link")); + } + if (lcltime != NULL) { + eat(_("command line"), 1); + dolink(lcltime, TZDEFAULT); + } + if (psxrules != NULL) { + eat(_("command line"), 1); + dolink(psxrules, TZDEFRULES); + } + if (warnings && (ferror(stderr) || fclose(stderr) != 0)) + return EXIT_FAILURE; + return errors ? EXIT_FAILURE : EXIT_SUCCESS; +} + +static bool +componentcheck(char const *name, char const *component, + char const *component_end) +{ + enum { component_len_max = 14 }; + size_t component_len = component_end - component; + if (component_len == 0) { + if (!*name) + error (_("empty file name")); + else + error (_(component == name + ? "file name '%s' begins with '/'" + : *component_end + ? "file name '%s' contains '//'" + : "file name '%s' ends with '/'"), + name); + return false; + } + if (0 < component_len && component_len <= 2 + && component[0] == '.' && component_end[-1] == '.') { + error(_("file name '%s' contains '%.*s' component"), + name, (int) component_len, component); + return false; + } + if (noise) { + if (0 < component_len && component[0] == '-') + warning(_("file name '%s' component contains leading '-'"), + name); + if (component_len_max < component_len) + warning(_("file name '%s' contains overlength component" + " '%.*s...'"), + name, component_len_max, component); + } + return true; +} + +static bool +namecheck(const char *name) +{ + register char const *cp; + + /* Benign characters in a portable file name. */ + static char const benign[] = + "-/_" + "abcdefghijklmnopqrstuvwxyz" + "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; + + /* Non-control chars in the POSIX portable character set, + excluding the benign characters. */ + static char const printable_and_not_benign[] = + " !\"#$%&'()*+,.0123456789:;<=>?@[\\]^`{|}~"; + + register char const *component = name; + for (cp = name; *cp; cp++) { + unsigned char c = *cp; + if (noise && !strchr(benign, c)) { + warning((strchr(printable_and_not_benign, c) + ? _("file name '%s' contains byte '%c'") + : _("file name '%s' contains byte '\\%o'")), + name, c); + } + if (c == '/') { + if (!componentcheck(name, component, cp)) + return false; + component = cp + 1; + } + } + return componentcheck(name, component, cp); +} + +static char * +relname(char const *dir, char const *base) +{ + if (*base == '/') + return ecpyalloc(base); + else { + size_t dir_len = strlen(dir); + bool needs_slash = dir_len && dir[dir_len - 1] != '/'; + char *result = emalloc(dir_len + needs_slash + strlen(base) + 1); + result[dir_len] = '/'; + strcpy(result + dir_len + needs_slash, base); + return memcpy(result, dir, dir_len); + } +} + +static void +dolink(char const *fromfield, char const *tofield) +{ + register char * fromname; + register char * toname; + register int fromisdir; + + fromname = relname(directory, fromfield); + toname = relname(directory, tofield); + /* + ** We get to be careful here since + ** there's a fair chance of root running us. + */ + fromisdir = itsdir(fromname); + if (fromisdir) { + char const *e = strerror(fromisdir < 0 ? errno : EPERM); + fprintf(stderr, _("%s: link from %s failed: %s"), + progname, fromname, e); + exit(EXIT_FAILURE); + } + if (link(fromname, toname) != 0) { + int link_errno = errno; + bool retry_if_link_supported = false; + + if (link_errno == ENOENT || link_errno == ENOTSUP) { + if (! mkdirs(toname)) + exit(EXIT_FAILURE); + retry_if_link_supported = true; + } + if ((link_errno == EEXIST || link_errno == ENOTSUP) + && itsdir(toname) == 0 + && (remove(toname) == 0 || errno == ENOENT)) + retry_if_link_supported = true; + if (retry_if_link_supported && link_errno != ENOTSUP) + link_errno = link(fromname, toname) == 0 ? 0 : errno; + if (link_errno != 0) { + const char *s = fromfield; + const char *t; + char *p; + size_t dotdots = 0; + char *symlinkcontents; + int symlink_result; + + do + t = s; + while ((s = strchr(s, '/')) + && strncmp(fromfield, tofield, ++s - fromfield) == 0); + + for (s = tofield + (t - fromfield); *s; s++) + dotdots += *s == '/'; + symlinkcontents = emalloc(3 * dotdots + strlen(t) + 1); + for (p = symlinkcontents; dotdots-- != 0; p += 3) + memcpy(p, "../", 3); + strcpy(p, t); + symlink_result = symlink(symlinkcontents, toname); + free(symlinkcontents); + if (symlink_result == 0) { + if (link_errno != ENOTSUP) + warning(_("symbolic link used because hard link failed: %s"), + strerror (link_errno)); + } else { + FILE *fp, *tp; + int c; + fp = fopen(fromname, "rb"); + if (!fp) { + const char *e = strerror(errno); + fprintf(stderr, + _("%s: Can't read %s: %s\n"), + progname, fromname, e); + exit(EXIT_FAILURE); + } + tp = fopen(toname, "wb"); + if (!tp) { + const char *e = strerror(errno); + fprintf(stderr, + _("%s: Can't create %s: %s\n"), + progname, toname, e); + exit(EXIT_FAILURE); + } + while ((c = getc(fp)) != EOF) + putc(c, tp); + close_file(fp, fromname); + close_file(tp, toname); + if (link_errno != ENOTSUP) + warning(_("copy used because hard link failed: %s"), + strerror (link_errno)); + } + } + } + free(fromname); + free(toname); +} + +#define TIME_T_BITS_IN_FILE 64 + +static zic_t const min_time = MINVAL (zic_t, TIME_T_BITS_IN_FILE); +static zic_t const max_time = MAXVAL (zic_t, TIME_T_BITS_IN_FILE); + +/* Estimated time of the Big Bang, in seconds since the POSIX epoch. + rounded downward to the negation of a power of two that is + comfortably outside the error bounds. + + For the time of the Big Bang, see: + + Ade PAR, Aghanim N, Armitage-Caplan C et al. Planck 2013 results. + I. Overview of products and scientific results. + arXiv:1303.5062 2013-03-20 20:10:01 UTC + <http://arxiv.org/pdf/1303.5062v1> [PDF] + + Page 36, Table 9, row Age/Gyr, column Planck+WP+highL+BAO 68% limits + gives the value 13.798 plus-or-minus 0.037 billion years. + Multiplying this by 1000000000 and then by 31557600 (the number of + seconds in an astronomical year) gives a value that is comfortably + less than 2**59, so BIG_BANG is - 2**59. + + BIG_BANG is approximate, and may change in future versions. + Please do not rely on its exact value. */ + +#ifndef BIG_BANG +#define BIG_BANG (- (1LL << 59)) +#endif + +/* If true, work around GNOME bug 730332 + <https://bugzilla.gnome.org/show_bug.cgi?id=730332> + by refusing to output time stamps before BIG_BANG. + Such time stamps are physically suspect anyway. + + The GNOME bug is scheduled to be fixed in GNOME 3.22, and if so + this workaround will no longer be needed when GNOME 3.21 and + earlier are obsolete, say in the year 2021. */ +enum { WORK_AROUND_GNOME_BUG_730332 = true }; + +static const zic_t early_time = (WORK_AROUND_GNOME_BUG_730332 + ? BIG_BANG + : MINVAL(zic_t, TIME_T_BITS_IN_FILE)); + +/* Return 1 if NAME is a directory, 0 if it's something else, -1 if trouble. */ +static int +itsdir(char const *name) +{ + struct stat st; + int res = stat(name, &st); +#ifdef S_ISDIR + if (res == 0) + return S_ISDIR(st.st_mode) != 0; +#endif + if (res == 0 || errno == EOVERFLOW) { + char *nameslashdot = relname(name, "."); + bool dir = stat(nameslashdot, &st) == 0 || errno == EOVERFLOW; + free(nameslashdot); + return dir; + } + return -1; +} + +/* +** Associate sets of rules with zones. +*/ + +/* +** Sort by rule name. +*/ + +static int +rcomp(const void *cp1, const void *cp2) +{ + return strcmp(((const struct rule *) cp1)->r_name, + ((const struct rule *) cp2)->r_name); +} + +static void +associate(void) +{ + register struct zone * zp; + register struct rule * rp; + register int base, out; + register int i, j; + + if (nrules != 0) { + qsort(rules, nrules, sizeof *rules, rcomp); + for (i = 0; i < nrules - 1; ++i) { + if (strcmp(rules[i].r_name, + rules[i + 1].r_name) != 0) + continue; + if (strcmp(rules[i].r_filename, + rules[i + 1].r_filename) == 0) + continue; + eat(rules[i].r_filename, rules[i].r_linenum); + warning(_("same rule name in multiple files")); + eat(rules[i + 1].r_filename, rules[i + 1].r_linenum); + warning(_("same rule name in multiple files")); + for (j = i + 2; j < nrules; ++j) { + if (strcmp(rules[i].r_name, + rules[j].r_name) != 0) + break; + if (strcmp(rules[i].r_filename, + rules[j].r_filename) == 0) + continue; + if (strcmp(rules[i + 1].r_filename, + rules[j].r_filename) == 0) + continue; + break; + } + i = j - 1; + } + } + for (i = 0; i < nzones; ++i) { + zp = &zones[i]; + zp->z_rules = NULL; + zp->z_nrules = 0; + } + for (base = 0; base < nrules; base = out) { + rp = &rules[base]; + for (out = base + 1; out < nrules; ++out) + if (strcmp(rp->r_name, rules[out].r_name) != 0) + break; + for (i = 0; i < nzones; ++i) { + zp = &zones[i]; + if (strcmp(zp->z_rule, rp->r_name) != 0) + continue; + zp->z_rules = rp; + zp->z_nrules = out - base; + } + } + for (i = 0; i < nzones; ++i) { + zp = &zones[i]; + if (zp->z_nrules == 0) { + /* + ** Maybe we have a local standard time offset. + */ + eat(zp->z_filename, zp->z_linenum); + zp->z_stdoff = gethms(zp->z_rule, _("unruly zone"), + true); + /* + ** Note, though, that if there's no rule, + ** a '%s' in the format is a bad thing. + */ + if (zp->z_format_specifier == 's') + error("%s", _("%s in ruleless zone")); + } + } + if (errors) + exit(EXIT_FAILURE); +} + +static void +infile(const char *name) +{ + register FILE * fp; + register char ** fields; + register char * cp; + register const struct lookup * lp; + register int nfields; + register bool wantcont; + register int num; + char buf[BUFSIZ]; + + if (strcmp(name, "-") == 0) { + name = _("standard input"); + fp = stdin; + } else if ((fp = fopen(name, "r")) == NULL) { + const char *e = strerror(errno); + + fprintf(stderr, _("%s: Can't open %s: %s\n"), + progname, name, e); + exit(EXIT_FAILURE); + } + wantcont = false; + for (num = 1; ; ++num) { + eat(name, num); + if (fgets(buf, sizeof buf, fp) != buf) + break; + cp = strchr(buf, '\n'); + if (cp == NULL) { + error(_("line too long")); + exit(EXIT_FAILURE); + } + *cp = '\0'; + fields = getfields(buf); + nfields = 0; + while (fields[nfields] != NULL) { + static char nada; + + if (strcmp(fields[nfields], "-") == 0) + fields[nfields] = &nada; + ++nfields; + } + if (nfields == 0) { + /* nothing to do */ + } else if (wantcont) { + wantcont = inzcont(fields, nfields); + } else { + lp = byword(fields[0], line_codes); + if (lp == NULL) + error(_("input line of unknown type")); + else switch ((int) (lp->l_value)) { + case LC_RULE: + inrule(fields, nfields); + wantcont = false; + break; + case LC_ZONE: + wantcont = inzone(fields, nfields); + break; + case LC_LINK: + inlink(fields, nfields); + wantcont = false; + break; + case LC_LEAP: + if (name != leapsec) + warning(_("%s: Leap line in non leap" + " seconds file %s"), + progname, name); + else inleap(fields, nfields); + wantcont = false; + break; + default: /* "cannot happen" */ + fprintf(stderr, +_("%s: panic: Invalid l_value %d\n"), + progname, lp->l_value); + exit(EXIT_FAILURE); + } + } + free(fields); + } + close_file(fp, filename); + if (wantcont) + error(_("expected continuation line not found")); +} + +/* +** Convert a string of one of the forms +** h -h hh:mm -hh:mm hh:mm:ss -hh:mm:ss +** into a number of seconds. +** A null string maps to zero. +** Call error with errstring and return zero on errors. +*/ + +static zic_t +gethms(char const *string, char const *errstring, bool signable) +{ + zic_t hh; + int mm, ss, sign; + char xs; + + if (string == NULL || *string == '\0') + return 0; + if (!signable) + sign = 1; + else if (*string == '-') { + sign = -1; + ++string; + } else sign = 1; + if (sscanf(string, "%"SCNdZIC"%c", &hh, &xs) == 1) + mm = ss = 0; + else if (sscanf(string, "%"SCNdZIC":%d%c", &hh, &mm, &xs) == 2) + ss = 0; + else if (sscanf(string, "%"SCNdZIC":%d:%d%c", &hh, &mm, &ss, &xs) + != 3) { + error("%s", errstring); + return 0; + } + if (hh < 0 || + mm < 0 || mm >= MINSPERHOUR || + ss < 0 || ss > SECSPERMIN) { + error("%s", errstring); + return 0; + } + if (ZIC_MAX / SECSPERHOUR < hh) { + error(_("time overflow")); + return 0; + } + if (noise && (hh > HOURSPERDAY || + (hh == HOURSPERDAY && (mm != 0 || ss != 0)))) +warning(_("values over 24 hours not handled by pre-2007 versions of zic")); + return oadd(sign * hh * SECSPERHOUR, + sign * (mm * SECSPERMIN + ss)); +} + +static void +inrule(char **fields, int nfields) +{ + static struct rule r; + + if (nfields != RULE_FIELDS) { + error(_("wrong number of fields on Rule line")); + return; + } + if (*fields[RF_NAME] == '\0') { + error(_("nameless rule")); + return; + } + r.r_filename = filename; + r.r_linenum = linenum; + r.r_stdoff = gethms(fields[RF_STDOFF], _("invalid saved time"), true); + rulesub(&r, fields[RF_LOYEAR], fields[RF_HIYEAR], fields[RF_COMMAND], + fields[RF_MONTH], fields[RF_DAY], fields[RF_TOD]); + r.r_name = ecpyalloc(fields[RF_NAME]); + r.r_abbrvar = ecpyalloc(fields[RF_ABBRVAR]); + if (max_abbrvar_len < strlen(r.r_abbrvar)) + max_abbrvar_len = strlen(r.r_abbrvar); + rules = growalloc(rules, sizeof *rules, nrules, &nrules_alloc); + rules[nrules++] = r; +} + +static bool +inzone(char **fields, int nfields) +{ + register int i; + + if (nfields < ZONE_MINFIELDS || nfields > ZONE_MAXFIELDS) { + error(_("wrong number of fields on Zone line")); + return false; + } + if (strcmp(fields[ZF_NAME], TZDEFAULT) == 0 && lcltime != NULL) { + error( +_("\"Zone %s\" line and -l option are mutually exclusive"), + TZDEFAULT); + return false; + } + if (strcmp(fields[ZF_NAME], TZDEFRULES) == 0 && psxrules != NULL) { + error( +_("\"Zone %s\" line and -p option are mutually exclusive"), + TZDEFRULES); + return false; + } + for (i = 0; i < nzones; ++i) + if (zones[i].z_name != NULL && + strcmp(zones[i].z_name, fields[ZF_NAME]) == 0) { + error( +_("duplicate zone name %s (file \"%s\", line %d)"), + fields[ZF_NAME], + zones[i].z_filename, + zones[i].z_linenum); + return false; + } + return inzsub(fields, nfields, false); +} + +static bool +inzcont(char **fields, int nfields) +{ + if (nfields < ZONEC_MINFIELDS || nfields > ZONEC_MAXFIELDS) { + error(_("wrong number of fields on Zone continuation line")); + return false; + } + return inzsub(fields, nfields, true); +} + +static bool +inzsub(char **fields, int nfields, bool iscont) +{ + register char * cp; + char * cp1; + static struct zone z; + register int i_gmtoff, i_rule, i_format; + register int i_untilyear, i_untilmonth; + register int i_untilday, i_untiltime; + register bool hasuntil; + + if (iscont) { + i_gmtoff = ZFC_GMTOFF; + i_rule = ZFC_RULE; + i_format = ZFC_FORMAT; + i_untilyear = ZFC_TILYEAR; + i_untilmonth = ZFC_TILMONTH; + i_untilday = ZFC_TILDAY; + i_untiltime = ZFC_TILTIME; + z.z_name = NULL; + } else if (!namecheck(fields[ZF_NAME])) + return false; + else { + i_gmtoff = ZF_GMTOFF; + i_rule = ZF_RULE; + i_format = ZF_FORMAT; + i_untilyear = ZF_TILYEAR; + i_untilmonth = ZF_TILMONTH; + i_untilday = ZF_TILDAY; + i_untiltime = ZF_TILTIME; + z.z_name = ecpyalloc(fields[ZF_NAME]); + } + z.z_filename = filename; + z.z_linenum = linenum; + z.z_gmtoff = gethms(fields[i_gmtoff], _("invalid UT offset"), true); + if ((cp = strchr(fields[i_format], '%')) != 0) { + if ((*++cp != 's' && *cp != 'z') || strchr(cp, '%') + || strchr(fields[i_format], '/')) { + error(_("invalid abbreviation format")); + return false; + } + } + z.z_rule = ecpyalloc(fields[i_rule]); + z.z_format = cp1 = ecpyalloc(fields[i_format]); + z.z_format_specifier = cp ? *cp : '\0'; + if (z.z_format_specifier == 'z') { + if (noise) + warning(_("format '%s' not handled by pre-2015 versions of zic"), + z.z_format); + cp1[cp - fields[i_format]] = 's'; + } + if (max_format_len < strlen(z.z_format)) + max_format_len = strlen(z.z_format); + hasuntil = nfields > i_untilyear; + if (hasuntil) { + z.z_untilrule.r_filename = filename; + z.z_untilrule.r_linenum = linenum; + rulesub(&z.z_untilrule, + fields[i_untilyear], + "only", + "", + (nfields > i_untilmonth) ? + fields[i_untilmonth] : "Jan", + (nfields > i_untilday) ? fields[i_untilday] : "1", + (nfields > i_untiltime) ? fields[i_untiltime] : "0"); + z.z_untiltime = rpytime(&z.z_untilrule, + z.z_untilrule.r_loyear); + if (iscont && nzones > 0 && + z.z_untiltime > min_time && + z.z_untiltime < max_time && + zones[nzones - 1].z_untiltime > min_time && + zones[nzones - 1].z_untiltime < max_time && + zones[nzones - 1].z_untiltime >= z.z_untiltime) { + error(_( +"Zone continuation line end time is not after end time of previous line" + )); + return false; + } + } + zones = growalloc(zones, sizeof *zones, nzones, &nzones_alloc); + zones[nzones++] = z; + /* + ** If there was an UNTIL field on this line, + ** there's more information about the zone on the next line. + */ + return hasuntil; +} + +static void +inleap(char **fields, int nfields) +{ + register const char * cp; + register const struct lookup * lp; + register int i, j; + zic_t year; + int month, day; + zic_t dayoff, tod; + zic_t t; + char xs; + + if (nfields != LEAP_FIELDS) { + error(_("wrong number of fields on Leap line")); + return; + } + dayoff = 0; + cp = fields[LP_YEAR]; + if (sscanf(cp, "%"SCNdZIC"%c", &year, &xs) != 1) { + /* + ** Leapin' Lizards! + */ + error(_("invalid leaping year")); + return; + } + if (!leapseen || leapmaxyear < year) + leapmaxyear = year; + if (!leapseen || leapminyear > year) + leapminyear = year; + leapseen = true; + j = EPOCH_YEAR; + while (j != year) { + if (year > j) { + i = len_years[isleap(j)]; + ++j; + } else { + --j; + i = -len_years[isleap(j)]; + } + dayoff = oadd(dayoff, i); + } + if ((lp = byword(fields[LP_MONTH], mon_names)) == NULL) { + error(_("invalid month name")); + return; + } + month = lp->l_value; + j = TM_JANUARY; + while (j != month) { + i = len_months[isleap(year)][j]; + dayoff = oadd(dayoff, i); + ++j; + } + cp = fields[LP_DAY]; + if (sscanf(cp, "%d%c", &day, &xs) != 1 || + day <= 0 || day > len_months[isleap(year)][month]) { + error(_("invalid day of month")); + return; + } + dayoff = oadd(dayoff, day - 1); + if (dayoff < min_time / SECSPERDAY) { + error(_("time too small")); + return; + } + if (dayoff > max_time / SECSPERDAY) { + error(_("time too large")); + return; + } + t = dayoff * SECSPERDAY; + tod = gethms(fields[LP_TIME], _("invalid time of day"), false); + cp = fields[LP_CORR]; + { + register bool positive; + int count; + + if (strcmp(cp, "") == 0) { /* infile() turns "-" into "" */ + positive = false; + count = 1; + } else if (strcmp(cp, "--") == 0) { + positive = false; + count = 2; + } else if (strcmp(cp, "+") == 0) { + positive = true; + count = 1; + } else if (strcmp(cp, "++") == 0) { + positive = true; + count = 2; + } else { + error(_("illegal CORRECTION field on Leap line")); + return; + } + if ((lp = byword(fields[LP_ROLL], leap_types)) == NULL) { + error(_( + "illegal Rolling/Stationary field on Leap line" + )); + return; + } + t = tadd(t, tod); + if (t < early_time) { + error(_("leap second precedes Big Bang")); + return; + } + leapadd(t, positive, lp->l_value, count); + } +} + +static void +inlink(char **fields, int nfields) +{ + struct link l; + + if (nfields != LINK_FIELDS) { + error(_("wrong number of fields on Link line")); + return; + } + if (*fields[LF_FROM] == '\0') { + error(_("blank FROM field on Link line")); + return; + } + if (! namecheck(fields[LF_TO])) + return; + l.l_filename = filename; + l.l_linenum = linenum; + l.l_from = ecpyalloc(fields[LF_FROM]); + l.l_to = ecpyalloc(fields[LF_TO]); + links = growalloc(links, sizeof *links, nlinks, &nlinks_alloc); + links[nlinks++] = l; +} + +static void +rulesub(struct rule *rp, const char *loyearp, const char *hiyearp, + const char *typep, const char *monthp, const char *dayp, + const char *timep) +{ + register const struct lookup * lp; + register const char * cp; + register char * dp; + register char * ep; + char xs; + + if ((lp = byword(monthp, mon_names)) == NULL) { + error(_("invalid month name")); + return; + } + rp->r_month = lp->l_value; + rp->r_todisstd = false; + rp->r_todisgmt = false; + dp = ecpyalloc(timep); + if (*dp != '\0') { + ep = dp + strlen(dp) - 1; + switch (lowerit(*ep)) { + case 's': /* Standard */ + rp->r_todisstd = true; + rp->r_todisgmt = false; + *ep = '\0'; + break; + case 'w': /* Wall */ + rp->r_todisstd = false; + rp->r_todisgmt = false; + *ep = '\0'; + break; + case 'g': /* Greenwich */ + case 'u': /* Universal */ + case 'z': /* Zulu */ + rp->r_todisstd = true; + rp->r_todisgmt = true; + *ep = '\0'; + break; + } + } + rp->r_tod = gethms(dp, _("invalid time of day"), false); + free(dp); + /* + ** Year work. + */ + cp = loyearp; + lp = byword(cp, begin_years); + rp->r_lowasnum = lp == NULL; + if (!rp->r_lowasnum) switch ((int) lp->l_value) { + case YR_MINIMUM: + rp->r_loyear = ZIC_MIN; + break; + case YR_MAXIMUM: + rp->r_loyear = ZIC_MAX; + break; + default: /* "cannot happen" */ + fprintf(stderr, + _("%s: panic: Invalid l_value %d\n"), + progname, lp->l_value); + exit(EXIT_FAILURE); + } else if (sscanf(cp, "%"SCNdZIC"%c", &rp->r_loyear, &xs) != 1) { + error(_("invalid starting year")); + return; + } + cp = hiyearp; + lp = byword(cp, end_years); + rp->r_hiwasnum = lp == NULL; + if (!rp->r_hiwasnum) switch ((int) lp->l_value) { + case YR_MINIMUM: + rp->r_hiyear = ZIC_MIN; + break; + case YR_MAXIMUM: + rp->r_hiyear = ZIC_MAX; + break; + case YR_ONLY: + rp->r_hiyear = rp->r_loyear; + break; + default: /* "cannot happen" */ + fprintf(stderr, + _("%s: panic: Invalid l_value %d\n"), + progname, lp->l_value); + exit(EXIT_FAILURE); + } else if (sscanf(cp, "%"SCNdZIC"%c", &rp->r_hiyear, &xs) != 1) { + error(_("invalid ending year")); + return; + } + if (rp->r_loyear > rp->r_hiyear) { + error(_("starting year greater than ending year")); + return; + } + if (*typep == '\0') + rp->r_yrtype = NULL; + else { + if (rp->r_loyear == rp->r_hiyear) { + error(_("typed single year")); + return; + } + rp->r_yrtype = ecpyalloc(typep); + } + /* + ** Day work. + ** Accept things such as: + ** 1 + ** last-Sunday + ** Sun<=20 + ** Sun>=7 + */ + dp = ecpyalloc(dayp); + if ((lp = byword(dp, lasts)) != NULL) { + rp->r_dycode = DC_DOWLEQ; + rp->r_wday = lp->l_value; + rp->r_dayofmonth = len_months[1][rp->r_month]; + } else { + if ((ep = strchr(dp, '<')) != 0) + rp->r_dycode = DC_DOWLEQ; + else if ((ep = strchr(dp, '>')) != 0) + rp->r_dycode = DC_DOWGEQ; + else { + ep = dp; + rp->r_dycode = DC_DOM; + } + if (rp->r_dycode != DC_DOM) { + *ep++ = 0; + if (*ep++ != '=') { + error(_("invalid day of month")); + free(dp); + return; + } + if ((lp = byword(dp, wday_names)) == NULL) { + error(_("invalid weekday name")); + free(dp); + return; + } + rp->r_wday = lp->l_value; + } + if (sscanf(ep, "%d%c", &rp->r_dayofmonth, &xs) != 1 || + rp->r_dayofmonth <= 0 || + (rp->r_dayofmonth > len_months[1][rp->r_month])) { + error(_("invalid day of month")); + free(dp); + return; + } + } + free(dp); +} + +static void +convert(const int_fast32_t val, char *const buf) +{ + register int i; + register int shift; + unsigned char *const b = (unsigned char *) buf; + + for (i = 0, shift = 24; i < 4; ++i, shift -= 8) + b[i] = val >> shift; +} + +static void +convert64(const zic_t val, char *const buf) +{ + register int i; + register int shift; + unsigned char *const b = (unsigned char *) buf; + + for (i = 0, shift = 56; i < 8; ++i, shift -= 8) + b[i] = val >> shift; +} + +static void +puttzcode(const int_fast32_t val, FILE *const fp) +{ + char buf[4]; + + convert(val, buf); + fwrite(buf, sizeof buf, 1, fp); +} + +static void +puttzcode64(const zic_t val, FILE *const fp) +{ + char buf[8]; + + convert64(val, buf); + fwrite(buf, sizeof buf, 1, fp); +} + +static int +atcomp(const void *avp, const void *bvp) +{ + const zic_t a = ((const struct attype *) avp)->at; + const zic_t b = ((const struct attype *) bvp)->at; + + return (a < b) ? -1 : (a > b); +} + +static bool +is32(const zic_t x) +{ + return INT32_MIN <= x && x <= INT32_MAX; +} + +static void +writezone(const char *const name, const char *const string, char version) +{ + register FILE * fp; + register int i, j; + register int leapcnt32, leapi32; + register int timecnt32, timei32; + register int pass; + char * fullname; + static const struct tzhead tzh0; + static struct tzhead tzh; + zic_t one = 1; + zic_t y2038_boundary = one << 31; + int nats = timecnt + WORK_AROUND_QTBUG_53071; + zic_t *ats = emalloc(size_product(nats, sizeof *ats + 1)); + void *typesptr = ats + nats; + unsigned char *types = typesptr; + + /* + ** Sort. + */ + if (timecnt > 1) + qsort(attypes, timecnt, sizeof *attypes, atcomp); + /* + ** Optimize. + */ + { + int fromi; + int toi; + + toi = 0; + fromi = 0; + while (fromi < timecnt && attypes[fromi].at < early_time) + ++fromi; + for ( ; fromi < timecnt; ++fromi) { + if (toi > 1 && ((attypes[fromi].at + + gmtoffs[attypes[toi - 1].type]) <= + (attypes[toi - 1].at + + gmtoffs[attypes[toi - 2].type]))) { + attypes[toi - 1].type = + attypes[fromi].type; + continue; + } + if (toi == 0 || + attypes[toi - 1].type != attypes[fromi].type) + attypes[toi++] = attypes[fromi]; + } + timecnt = toi; + } + if (noise && timecnt > 1200) + warning(_("pre-2014 clients may mishandle" + " more than 1200 transition times")); + /* + ** Transfer. + */ + for (i = 0; i < timecnt; ++i) { + ats[i] = attypes[i].at; + types[i] = attypes[i].type; + } + + /* Work around QTBUG-53071 for time stamps less than y2038_boundary - 1, + by inserting a no-op transition at time y2038_boundary - 1. + This works only for timestamps before the boundary, which + should be good enough in practice as QTBUG-53071 should be + long-dead by 2038. */ + if (WORK_AROUND_QTBUG_53071 && timecnt != 0 + && ats[timecnt - 1] < y2038_boundary - 1 && strchr(string, '<')) { + ats[timecnt] = y2038_boundary - 1; + types[timecnt] = types[timecnt - 1]; + timecnt++; + } + + /* + ** Correct for leap seconds. + */ + for (i = 0; i < timecnt; ++i) { + j = leapcnt; + while (--j >= 0) + if (ats[i] > trans[j] - corr[j]) { + ats[i] = tadd(ats[i], corr[j]); + break; + } + } + /* + ** Figure out 32-bit-limited starts and counts. + */ + timecnt32 = timecnt; + timei32 = 0; + leapcnt32 = leapcnt; + leapi32 = 0; + while (timecnt32 > 0 && !is32(ats[timecnt32 - 1])) + --timecnt32; + while (timecnt32 > 0 && !is32(ats[timei32])) { + --timecnt32; + ++timei32; + } + /* + ** Output an INT32_MIN "transition" if appropriate; see below. + */ + if (timei32 > 0 && ats[timei32] > INT32_MIN) { + --timei32; + ++timecnt32; + } + while (leapcnt32 > 0 && !is32(trans[leapcnt32 - 1])) + --leapcnt32; + while (leapcnt32 > 0 && !is32(trans[leapi32])) { + --leapcnt32; + ++leapi32; + } + fullname = relname(directory, name); + /* + ** Remove old file, if any, to snap links. + */ + if (itsdir(fullname) == 0 && remove(fullname) != 0 && errno != ENOENT) { + const char *e = strerror(errno); + + fprintf(stderr, _("%s: Can't remove %s: %s\n"), + progname, fullname, e); + exit(EXIT_FAILURE); + } + if ((fp = fopen(fullname, "wb")) == NULL) { + if (! mkdirs(fullname)) + exit(EXIT_FAILURE); + if ((fp = fopen(fullname, "wb")) == NULL) { + const char *e = strerror(errno); + + fprintf(stderr, _("%s: Can't create %s: %s\n"), + progname, fullname, e); + exit(EXIT_FAILURE); + } + } + for (pass = 1; pass <= 2; ++pass) { + register int thistimei, thistimecnt; + register int thisleapi, thisleapcnt; + register int thistimelim, thisleaplim; + int writetype[TZ_MAX_TYPES]; + int typemap[TZ_MAX_TYPES]; + register int thistypecnt; + char thischars[TZ_MAX_CHARS]; + char thischarcnt; + int indmap[TZ_MAX_CHARS]; + + if (pass == 1) { + thistimei = timei32; + thistimecnt = timecnt32; + thisleapi = leapi32; + thisleapcnt = leapcnt32; + } else { + thistimei = 0; + thistimecnt = timecnt; + thisleapi = 0; + thisleapcnt = leapcnt; + } + thistimelim = thistimei + thistimecnt; + thisleaplim = thisleapi + thisleapcnt; + for (i = 0; i < typecnt; ++i) + writetype[i] = thistimecnt == timecnt; + if (thistimecnt == 0) { + /* + ** No transition times fall in the current + ** (32- or 64-bit) window. + */ + if (typecnt != 0) + writetype[typecnt - 1] = true; + } else { + for (i = thistimei - 1; i < thistimelim; ++i) + if (i >= 0) + writetype[types[i]] = true; + /* + ** For America/Godthab and Antarctica/Palmer + */ + if (thistimei == 0) + writetype[0] = true; + } +#ifndef LEAVE_SOME_PRE_2011_SYSTEMS_IN_THE_LURCH + /* + ** For some pre-2011 systems: if the last-to-be-written + ** standard (or daylight) type has an offset different from the + ** most recently used offset, + ** append an (unused) copy of the most recently used type + ** (to help get global "altzone" and "timezone" variables + ** set correctly). + */ + { + register int mrudst, mrustd, hidst, histd, type; + + hidst = histd = mrudst = mrustd = -1; + for (i = thistimei; i < thistimelim; ++i) + if (isdsts[types[i]]) + mrudst = types[i]; + else mrustd = types[i]; + for (i = 0; i < typecnt; ++i) + if (writetype[i]) { + if (isdsts[i]) + hidst = i; + else histd = i; + } + if (hidst >= 0 && mrudst >= 0 && hidst != mrudst && + gmtoffs[hidst] != gmtoffs[mrudst]) { + isdsts[mrudst] = -1; + type = addtype(gmtoffs[mrudst], + &chars[abbrinds[mrudst]], + true, + ttisstds[mrudst], + ttisgmts[mrudst]); + isdsts[mrudst] = 1; + writetype[type] = true; + } + if (histd >= 0 && mrustd >= 0 && histd != mrustd && + gmtoffs[histd] != gmtoffs[mrustd]) { + isdsts[mrustd] = -1; + type = addtype(gmtoffs[mrustd], + &chars[abbrinds[mrustd]], + false, + ttisstds[mrustd], + ttisgmts[mrustd]); + isdsts[mrustd] = 0; + writetype[type] = true; + } + } +#endif /* !defined LEAVE_SOME_PRE_2011_SYSTEMS_IN_THE_LURCH */ + thistypecnt = 0; + for (i = 0; i < typecnt; ++i) + typemap[i] = writetype[i] ? thistypecnt++ : -1; + for (i = 0; i < sizeof indmap / sizeof indmap[0]; ++i) + indmap[i] = -1; + thischarcnt = 0; + for (i = 0; i < typecnt; ++i) { + register char * thisabbr; + + if (!writetype[i]) + continue; + if (indmap[abbrinds[i]] >= 0) + continue; + thisabbr = &chars[abbrinds[i]]; + for (j = 0; j < thischarcnt; ++j) + if (strcmp(&thischars[j], thisabbr) == 0) + break; + if (j == thischarcnt) { + strcpy(&thischars[(int) thischarcnt], + thisabbr); + thischarcnt += strlen(thisabbr) + 1; + } + indmap[abbrinds[i]] = j; + } +#define DO(field) fwrite(tzh.field, sizeof tzh.field, 1, fp) + tzh = tzh0; + strncpy(tzh.tzh_magic, TZ_MAGIC, sizeof tzh.tzh_magic); + tzh.tzh_version[0] = version; + convert(thistypecnt, tzh.tzh_ttisgmtcnt); + convert(thistypecnt, tzh.tzh_ttisstdcnt); + convert(thisleapcnt, tzh.tzh_leapcnt); + convert(thistimecnt, tzh.tzh_timecnt); + convert(thistypecnt, tzh.tzh_typecnt); + convert(thischarcnt, tzh.tzh_charcnt); + DO(tzh_magic); + DO(tzh_version); + DO(tzh_reserved); + DO(tzh_ttisgmtcnt); + DO(tzh_ttisstdcnt); + DO(tzh_leapcnt); + DO(tzh_timecnt); + DO(tzh_typecnt); + DO(tzh_charcnt); +#undef DO + for (i = thistimei; i < thistimelim; ++i) + if (pass == 1) + /* + ** Output an INT32_MIN "transition" + ** if appropriate; see above. + */ + puttzcode(((ats[i] < INT32_MIN) ? + INT32_MIN : ats[i]), fp); + else puttzcode64(ats[i], fp); + for (i = thistimei; i < thistimelim; ++i) { + unsigned char uc; + + uc = typemap[types[i]]; + fwrite(&uc, sizeof uc, 1, fp); + } + for (i = 0; i < typecnt; ++i) + if (writetype[i]) { + puttzcode(gmtoffs[i], fp); + putc(isdsts[i], fp); + putc((unsigned char) indmap[abbrinds[i]], fp); + } + if (thischarcnt != 0) + fwrite(thischars, sizeof thischars[0], + thischarcnt, fp); + for (i = thisleapi; i < thisleaplim; ++i) { + register zic_t todo; + + if (roll[i]) { + if (timecnt == 0 || trans[i] < ats[0]) { + j = 0; + while (isdsts[j]) + if (++j >= typecnt) { + j = 0; + break; + } + } else { + j = 1; + while (j < timecnt && + trans[i] >= ats[j]) + ++j; + j = types[j - 1]; + } + todo = tadd(trans[i], -gmtoffs[j]); + } else todo = trans[i]; + if (pass == 1) + puttzcode(todo, fp); + else puttzcode64(todo, fp); + puttzcode(corr[i], fp); + } + for (i = 0; i < typecnt; ++i) + if (writetype[i]) + putc(ttisstds[i], fp); + for (i = 0; i < typecnt; ++i) + if (writetype[i]) + putc(ttisgmts[i], fp); + } + fprintf(fp, "\n%s\n", string); + close_file(fp, fullname); + free(ats); + free(fullname); +} + +static char const * +abbroffset(char *buf, zic_t offset) +{ + char sign = '+'; + int seconds, minutes; + + if (offset < 0) { + offset = -offset; + sign = '-'; + } + + seconds = offset % SECSPERMIN; + offset /= SECSPERMIN; + minutes = offset % MINSPERHOUR; + offset /= MINSPERHOUR; + if (100 <= offset) { + error(_("%%z UTC offset magnitude exceeds 99:59:59")); + return "%z"; + } else { + char *p = buf; + *p++ = sign; + *p++ = '0' + offset / 10; + *p++ = '0' + offset % 10; + if (minutes | seconds) { + *p++ = '0' + minutes / 10; + *p++ = '0' + minutes % 10; + if (seconds) { + *p++ = '0' + seconds / 10; + *p++ = '0' + seconds % 10; + } + } + *p = '\0'; + return buf; + } +} + +static size_t +doabbr(char *abbr, struct zone const *zp, char const *letters, + zic_t stdoff, bool doquotes) +{ + register char * cp; + register char * slashp; + register size_t len; + char const *format = zp->z_format; + + slashp = strchr(format, '/'); + if (slashp == NULL) { + char letterbuf[PERCENT_Z_LEN_BOUND + 1]; + if (zp->z_format_specifier == 'z') + letters = abbroffset(letterbuf, zp->z_gmtoff + stdoff); + else if (!letters) + letters = "%s"; + sprintf(abbr, format, letters); + } else if (stdoff != 0) { + strcpy(abbr, slashp + 1); + } else { + memcpy(abbr, format, slashp - format); + abbr[slashp - format] = '\0'; + } + len = strlen(abbr); + if (!doquotes) + return len; + for (cp = abbr; is_alpha(*cp); cp++) + continue; + if (len > 0 && *cp == '\0') + return len; + abbr[len + 2] = '\0'; + abbr[len + 1] = '>'; + memmove(abbr + 1, abbr, len); + abbr[0] = '<'; + return len + 2; +} + +static void +updateminmax(const zic_t x) +{ + if (min_year > x) + min_year = x; + if (max_year < x) + max_year = x; +} + +static int +stringoffset(char *result, zic_t offset) +{ + register int hours; + register int minutes; + register int seconds; + bool negative = offset < 0; + int len = negative; + + if (negative) { + offset = -offset; + result[0] = '-'; + } + seconds = offset % SECSPERMIN; + offset /= SECSPERMIN; + minutes = offset % MINSPERHOUR; + offset /= MINSPERHOUR; + hours = offset; + if (hours >= HOURSPERDAY * DAYSPERWEEK) { + result[0] = '\0'; + return 0; + } + len += sprintf(result + len, "%d", hours); + if (minutes != 0 || seconds != 0) { + len += sprintf(result + len, ":%02d", minutes); + if (seconds != 0) + len += sprintf(result + len, ":%02d", seconds); + } + return len; +} + +static int +stringrule(char *result, const struct rule *const rp, const zic_t dstoff, + const zic_t gmtoff) +{ + register zic_t tod = rp->r_tod; + register int compat = 0; + + if (rp->r_dycode == DC_DOM) { + register int month, total; + + if (rp->r_dayofmonth == 29 && rp->r_month == TM_FEBRUARY) + return -1; + total = 0; + for (month = 0; month < rp->r_month; ++month) + total += len_months[0][month]; + /* Omit the "J" in Jan and Feb, as that's shorter. */ + if (rp->r_month <= 1) + result += sprintf(result, "%d", total + rp->r_dayofmonth - 1); + else + result += sprintf(result, "J%d", total + rp->r_dayofmonth); + } else { + register int week; + register int wday = rp->r_wday; + register int wdayoff; + + if (rp->r_dycode == DC_DOWGEQ) { + wdayoff = (rp->r_dayofmonth - 1) % DAYSPERWEEK; + if (wdayoff) + compat = 2013; + wday -= wdayoff; + tod += wdayoff * SECSPERDAY; + week = 1 + (rp->r_dayofmonth - 1) / DAYSPERWEEK; + } else if (rp->r_dycode == DC_DOWLEQ) { + if (rp->r_dayofmonth == len_months[1][rp->r_month]) + week = 5; + else { + wdayoff = rp->r_dayofmonth % DAYSPERWEEK; + if (wdayoff) + compat = 2013; + wday -= wdayoff; + tod += wdayoff * SECSPERDAY; + week = rp->r_dayofmonth / DAYSPERWEEK; + } + } else return -1; /* "cannot happen" */ + if (wday < 0) + wday += DAYSPERWEEK; + result += sprintf(result, "M%d.%d.%d", + rp->r_month + 1, week, wday); + } + if (rp->r_todisgmt) + tod += gmtoff; + if (rp->r_todisstd && rp->r_stdoff == 0) + tod += dstoff; + if (tod != 2 * SECSPERMIN * MINSPERHOUR) { + *result++ = '/'; + if (! stringoffset(result, tod)) + return -1; + if (tod < 0) { + if (compat < 2013) + compat = 2013; + } else if (SECSPERDAY <= tod) { + if (compat < 1994) + compat = 1994; + } + } + return compat; +} + +static int +rule_cmp(struct rule const *a, struct rule const *b) +{ + if (!a) + return -!!b; + if (!b) + return 1; + if (a->r_hiyear != b->r_hiyear) + return a->r_hiyear < b->r_hiyear ? -1 : 1; + if (a->r_month - b->r_month != 0) + return a->r_month - b->r_month; + return a->r_dayofmonth - b->r_dayofmonth; +} + +enum { YEAR_BY_YEAR_ZONE = 1 }; + +static int +stringzone(char *result, const struct zone *const zpfirst, const int zonecount) +{ + register const struct zone * zp; + register struct rule * rp; + register struct rule * stdrp; + register struct rule * dstrp; + register int i; + register const char * abbrvar; + register int compat = 0; + register int c; + size_t len; + int offsetlen; + struct rule stdr, dstr; + + result[0] = '\0'; + zp = zpfirst + zonecount - 1; + stdrp = dstrp = NULL; + for (i = 0; i < zp->z_nrules; ++i) { + rp = &zp->z_rules[i]; + if (rp->r_hiwasnum || rp->r_hiyear != ZIC_MAX) + continue; + if (rp->r_yrtype != NULL) + continue; + if (rp->r_stdoff == 0) { + if (stdrp == NULL) + stdrp = rp; + else return -1; + } else { + if (dstrp == NULL) + dstrp = rp; + else return -1; + } + } + if (stdrp == NULL && dstrp == NULL) { + /* + ** There are no rules running through "max". + ** Find the latest std rule in stdabbrrp + ** and latest rule of any type in stdrp. + */ + register struct rule *stdabbrrp = NULL; + for (i = 0; i < zp->z_nrules; ++i) { + rp = &zp->z_rules[i]; + if (rp->r_stdoff == 0 && rule_cmp(stdabbrrp, rp) < 0) + stdabbrrp = rp; + if (rule_cmp(stdrp, rp) < 0) + stdrp = rp; + } + /* + ** Horrid special case: if year is 2037, + ** presume this is a zone handled on a year-by-year basis; + ** do not try to apply a rule to the zone. + */ + if (stdrp != NULL && stdrp->r_hiyear == 2037) + return YEAR_BY_YEAR_ZONE; + + if (stdrp != NULL && stdrp->r_stdoff != 0) { + /* Perpetual DST. */ + dstr.r_month = TM_JANUARY; + dstr.r_dycode = DC_DOM; + dstr.r_dayofmonth = 1; + dstr.r_tod = 0; + dstr.r_todisstd = dstr.r_todisgmt = false; + dstr.r_stdoff = stdrp->r_stdoff; + dstr.r_abbrvar = stdrp->r_abbrvar; + stdr.r_month = TM_DECEMBER; + stdr.r_dycode = DC_DOM; + stdr.r_dayofmonth = 31; + stdr.r_tod = SECSPERDAY + stdrp->r_stdoff; + stdr.r_todisstd = stdr.r_todisgmt = false; + stdr.r_stdoff = 0; + stdr.r_abbrvar + = (stdabbrrp ? stdabbrrp->r_abbrvar : ""); + dstrp = &dstr; + stdrp = &stdr; + } + } + if (stdrp == NULL && (zp->z_nrules != 0 || zp->z_stdoff != 0)) + return -1; + abbrvar = (stdrp == NULL) ? "" : stdrp->r_abbrvar; + len = doabbr(result, zp, abbrvar, 0, true); + offsetlen = stringoffset(result + len, -zp->z_gmtoff); + if (! offsetlen) { + result[0] = '\0'; + return -1; + } + len += offsetlen; + if (dstrp == NULL) + return compat; + len += doabbr(result + len, zp, dstrp->r_abbrvar, dstrp->r_stdoff, true); + if (dstrp->r_stdoff != SECSPERMIN * MINSPERHOUR) { + offsetlen = stringoffset(result + len, + -(zp->z_gmtoff + dstrp->r_stdoff)); + if (! offsetlen) { + result[0] = '\0'; + return -1; + } + len += offsetlen; + } + result[len++] = ','; + c = stringrule(result + len, dstrp, dstrp->r_stdoff, zp->z_gmtoff); + if (c < 0) { + result[0] = '\0'; + return -1; + } + if (compat < c) + compat = c; + len += strlen(result + len); + result[len++] = ','; + c = stringrule(result + len, stdrp, dstrp->r_stdoff, zp->z_gmtoff); + if (c < 0) { + result[0] = '\0'; + return -1; + } + if (compat < c) + compat = c; + return compat; +} + +static void +outzone(const struct zone *zpfirst, int zonecount) +{ + register const struct zone * zp; + register struct rule * rp; + register int i, j; + register bool usestart, useuntil; + register zic_t starttime, untiltime; + register zic_t gmtoff; + register zic_t stdoff; + register zic_t year; + register zic_t startoff; + register bool startttisstd; + register bool startttisgmt; + register int type; + register char * startbuf; + register char * ab; + register char * envvar; + register int max_abbr_len; + register int max_envvar_len; + register bool prodstic; /* all rules are min to max */ + register int compat; + register bool do_extend; + register char version; + + max_abbr_len = 2 + max_format_len + max_abbrvar_len; + max_envvar_len = 2 * max_abbr_len + 5 * 9; + startbuf = emalloc(max_abbr_len + 1); + ab = emalloc(max_abbr_len + 1); + envvar = emalloc(max_envvar_len + 1); + INITIALIZE(untiltime); + INITIALIZE(starttime); + /* + ** Now. . .finally. . .generate some useful data! + */ + timecnt = 0; + typecnt = 0; + charcnt = 0; + prodstic = zonecount == 1; + /* + ** Thanks to Earl Chew + ** for noting the need to unconditionally initialize startttisstd. + */ + startttisstd = false; + startttisgmt = false; + min_year = max_year = EPOCH_YEAR; + if (leapseen) { + updateminmax(leapminyear); + updateminmax(leapmaxyear + (leapmaxyear < ZIC_MAX)); + } + for (i = 0; i < zonecount; ++i) { + zp = &zpfirst[i]; + if (i < zonecount - 1) + updateminmax(zp->z_untilrule.r_loyear); + for (j = 0; j < zp->z_nrules; ++j) { + rp = &zp->z_rules[j]; + if (rp->r_lowasnum) + updateminmax(rp->r_loyear); + if (rp->r_hiwasnum) + updateminmax(rp->r_hiyear); + if (rp->r_lowasnum || rp->r_hiwasnum) + prodstic = false; + } + } + /* + ** Generate lots of data if a rule can't cover all future times. + */ + compat = stringzone(envvar, zpfirst, zonecount); + version = compat < 2013 ? ZIC_VERSION_PRE_2013 : ZIC_VERSION; + do_extend = compat < 0 || compat == YEAR_BY_YEAR_ZONE; + if (noise) { + if (!*envvar) + warning("%s %s", + _("no POSIX environment variable for zone"), + zpfirst->z_name); + else if (compat != 0 && compat != YEAR_BY_YEAR_ZONE) { + /* Circa-COMPAT clients, and earlier clients, might + not work for this zone when given dates before + 1970 or after 2038. */ + warning(_("%s: pre-%d clients may mishandle" + " distant timestamps"), + zpfirst->z_name, compat); + } + } + if (do_extend) { + /* + ** Search through a couple of extra years past the obvious + ** 400, to avoid edge cases. For example, suppose a non-POSIX + ** rule applies from 2012 onwards and has transitions in March + ** and September, plus some one-off transitions in November + ** 2013. If zic looked only at the last 400 years, it would + ** set max_year=2413, with the intent that the 400 years 2014 + ** through 2413 will be repeated. The last transition listed + ** in the tzfile would be in 2413-09, less than 400 years + ** after the last one-off transition in 2013-11. Two years + ** might be overkill, but with the kind of edge cases + ** available we're not sure that one year would suffice. + */ + enum { years_of_observations = YEARSPERREPEAT + 2 }; + + if (min_year >= ZIC_MIN + years_of_observations) + min_year -= years_of_observations; + else min_year = ZIC_MIN; + if (max_year <= ZIC_MAX - years_of_observations) + max_year += years_of_observations; + else max_year = ZIC_MAX; + /* + ** Regardless of any of the above, + ** for a "proDSTic" zone which specifies that its rules + ** always have and always will be in effect, + ** we only need one cycle to define the zone. + */ + if (prodstic) { + min_year = 1900; + max_year = min_year + years_of_observations; + } + } + /* + ** For the benefit of older systems, + ** generate data from 1900 through 2037. + */ + if (min_year > 1900) + min_year = 1900; + if (max_year < 2037) + max_year = 2037; + for (i = 0; i < zonecount; ++i) { + /* + ** A guess that may well be corrected later. + */ + stdoff = 0; + zp = &zpfirst[i]; + usestart = i > 0 && (zp - 1)->z_untiltime > early_time; + useuntil = i < (zonecount - 1); + if (useuntil && zp->z_untiltime <= early_time) + continue; + gmtoff = zp->z_gmtoff; + eat(zp->z_filename, zp->z_linenum); + *startbuf = '\0'; + startoff = zp->z_gmtoff; + if (zp->z_nrules == 0) { + stdoff = zp->z_stdoff; + doabbr(startbuf, zp, NULL, stdoff, false); + type = addtype(oadd(zp->z_gmtoff, stdoff), + startbuf, stdoff != 0, startttisstd, + startttisgmt); + if (usestart) { + addtt(starttime, type); + usestart = false; + } else addtt(early_time, type); + } else for (year = min_year; year <= max_year; ++year) { + if (useuntil && year > zp->z_untilrule.r_hiyear) + break; + /* + ** Mark which rules to do in the current year. + ** For those to do, calculate rpytime(rp, year); + */ + for (j = 0; j < zp->z_nrules; ++j) { + rp = &zp->z_rules[j]; + eats(zp->z_filename, zp->z_linenum, + rp->r_filename, rp->r_linenum); + rp->r_todo = year >= rp->r_loyear && + year <= rp->r_hiyear && + yearistype(year, rp->r_yrtype); + if (rp->r_todo) + rp->r_temp = rpytime(rp, year); + } + for ( ; ; ) { + register int k; + register zic_t jtime, ktime; + register zic_t offset; + + INITIALIZE(ktime); + if (useuntil) { + /* + ** Turn untiltime into UT + ** assuming the current gmtoff and + ** stdoff values. + */ + untiltime = zp->z_untiltime; + if (!zp->z_untilrule.r_todisgmt) + untiltime = tadd(untiltime, + -gmtoff); + if (!zp->z_untilrule.r_todisstd) + untiltime = tadd(untiltime, + -stdoff); + } + /* + ** Find the rule (of those to do, if any) + ** that takes effect earliest in the year. + */ + k = -1; + for (j = 0; j < zp->z_nrules; ++j) { + rp = &zp->z_rules[j]; + if (!rp->r_todo) + continue; + eats(zp->z_filename, zp->z_linenum, + rp->r_filename, rp->r_linenum); + offset = rp->r_todisgmt ? 0 : gmtoff; + if (!rp->r_todisstd) + offset = oadd(offset, stdoff); + jtime = rp->r_temp; + if (jtime == min_time || + jtime == max_time) + continue; + jtime = tadd(jtime, -offset); + if (k < 0 || jtime < ktime) { + k = j; + ktime = jtime; + } else if (jtime == ktime) { + char const *dup_rules_msg = + _("two rules for same instant"); + eats(zp->z_filename, zp->z_linenum, + rp->r_filename, rp->r_linenum); + warning("%s", dup_rules_msg); + rp = &zp->z_rules[k]; + eats(zp->z_filename, zp->z_linenum, + rp->r_filename, rp->r_linenum); + error("%s", dup_rules_msg); + } + } + if (k < 0) + break; /* go on to next year */ + rp = &zp->z_rules[k]; + rp->r_todo = false; + if (useuntil && ktime >= untiltime) + break; + stdoff = rp->r_stdoff; + if (usestart && ktime == starttime) + usestart = false; + if (usestart) { + if (ktime < starttime) { + startoff = oadd(zp->z_gmtoff, + stdoff); + doabbr(startbuf, zp, + rp->r_abbrvar, + rp->r_stdoff, + false); + continue; + } + if (*startbuf == '\0' && + startoff == oadd(zp->z_gmtoff, + stdoff)) { + doabbr(startbuf, + zp, + rp->r_abbrvar, + rp->r_stdoff, + false); + } + } + eats(zp->z_filename, zp->z_linenum, + rp->r_filename, rp->r_linenum); + doabbr(ab, zp, rp->r_abbrvar, + rp->r_stdoff, false); + offset = oadd(zp->z_gmtoff, rp->r_stdoff); + type = addtype(offset, ab, rp->r_stdoff != 0, + rp->r_todisstd, rp->r_todisgmt); + addtt(ktime, type); + } + } + if (usestart) { + if (*startbuf == '\0' && + zp->z_format != NULL && + strchr(zp->z_format, '%') == NULL && + strchr(zp->z_format, '/') == NULL) + strcpy(startbuf, zp->z_format); + eat(zp->z_filename, zp->z_linenum); + if (*startbuf == '\0') +error(_("can't determine time zone abbreviation to use just after until time")); + else addtt(starttime, + addtype(startoff, startbuf, + startoff != zp->z_gmtoff, + startttisstd, + startttisgmt)); + } + /* + ** Now we may get to set starttime for the next zone line. + */ + if (useuntil) { + startttisstd = zp->z_untilrule.r_todisstd; + startttisgmt = zp->z_untilrule.r_todisgmt; + starttime = zp->z_untiltime; + if (!startttisstd) + starttime = tadd(starttime, -stdoff); + if (!startttisgmt) + starttime = tadd(starttime, -gmtoff); + } + } + if (do_extend) { + /* + ** If we're extending the explicitly listed observations + ** for 400 years because we can't fill the POSIX-TZ field, + ** check whether we actually ended up explicitly listing + ** observations through that period. If there aren't any + ** near the end of the 400-year period, add a redundant + ** one at the end of the final year, to make it clear + ** that we are claiming to have definite knowledge of + ** the lack of transitions up to that point. + */ + struct rule xr; + struct attype *lastat; + xr.r_month = TM_JANUARY; + xr.r_dycode = DC_DOM; + xr.r_dayofmonth = 1; + xr.r_tod = 0; + for (lastat = &attypes[0], i = 1; i < timecnt; i++) + if (attypes[i].at > lastat->at) + lastat = &attypes[i]; + if (lastat->at < rpytime(&xr, max_year - 1)) { + /* + ** Create new type code for the redundant entry, + ** to prevent it being optimized away. + */ + if (typecnt >= TZ_MAX_TYPES) { + error(_("too many local time types")); + exit(EXIT_FAILURE); + } + gmtoffs[typecnt] = gmtoffs[lastat->type]; + isdsts[typecnt] = isdsts[lastat->type]; + ttisstds[typecnt] = ttisstds[lastat->type]; + ttisgmts[typecnt] = ttisgmts[lastat->type]; + abbrinds[typecnt] = abbrinds[lastat->type]; + ++typecnt; + addtt(rpytime(&xr, max_year + 1), typecnt-1); + } + } + writezone(zpfirst->z_name, envvar, version); + free(startbuf); + free(ab); + free(envvar); +} + +static void +addtt(zic_t starttime, int type) +{ + if (starttime <= early_time + || (timecnt == 1 && attypes[0].at < early_time)) { + gmtoffs[0] = gmtoffs[type]; + isdsts[0] = isdsts[type]; + ttisstds[0] = ttisstds[type]; + ttisgmts[0] = ttisgmts[type]; + if (abbrinds[type] != 0) + strcpy(chars, &chars[abbrinds[type]]); + abbrinds[0] = 0; + charcnt = strlen(chars) + 1; + typecnt = 1; + timecnt = 0; + type = 0; + } + attypes = growalloc(attypes, sizeof *attypes, timecnt, &timecnt_alloc); + attypes[timecnt].at = starttime; + attypes[timecnt].type = type; + ++timecnt; +} + +static int +addtype(zic_t gmtoff, char const *abbr, bool isdst, bool ttisstd, bool ttisgmt) +{ + register int i, j; + + /* + ** See if there's already an entry for this zone type. + ** If so, just return its index. + */ + for (i = 0; i < typecnt; ++i) { + if (gmtoff == gmtoffs[i] && isdst == isdsts[i] && + strcmp(abbr, &chars[abbrinds[i]]) == 0 && + ttisstd == ttisstds[i] && + ttisgmt == ttisgmts[i]) + return i; + } + /* + ** There isn't one; add a new one, unless there are already too + ** many. + */ + if (typecnt >= TZ_MAX_TYPES) { + error(_("too many local time types")); + exit(EXIT_FAILURE); + } + if (! (-1L - 2147483647L <= gmtoff && gmtoff <= 2147483647L)) { + error(_("UT offset out of range")); + exit(EXIT_FAILURE); + } + gmtoffs[i] = gmtoff; + isdsts[i] = isdst; + ttisstds[i] = ttisstd; + ttisgmts[i] = ttisgmt; + + for (j = 0; j < charcnt; ++j) + if (strcmp(&chars[j], abbr) == 0) + break; + if (j == charcnt) + newabbr(abbr); + abbrinds[i] = j; + ++typecnt; + return i; +} + +static void +leapadd(zic_t t, bool positive, int rolling, int count) +{ + register int i, j; + + if (leapcnt + (positive ? count : 1) > TZ_MAX_LEAPS) { + error(_("too many leap seconds")); + exit(EXIT_FAILURE); + } + for (i = 0; i < leapcnt; ++i) + if (t <= trans[i]) { + if (t == trans[i]) { + error(_("repeated leap second moment")); + exit(EXIT_FAILURE); + } + break; + } + do { + for (j = leapcnt; j > i; --j) { + trans[j] = trans[j - 1]; + corr[j] = corr[j - 1]; + roll[j] = roll[j - 1]; + } + trans[i] = t; + corr[i] = positive ? 1 : -count; + roll[i] = rolling; + ++leapcnt; + } while (positive && --count != 0); +} + +static void +adjleap(void) +{ + register int i; + register zic_t last = 0; + + /* + ** propagate leap seconds forward + */ + for (i = 0; i < leapcnt; ++i) { + trans[i] = tadd(trans[i], last); + last = corr[i] += last; + } +} + +static bool +yearistype(int year, const char *type) +{ + static char * buf; + int result; + + if (type == NULL || *type == '\0') + return true; + buf = erealloc(buf, 132 + strlen(yitcommand) + strlen(type)); + sprintf(buf, "%s %d %s", yitcommand, year, type); + result = system(buf); + if (WIFEXITED(result)) switch (WEXITSTATUS(result)) { + case 0: + return true; + case 1: + return false; + } + error(_("Wild result from command execution")); + fprintf(stderr, _("%s: command was '%s', result was %d\n"), + progname, buf, result); + for ( ; ; ) + exit(EXIT_FAILURE); +} + +/* Is A a space character in the C locale? */ +static bool +is_space(char a) +{ + switch (a) { + default: + return false; + case ' ': case '\f': case '\n': case '\r': case '\t': case '\v': + return true; + } +} + +/* Is A an alphabetic character in the C locale? */ +static bool +is_alpha(char a) +{ + switch (a) { + default: + return false; + case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': case 'G': + case 'H': case 'I': case 'J': case 'K': case 'L': case 'M': case 'N': + case 'O': case 'P': case 'Q': case 'R': case 'S': case 'T': case 'U': + case 'V': case 'W': case 'X': case 'Y': case 'Z': + case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': case 'g': + case 'h': case 'i': case 'j': case 'k': case 'l': case 'm': case 'n': + case 'o': case 'p': case 'q': case 'r': case 's': case 't': case 'u': + case 'v': case 'w': case 'x': case 'y': case 'z': + return true; + } +} + +/* If A is an uppercase character in the C locale, return its lowercase + counterpart. Otherwise, return A. */ +static char +lowerit(char a) +{ + switch (a) { + default: return a; + case 'A': return 'a'; case 'B': return 'b'; case 'C': return 'c'; + case 'D': return 'd'; case 'E': return 'e'; case 'F': return 'f'; + case 'G': return 'g'; case 'H': return 'h'; case 'I': return 'i'; + case 'J': return 'j'; case 'K': return 'k'; case 'L': return 'l'; + case 'M': return 'm'; case 'N': return 'n'; case 'O': return 'o'; + case 'P': return 'p'; case 'Q': return 'q'; case 'R': return 'r'; + case 'S': return 's'; case 'T': return 't'; case 'U': return 'u'; + case 'V': return 'v'; case 'W': return 'w'; case 'X': return 'x'; + case 'Y': return 'y'; case 'Z': return 'z'; + } +} + +/* case-insensitive equality */ +static ATTRIBUTE_PURE bool +ciequal(register const char *ap, register const char *bp) +{ + while (lowerit(*ap) == lowerit(*bp++)) + if (*ap++ == '\0') + return true; + return false; +} + +static ATTRIBUTE_PURE bool +itsabbr(register const char *abbr, register const char *word) +{ + if (lowerit(*abbr) != lowerit(*word)) + return false; + ++word; + while (*++abbr != '\0') + do { + if (*word == '\0') + return false; + } while (lowerit(*word++) != lowerit(*abbr)); + return true; +} + +static ATTRIBUTE_PURE const struct lookup * +byword(const char *word, const struct lookup *table) +{ + register const struct lookup * foundlp; + register const struct lookup * lp; + + if (word == NULL || table == NULL) + return NULL; + /* + ** Look for exact match. + */ + for (lp = table; lp->l_word != NULL; ++lp) + if (ciequal(word, lp->l_word)) + return lp; + /* + ** Look for inexact match. + */ + foundlp = NULL; + for (lp = table; lp->l_word != NULL; ++lp) + if (itsabbr(word, lp->l_word)) { + if (foundlp == NULL) + foundlp = lp; + else return NULL; /* multiple inexact matches */ + } + return foundlp; +} + +static char ** +getfields(register char *cp) +{ + register char * dp; + register char ** array; + register int nsubs; + + if (cp == NULL) + return NULL; + array = emalloc(size_product(strlen(cp) + 1, sizeof *array)); + nsubs = 0; + for ( ; ; ) { + while (is_space(*cp)) + ++cp; + if (*cp == '\0' || *cp == '#') + break; + array[nsubs++] = dp = cp; + do { + if ((*dp = *cp++) != '"') + ++dp; + else while ((*dp = *cp++) != '"') + if (*dp != '\0') + ++dp; + else { + error(_( + "Odd number of quotation marks" + )); + exit(1); + } + } while (*cp && *cp != '#' && !is_space(*cp)); + if (is_space(*cp)) + ++cp; + *dp = '\0'; + } + array[nsubs] = NULL; + return array; +} + +static _Noreturn void +time_overflow(void) +{ + error(_("time overflow")); + exit(EXIT_FAILURE); +} + +static ATTRIBUTE_PURE zic_t +oadd(zic_t t1, zic_t t2) +{ + if (t1 < 0 ? t2 < ZIC_MIN - t1 : ZIC_MAX - t1 < t2) + time_overflow(); + return t1 + t2; +} + +static ATTRIBUTE_PURE zic_t +tadd(zic_t t1, zic_t t2) +{ + if (t1 < 0) { + if (t2 < min_time - t1) { + if (t1 != min_time) + time_overflow(); + return min_time; + } + } else { + if (max_time - t1 < t2) { + if (t1 != max_time) + time_overflow(); + return max_time; + } + } + return t1 + t2; +} + +/* +** Given a rule, and a year, compute the date (in seconds since January 1, +** 1970, 00:00 LOCAL time) in that year that the rule refers to. +*/ + +static zic_t +rpytime(const struct rule *rp, zic_t wantedy) +{ + register int m, i; + register zic_t dayoff; /* with a nod to Margaret O. */ + register zic_t t, y; + + if (wantedy == ZIC_MIN) + return min_time; + if (wantedy == ZIC_MAX) + return max_time; + dayoff = 0; + m = TM_JANUARY; + y = EPOCH_YEAR; + while (wantedy != y) { + if (wantedy > y) { + i = len_years[isleap(y)]; + ++y; + } else { + --y; + i = -len_years[isleap(y)]; + } + dayoff = oadd(dayoff, i); + } + while (m != rp->r_month) { + i = len_months[isleap(y)][m]; + dayoff = oadd(dayoff, i); + ++m; + } + i = rp->r_dayofmonth; + if (m == TM_FEBRUARY && i == 29 && !isleap(y)) { + if (rp->r_dycode == DC_DOWLEQ) + --i; + else { + error(_("use of 2/29 in non leap-year")); + exit(EXIT_FAILURE); + } + } + --i; + dayoff = oadd(dayoff, i); + if (rp->r_dycode == DC_DOWGEQ || rp->r_dycode == DC_DOWLEQ) { + register zic_t wday; + +#define LDAYSPERWEEK ((zic_t) DAYSPERWEEK) + wday = EPOCH_WDAY; + /* + ** Don't trust mod of negative numbers. + */ + if (dayoff >= 0) + wday = (wday + dayoff) % LDAYSPERWEEK; + else { + wday -= ((-dayoff) % LDAYSPERWEEK); + if (wday < 0) + wday += LDAYSPERWEEK; + } + while (wday != rp->r_wday) + if (rp->r_dycode == DC_DOWGEQ) { + dayoff = oadd(dayoff, 1); + if (++wday >= LDAYSPERWEEK) + wday = 0; + ++i; + } else { + dayoff = oadd(dayoff, -1); + if (--wday < 0) + wday = LDAYSPERWEEK - 1; + --i; + } + if (i < 0 || i >= len_months[isleap(y)][m]) { + if (noise) + warning(_("rule goes past start/end of month; \ +will not work with pre-2004 versions of zic")); + } + } + if (dayoff < min_time / SECSPERDAY) + return min_time; + if (dayoff > max_time / SECSPERDAY) + return max_time; + t = (zic_t) dayoff * SECSPERDAY; + return tadd(t, rp->r_tod); +} + +static void +newabbr(const char *string) +{ + register int i; + + if (strcmp(string, GRANDPARENTED) != 0) { + register const char * cp; + const char * mp; + + cp = string; + mp = NULL; + while (is_alpha(*cp) || ('0' <= *cp && *cp <= '9') + || *cp == '-' || *cp == '+') + ++cp; + if (noise && cp - string < 3) + mp = _("time zone abbreviation has fewer than 3 characters"); + if (cp - string > ZIC_MAX_ABBR_LEN_WO_WARN) + mp = _("time zone abbreviation has too many characters"); + if (*cp != '\0') +mp = _("time zone abbreviation differs from POSIX standard"); + if (mp != NULL) + warning("%s (%s)", mp, string); + } + i = strlen(string) + 1; + if (charcnt + i > TZ_MAX_CHARS) { + error(_("too many, or too long, time zone abbreviations")); + exit(EXIT_FAILURE); + } + strcpy(&chars[charcnt], string); + charcnt += i; +} + +static bool +mkdirs(char *argname) +{ + register char * name; + register char * cp; + + if (argname == NULL || *argname == '\0') + return true; + cp = name = ecpyalloc(argname); + while ((cp = strchr(cp + 1, '/')) != 0) { + *cp = '\0'; +#ifdef HAVE_DOS_FILE_NAMES + /* + ** DOS drive specifier? + */ + if (is_alpha(name[0]) && name[1] == ':' && name[2] == '\0') { + *cp = '/'; + continue; + } +#endif + /* + ** Try to create it. It's OK if creation fails because + ** the directory already exists, perhaps because some + ** other process just created it. + */ + if (mkdir(name, MKDIR_UMASK) != 0) { + int err = errno; + if (itsdir(name) <= 0) { + char const *e = strerror(err); + warning(_("%s: Can't create directory" + " %s: %s"), + progname, name, e); + free(name); + return false; + } + } + *cp = '/'; + } + free(name); + return true; +} diff --git a/tz/zone.tab b/tz/zone.tab new file mode 100644 index 0000000..bf1bb71 --- /dev/null +++ b/tz/zone.tab @@ -0,0 +1,445 @@ +# tz zone descriptions (deprecated version) +# +# This file is in the public domain, so clarified as of +# 2009-05-17 by Arthur David Olson. +# +# From Paul Eggert (2014-07-31): +# This file is intended as a backward-compatibility aid for older programs. +# New programs should use zone1970.tab. This file is like zone1970.tab (see +# zone1970.tab's comments), but with the following additional restrictions: +# +# 1. This file contains only ASCII characters. +# 2. The first data column contains exactly one country code. +# +# Because of (2), each row stands for an area that is the intersection +# of a region identified by a country code and of a zone where civil +# clocks have agreed since 1970; this is a narrower definition than +# that of zone1970.tab. +# +# This table is intended as an aid for users, to help them select time +# zone data entries appropriate for their practical needs. It is not +# intended to take or endorse any position on legal or territorial claims. +# +#country- +#code coordinates TZ comments +AD +4230+00131 Europe/Andorra +AE +2518+05518 Asia/Dubai +AF +3431+06912 Asia/Kabul +AG +1703-06148 America/Antigua +AI +1812-06304 America/Anguilla +AL +4120+01950 Europe/Tirane +AM +4011+04430 Asia/Yerevan +AO -0848+01314 Africa/Luanda +AQ -7750+16636 Antarctica/McMurdo New Zealand time - McMurdo, South Pole +AQ -6617+11031 Antarctica/Casey Casey +AQ -6835+07758 Antarctica/Davis Davis +AQ -6640+14001 Antarctica/DumontDUrville Dumont-d'Urville +AQ -6736+06253 Antarctica/Mawson Mawson +AQ -6448-06406 Antarctica/Palmer Palmer +AQ -6734-06808 Antarctica/Rothera Rothera +AQ -690022+0393524 Antarctica/Syowa Syowa +AQ -720041+0023206 Antarctica/Troll Troll +AQ -7824+10654 Antarctica/Vostok Vostok +AR -3436-05827 America/Argentina/Buenos_Aires Buenos Aires (BA, CF) +AR -3124-06411 America/Argentina/Cordoba Argentina (most areas: CB, CC, CN, ER, FM, MN, SE, SF) +AR -2447-06525 America/Argentina/Salta Salta (SA, LP, NQ, RN) +AR -2411-06518 America/Argentina/Jujuy Jujuy (JY) +AR -2649-06513 America/Argentina/Tucuman Tucuman (TM) +AR -2828-06547 America/Argentina/Catamarca Catamarca (CT); Chubut (CH) +AR -2926-06651 America/Argentina/La_Rioja La Rioja (LR) +AR -3132-06831 America/Argentina/San_Juan San Juan (SJ) +AR -3253-06849 America/Argentina/Mendoza Mendoza (MZ) +AR -3319-06621 America/Argentina/San_Luis San Luis (SL) +AR -5138-06913 America/Argentina/Rio_Gallegos Santa Cruz (SC) +AR -5448-06818 America/Argentina/Ushuaia Tierra del Fuego (TF) +AS -1416-17042 Pacific/Pago_Pago +AT +4813+01620 Europe/Vienna +AU -3133+15905 Australia/Lord_Howe Lord Howe Island +AU -5430+15857 Antarctica/Macquarie Macquarie Island +AU -4253+14719 Australia/Hobart Tasmania (most areas) +AU -3956+14352 Australia/Currie Tasmania (King Island) +AU -3749+14458 Australia/Melbourne Victoria +AU -3352+15113 Australia/Sydney New South Wales (most areas) +AU -3157+14127 Australia/Broken_Hill New South Wales (Yancowinna) +AU -2728+15302 Australia/Brisbane Queensland (most areas) +AU -2016+14900 Australia/Lindeman Queensland (Whitsunday Islands) +AU -3455+13835 Australia/Adelaide South Australia +AU -1228+13050 Australia/Darwin Northern Territory +AU -3157+11551 Australia/Perth Western Australia (most areas) +AU -3143+12852 Australia/Eucla Western Australia (Eucla) +AW +1230-06958 America/Aruba +AX +6006+01957 Europe/Mariehamn +AZ +4023+04951 Asia/Baku +BA +4352+01825 Europe/Sarajevo +BB +1306-05937 America/Barbados +BD +2343+09025 Asia/Dhaka +BE +5050+00420 Europe/Brussels +BF +1222-00131 Africa/Ouagadougou +BG +4241+02319 Europe/Sofia +BH +2623+05035 Asia/Bahrain +BI -0323+02922 Africa/Bujumbura +BJ +0629+00237 Africa/Porto-Novo +BL +1753-06251 America/St_Barthelemy +BM +3217-06446 Atlantic/Bermuda +BN +0456+11455 Asia/Brunei +BO -1630-06809 America/La_Paz +BQ +120903-0681636 America/Kralendijk +BR -0351-03225 America/Noronha Atlantic islands +BR -0127-04829 America/Belem Para (east); Amapa +BR -0343-03830 America/Fortaleza Brazil (northeast: MA, PI, CE, RN, PB) +BR -0803-03454 America/Recife Pernambuco +BR -0712-04812 America/Araguaina Tocantins +BR -0940-03543 America/Maceio Alagoas, Sergipe +BR -1259-03831 America/Bahia Bahia +BR -2332-04637 America/Sao_Paulo Brazil (southeast: GO, DF, MG, ES, RJ, SP, PR, SC, RS) +BR -2027-05437 America/Campo_Grande Mato Grosso do Sul +BR -1535-05605 America/Cuiaba Mato Grosso +BR -0226-05452 America/Santarem Para (west) +BR -0846-06354 America/Porto_Velho Rondonia +BR +0249-06040 America/Boa_Vista Roraima +BR -0308-06001 America/Manaus Amazonas (east) +BR -0640-06952 America/Eirunepe Amazonas (west) +BR -0958-06748 America/Rio_Branco Acre +BS +2505-07721 America/Nassau +BT +2728+08939 Asia/Thimphu +BW -2439+02555 Africa/Gaborone +BY +5354+02734 Europe/Minsk +BZ +1730-08812 America/Belize +CA +4734-05243 America/St_Johns Newfoundland; Labrador (southeast) +CA +4439-06336 America/Halifax Atlantic - NS (most areas); PE +CA +4612-05957 America/Glace_Bay Atlantic - NS (Cape Breton) +CA +4606-06447 America/Moncton Atlantic - New Brunswick +CA +5320-06025 America/Goose_Bay Atlantic - Labrador (most areas) +CA +5125-05707 America/Blanc-Sablon AST - QC (Lower North Shore) +CA +4339-07923 America/Toronto Eastern - ON, QC (most areas) +CA +4901-08816 America/Nipigon Eastern - ON, QC (no DST 1967-73) +CA +4823-08915 America/Thunder_Bay Eastern - ON (Thunder Bay) +CA +6344-06828 America/Iqaluit Eastern - NU (most east areas) +CA +6608-06544 America/Pangnirtung Eastern - NU (Pangnirtung) +CA +484531-0913718 America/Atikokan EST - ON (Atikokan); NU (Coral H) +CA +4953-09709 America/Winnipeg Central - ON (west); Manitoba +CA +4843-09434 America/Rainy_River Central - ON (Rainy R, Ft Frances) +CA +744144-0944945 America/Resolute Central - NU (Resolute) +CA +624900-0920459 America/Rankin_Inlet Central - NU (central) +CA +5024-10439 America/Regina CST - SK (most areas) +CA +5017-10750 America/Swift_Current CST - SK (midwest) +CA +5333-11328 America/Edmonton Mountain - AB; BC (E); SK (W) +CA +690650-1050310 America/Cambridge_Bay Mountain - NU (west) +CA +6227-11421 America/Yellowknife Mountain - NT (central) +CA +682059-1334300 America/Inuvik Mountain - NT (west) +CA +4906-11631 America/Creston MST - BC (Creston) +CA +5946-12014 America/Dawson_Creek MST - BC (Dawson Cr, Ft St John) +CA +5848-12242 America/Fort_Nelson MST - BC (Ft Nelson) +CA +4916-12307 America/Vancouver Pacific - BC (most areas) +CA +6043-13503 America/Whitehorse Pacific - Yukon (south) +CA +6404-13925 America/Dawson Pacific - Yukon (north) +CC -1210+09655 Indian/Cocos +CD -0418+01518 Africa/Kinshasa Dem. Rep. of Congo (west) +CD -1140+02728 Africa/Lubumbashi Dem. Rep. of Congo (east) +CF +0422+01835 Africa/Bangui +CG -0416+01517 Africa/Brazzaville +CH +4723+00832 Europe/Zurich +CI +0519-00402 Africa/Abidjan +CK -2114-15946 Pacific/Rarotonga +CL -3327-07040 America/Santiago Chile (most areas) +CL -2709-10926 Pacific/Easter Easter Island +CM +0403+00942 Africa/Douala +CN +3114+12128 Asia/Shanghai Beijing Time +CN +4348+08735 Asia/Urumqi Xinjiang Time +CO +0436-07405 America/Bogota +CR +0956-08405 America/Costa_Rica +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 +CZ +5005+01426 Europe/Prague +DE +5230+01322 Europe/Berlin Germany (most areas) +DE +4742+00841 Europe/Busingen Busingen +DJ +1136+04309 Africa/Djibouti +DK +5540+01235 Europe/Copenhagen +DM +1518-06124 America/Dominica +DO +1828-06954 America/Santo_Domingo +DZ +3647+00303 Africa/Algiers +EC -0210-07950 America/Guayaquil Ecuador (mainland) +EC -0054-08936 Pacific/Galapagos Galapagos Islands +EE +5925+02445 Europe/Tallinn +EG +3003+03115 Africa/Cairo +EH +2709-01312 Africa/El_Aaiun +ER +1520+03853 Africa/Asmara +ES +4024-00341 Europe/Madrid Spain (mainland) +ES +3553-00519 Africa/Ceuta Ceuta, Melilla +ES +2806-01524 Atlantic/Canary Canary Islands +ET +0902+03842 Africa/Addis_Ababa +FI +6010+02458 Europe/Helsinki +FJ -1808+17825 Pacific/Fiji +FK -5142-05751 Atlantic/Stanley +FM +0725+15147 Pacific/Chuuk Chuuk/Truk, Yap +FM +0658+15813 Pacific/Pohnpei Pohnpei/Ponape +FM +0519+16259 Pacific/Kosrae Kosrae +FO +6201-00646 Atlantic/Faroe +FR +4852+00220 Europe/Paris +GA +0023+00927 Africa/Libreville +GB +513030-0000731 Europe/London +GD +1203-06145 America/Grenada +GE +4143+04449 Asia/Tbilisi +GF +0456-05220 America/Cayenne +GG +4927-00232 Europe/Guernsey +GH +0533-00013 Africa/Accra +GI +3608-00521 Europe/Gibraltar +GL +6411-05144 America/Godthab Greenland (most areas) +GL +7646-01840 America/Danmarkshavn National Park (east coast) +GL +7029-02158 America/Scoresbysund Scoresbysund/Ittoqqortoormiit +GL +7634-06847 America/Thule Thule/Pituffik +GM +1328-01639 Africa/Banjul +GN +0931-01343 Africa/Conakry +GP +1614-06132 America/Guadeloupe +GQ +0345+00847 Africa/Malabo +GR +3758+02343 Europe/Athens +GS -5416-03632 Atlantic/South_Georgia +GT +1438-09031 America/Guatemala +GU +1328+14445 Pacific/Guam +GW +1151-01535 Africa/Bissau +GY +0648-05810 America/Guyana +HK +2217+11409 Asia/Hong_Kong +HN +1406-08713 America/Tegucigalpa +HR +4548+01558 Europe/Zagreb +HT +1832-07220 America/Port-au-Prince +HU +4730+01905 Europe/Budapest +ID -0610+10648 Asia/Jakarta Java, Sumatra +ID -0002+10920 Asia/Pontianak Borneo (west, central) +ID -0507+11924 Asia/Makassar Borneo (east, south); Sulawesi/Celebes, Bali, Nusa Tengarra; Timor (west) +ID -0232+14042 Asia/Jayapura New Guinea (West Papua / Irian Jaya); Malukus/Moluccas +IE +5320-00615 Europe/Dublin +IL +314650+0351326 Asia/Jerusalem +IM +5409-00428 Europe/Isle_of_Man +IN +2232+08822 Asia/Kolkata +IO -0720+07225 Indian/Chagos +IQ +3321+04425 Asia/Baghdad +IR +3540+05126 Asia/Tehran +IS +6409-02151 Atlantic/Reykjavik +IT +4154+01229 Europe/Rome +JE +4912-00207 Europe/Jersey +JM +175805-0764736 America/Jamaica +JO +3157+03556 Asia/Amman +JP +353916+1394441 Asia/Tokyo +KE -0117+03649 Africa/Nairobi +KG +4254+07436 Asia/Bishkek +KH +1133+10455 Asia/Phnom_Penh +KI +0125+17300 Pacific/Tarawa Gilbert Islands +KI -0308-17105 Pacific/Enderbury Phoenix Islands +KI +0152-15720 Pacific/Kiritimati Line Islands +KM -1141+04316 Indian/Comoro +KN +1718-06243 America/St_Kitts +KP +3901+12545 Asia/Pyongyang +KR +3733+12658 Asia/Seoul +KW +2920+04759 Asia/Kuwait +KY +1918-08123 America/Cayman +KZ +4315+07657 Asia/Almaty Kazakhstan (most areas) +KZ +4448+06528 Asia/Qyzylorda Qyzylorda/Kyzylorda/Kzyl-Orda +KZ +5017+05710 Asia/Aqtobe Aqtobe/Aktobe +KZ +4431+05016 Asia/Aqtau Atyrau/Atirau/Gur'yev, Mangghystau/Mankistau +KZ +5113+05121 Asia/Oral West Kazakhstan +LA +1758+10236 Asia/Vientiane +LB +3353+03530 Asia/Beirut +LC +1401-06100 America/St_Lucia +LI +4709+00931 Europe/Vaduz +LK +0656+07951 Asia/Colombo +LR +0618-01047 Africa/Monrovia +LS -2928+02730 Africa/Maseru +LT +5441+02519 Europe/Vilnius +LU +4936+00609 Europe/Luxembourg +LV +5657+02406 Europe/Riga +LY +3254+01311 Africa/Tripoli +MA +3339-00735 Africa/Casablanca +MC +4342+00723 Europe/Monaco +MD +4700+02850 Europe/Chisinau +ME +4226+01916 Europe/Podgorica +MF +1804-06305 America/Marigot +MG -1855+04731 Indian/Antananarivo +MH +0709+17112 Pacific/Majuro Marshall Islands (most areas) +MH +0905+16720 Pacific/Kwajalein Kwajalein +MK +4159+02126 Europe/Skopje +ML +1239-00800 Africa/Bamako +MM +1647+09610 Asia/Rangoon +MN +4755+10653 Asia/Ulaanbaatar Mongolia (most areas) +MN +4801+09139 Asia/Hovd Bayan-Olgiy, Govi-Altai, Hovd, Uvs, Zavkhan +MN +4804+11430 Asia/Choibalsan Dornod, Sukhbaatar +MO +2214+11335 Asia/Macau +MP +1512+14545 Pacific/Saipan +MQ +1436-06105 America/Martinique +MR +1806-01557 Africa/Nouakchott +MS +1643-06213 America/Montserrat +MT +3554+01431 Europe/Malta +MU -2010+05730 Indian/Mauritius +MV +0410+07330 Indian/Maldives +MW -1547+03500 Africa/Blantyre +MX +1924-09909 America/Mexico_City Central Time +MX +2105-08646 America/Cancun Eastern Standard Time - Quintana Roo +MX +2058-08937 America/Merida Central Time - Campeche, Yucatan +MX +2540-10019 America/Monterrey Central Time - Durango; Coahuila, Nuevo Leon, Tamaulipas (most areas) +MX +2550-09730 America/Matamoros Central Time US - Coahuila, Nuevo Leon, Tamaulipas (US border) +MX +2313-10625 America/Mazatlan Mountain Time - Baja California Sur, Nayarit, Sinaloa +MX +2838-10605 America/Chihuahua Mountain Time - Chihuahua (most areas) +MX +2934-10425 America/Ojinaga Mountain Time US - Chihuahua (US border) +MX +2904-11058 America/Hermosillo Mountain Standard Time - Sonora +MX +3232-11701 America/Tijuana Pacific Time US - Baja California +MX +2048-10515 America/Bahia_Banderas Central Time - Bahia de Banderas +MY +0310+10142 Asia/Kuala_Lumpur Malaysia (peninsula) +MY +0133+11020 Asia/Kuching Sabah, Sarawak +MZ -2558+03235 Africa/Maputo +NA -2234+01706 Africa/Windhoek +NC -2216+16627 Pacific/Noumea +NE +1331+00207 Africa/Niamey +NF -2903+16758 Pacific/Norfolk +NG +0627+00324 Africa/Lagos +NI +1209-08617 America/Managua +NL +5222+00454 Europe/Amsterdam +NO +5955+01045 Europe/Oslo +NP +2743+08519 Asia/Kathmandu +NR -0031+16655 Pacific/Nauru +NU -1901-16955 Pacific/Niue +NZ -3652+17446 Pacific/Auckland New Zealand (most areas) +NZ -4357-17633 Pacific/Chatham Chatham Islands +OM +2336+05835 Asia/Muscat +PA +0858-07932 America/Panama +PE -1203-07703 America/Lima +PF -1732-14934 Pacific/Tahiti Society Islands +PF -0900-13930 Pacific/Marquesas Marquesas Islands +PF -2308-13457 Pacific/Gambier Gambier Islands +PG -0930+14710 Pacific/Port_Moresby Papua New Guinea (most areas) +PG -0613+15534 Pacific/Bougainville Bougainville +PH +1435+12100 Asia/Manila +PK +2452+06703 Asia/Karachi +PL +5215+02100 Europe/Warsaw +PM +4703-05620 America/Miquelon +PN -2504-13005 Pacific/Pitcairn +PR +182806-0660622 America/Puerto_Rico +PS +3130+03428 Asia/Gaza Gaza Strip +PS +313200+0350542 Asia/Hebron West Bank +PT +3843-00908 Europe/Lisbon Portugal (mainland) +PT +3238-01654 Atlantic/Madeira Madeira Islands +PT +3744-02540 Atlantic/Azores Azores +PW +0720+13429 Pacific/Palau +PY -2516-05740 America/Asuncion +QA +2517+05132 Asia/Qatar +RE -2052+05528 Indian/Reunion +RO +4426+02606 Europe/Bucharest +RS +4450+02030 Europe/Belgrade +RU +5443+02030 Europe/Kaliningrad MSK-01 - Kaliningrad +RU +554521+0373704 Europe/Moscow MSK+00 - Moscow area +RU +4457+03406 Europe/Simferopol MSK+00 - Crimea +RU +4844+04425 Europe/Volgograd MSK+00 - Volgograd, Saratov +RU +5836+04939 Europe/Kirov MSK+00 - Kirov +RU +4621+04803 Europe/Astrakhan MSK+01 - Astrakhan +RU +5312+05009 Europe/Samara MSK+01 - Samara, Udmurtia +RU +5420+04824 Europe/Ulyanovsk MSK+01 - Ulyanovsk +RU +5651+06036 Asia/Yekaterinburg MSK+02 - Urals +RU +5500+07324 Asia/Omsk MSK+03 - Omsk +RU +5502+08255 Asia/Novosibirsk MSK+03 - Novosibirsk +RU +5322+08345 Asia/Barnaul MSK+04 - Altai +RU +5630+08458 Asia/Tomsk MSK+04 - Tomsk +RU +5345+08707 Asia/Novokuznetsk MSK+04 - Kemerovo +RU +5601+09250 Asia/Krasnoyarsk MSK+04 - Krasnoyarsk area +RU +5216+10420 Asia/Irkutsk MSK+05 - Irkutsk, Buryatia +RU +5203+11328 Asia/Chita MSK+06 - Zabaykalsky +RU +6200+12940 Asia/Yakutsk MSK+06 - Lena River +RU +623923+1353314 Asia/Khandyga MSK+06 - Tomponsky, Ust-Maysky +RU +4310+13156 Asia/Vladivostok MSK+07 - Amur River +RU +643337+1431336 Asia/Ust-Nera MSK+07 - Oymyakonsky +RU +5934+15048 Asia/Magadan MSK+08 - Magadan +RU +4658+14242 Asia/Sakhalin MSK+08 - Sakhalin Island +RU +6728+15343 Asia/Srednekolymsk MSK+08 - Sakha (E); North Kuril Is +RU +5301+15839 Asia/Kamchatka MSK+09 - Kamchatka +RU +6445+17729 Asia/Anadyr MSK+09 - Bering Sea +RW -0157+03004 Africa/Kigali +SA +2438+04643 Asia/Riyadh +SB -0932+16012 Pacific/Guadalcanal +SC -0440+05528 Indian/Mahe +SD +1536+03232 Africa/Khartoum +SE +5920+01803 Europe/Stockholm +SG +0117+10351 Asia/Singapore +SH -1555-00542 Atlantic/St_Helena +SI +4603+01431 Europe/Ljubljana +SJ +7800+01600 Arctic/Longyearbyen +SK +4809+01707 Europe/Bratislava +SL +0830-01315 Africa/Freetown +SM +4355+01228 Europe/San_Marino +SN +1440-01726 Africa/Dakar +SO +0204+04522 Africa/Mogadishu +SR +0550-05510 America/Paramaribo +SS +0451+03136 Africa/Juba +ST +0020+00644 Africa/Sao_Tome +SV +1342-08912 America/El_Salvador +SX +180305-0630250 America/Lower_Princes +SY +3330+03618 Asia/Damascus +SZ -2618+03106 Africa/Mbabane +TC +2128-07108 America/Grand_Turk +TD +1207+01503 Africa/Ndjamena +TF -492110+0701303 Indian/Kerguelen +TG +0608+00113 Africa/Lome +TH +1345+10031 Asia/Bangkok +TJ +3835+06848 Asia/Dushanbe +TK -0922-17114 Pacific/Fakaofo +TL -0833+12535 Asia/Dili +TM +3757+05823 Asia/Ashgabat +TN +3648+01011 Africa/Tunis +TO -2110-17510 Pacific/Tongatapu +TR +4101+02858 Europe/Istanbul +TT +1039-06131 America/Port_of_Spain +TV -0831+17913 Pacific/Funafuti +TW +2503+12130 Asia/Taipei +TZ -0648+03917 Africa/Dar_es_Salaam +UA +5026+03031 Europe/Kiev Ukraine (most areas) +UA +4837+02218 Europe/Uzhgorod Ruthenia +UA +4750+03510 Europe/Zaporozhye Zaporozh'ye/Zaporizhia; Lugansk/Luhansk (east) +UG +0019+03225 Africa/Kampala +UM +1645-16931 Pacific/Johnston Johnston Atoll +UM +2813-17722 Pacific/Midway Midway Islands +UM +1917+16637 Pacific/Wake Wake Island +US +404251-0740023 America/New_York Eastern (most areas) +US +421953-0830245 America/Detroit Eastern - MI (most areas) +US +381515-0854534 America/Kentucky/Louisville Eastern - KY (Louisville area) +US +364947-0845057 America/Kentucky/Monticello Eastern - KY (Wayne) +US +394606-0860929 America/Indiana/Indianapolis Eastern - IN (most areas) +US +384038-0873143 America/Indiana/Vincennes Eastern - IN (Da, Du, K, Mn) +US +410305-0863611 America/Indiana/Winamac Eastern - IN (Pulaski) +US +382232-0862041 America/Indiana/Marengo Eastern - IN (Crawford) +US +382931-0871643 America/Indiana/Petersburg Eastern - IN (Pike) +US +384452-0850402 America/Indiana/Vevay Eastern - IN (Switzerland) +US +415100-0873900 America/Chicago Central (most areas) +US +375711-0864541 America/Indiana/Tell_City Central - IN (Perry) +US +411745-0863730 America/Indiana/Knox Central - IN (Starke) +US +450628-0873651 America/Menominee Central - MI (Wisconsin border) +US +470659-1011757 America/North_Dakota/Center Central - ND (Oliver) +US +465042-1012439 America/North_Dakota/New_Salem Central - ND (Morton rural) +US +471551-1014640 America/North_Dakota/Beulah Central - ND (Mercer) +US +394421-1045903 America/Denver Mountain (most areas) +US +433649-1161209 America/Boise Mountain - ID (south); OR (east) +US +332654-1120424 America/Phoenix MST - Arizona (except Navajo) +US +340308-1181434 America/Los_Angeles Pacific +US +611305-1495401 America/Anchorage Alaska (most areas) +US +581807-1342511 America/Juneau Alaska - Juneau area +US +571035-1351807 America/Sitka Alaska - Sitka area +US +550737-1313435 America/Metlakatla Alaska - Annette Island +US +593249-1394338 America/Yakutat Alaska - Yakutat +US +643004-1652423 America/Nome Alaska (west) +US +515248-1763929 America/Adak Aleutian Islands +US +211825-1575130 Pacific/Honolulu Hawaii +UY -3453-05611 America/Montevideo +UZ +3940+06648 Asia/Samarkand Uzbekistan (west) +UZ +4120+06918 Asia/Tashkent Uzbekistan (east) +VA +415408+0122711 Europe/Vatican +VC +1309-06114 America/St_Vincent +VE +1030-06656 America/Caracas +VG +1827-06437 America/Tortola +VI +1821-06456 America/St_Thomas +VN +1045+10640 Asia/Ho_Chi_Minh +VU -1740+16825 Pacific/Efate +WF -1318-17610 Pacific/Wallis +WS -1350-17144 Pacific/Apia +YE +1245+04512 Asia/Aden +YT -1247+04514 Indian/Mayotte +ZA -2615+02800 Africa/Johannesburg +ZM -1525+02817 Africa/Lusaka +ZW -1750+03103 Africa/Harare diff --git a/tz/zone1970.tab b/tz/zone1970.tab new file mode 100644 index 0000000..49f0b0b --- /dev/null +++ b/tz/zone1970.tab @@ -0,0 +1,376 @@ +# tz zone descriptions +# +# This file is in the public domain. +# +# From Paul Eggert (2014-07-31): +# This file contains a table where each row stands for a zone where +# civil time stamps have agreed since 1970. Columns are separated by +# a single tab. Lines beginning with '#' are comments. All text uses +# UTF-8 encoding. The columns of the table are as follows: +# +# 1. The countries that overlap the zone, as a comma-separated list +# of ISO 3166 2-character country codes. See the file 'iso3166.tab'. +# 2. Latitude and longitude of the zone's principal location +# in ISO 6709 sign-degrees-minutes-seconds format, +# either +-DDMM+-DDDMM or +-DDMMSS+-DDDMMSS, +# first latitude (+ is north), then longitude (+ is east). +# 3. Zone name used in value of TZ environment variable. +# Please see the 'Theory' file for how zone names are chosen. +# If multiple zones overlap a country, each has a row in the +# table, with each column 1 containing the country code. +# 4. Comments; present if and only if a country has multiple zones. +# +# If a zone covers multiple countries, the most-populous city is used, +# and that country is listed first in column 1; any other countries +# are listed alphabetically by country code. The table is sorted +# first by country code, then (if possible) by an order within the +# country that (1) makes some geographical sense, and (2) puts the +# most populous zones first, where that does not contradict (1). +# +# This table is intended as an aid for users, to help them select time +# zone data entries appropriate for their practical needs. It is not +# intended to take or endorse any position on legal or territorial claims. +# +#country- +#codes coordinates TZ comments +AD +4230+00131 Europe/Andorra +AE,OM +2518+05518 Asia/Dubai +AF +3431+06912 Asia/Kabul +AL +4120+01950 Europe/Tirane +AM +4011+04430 Asia/Yerevan +AQ -6617+11031 Antarctica/Casey Casey +AQ -6835+07758 Antarctica/Davis Davis +AQ -6640+14001 Antarctica/DumontDUrville Dumont-d'Urville +AQ -6736+06253 Antarctica/Mawson Mawson +AQ -6448-06406 Antarctica/Palmer Palmer +AQ -6734-06808 Antarctica/Rothera Rothera +AQ -690022+0393524 Antarctica/Syowa Syowa +AQ -720041+0023206 Antarctica/Troll Troll +AQ -7824+10654 Antarctica/Vostok Vostok +AR -3436-05827 America/Argentina/Buenos_Aires Buenos Aires (BA, CF) +AR -3124-06411 America/Argentina/Cordoba Argentina (most areas: CB, CC, CN, ER, FM, MN, SE, SF) +AR -2447-06525 America/Argentina/Salta Salta (SA, LP, NQ, RN) +AR -2411-06518 America/Argentina/Jujuy Jujuy (JY) +AR -2649-06513 America/Argentina/Tucuman Tucumán (TM) +AR -2828-06547 America/Argentina/Catamarca Catamarca (CT); Chubut (CH) +AR -2926-06651 America/Argentina/La_Rioja La Rioja (LR) +AR -3132-06831 America/Argentina/San_Juan San Juan (SJ) +AR -3253-06849 America/Argentina/Mendoza Mendoza (MZ) +AR -3319-06621 America/Argentina/San_Luis San Luis (SL) +AR -5138-06913 America/Argentina/Rio_Gallegos Santa Cruz (SC) +AR -5448-06818 America/Argentina/Ushuaia Tierra del Fuego (TF) +AS,UM -1416-17042 Pacific/Pago_Pago Samoa, Midway +AT +4813+01620 Europe/Vienna +AU -3133+15905 Australia/Lord_Howe Lord Howe Island +AU -5430+15857 Antarctica/Macquarie Macquarie Island +AU -4253+14719 Australia/Hobart Tasmania (most areas) +AU -3956+14352 Australia/Currie Tasmania (King Island) +AU -3749+14458 Australia/Melbourne Victoria +AU -3352+15113 Australia/Sydney New South Wales (most areas) +AU -3157+14127 Australia/Broken_Hill New South Wales (Yancowinna) +AU -2728+15302 Australia/Brisbane Queensland (most areas) +AU -2016+14900 Australia/Lindeman Queensland (Whitsunday Islands) +AU -3455+13835 Australia/Adelaide South Australia +AU -1228+13050 Australia/Darwin Northern Territory +AU -3157+11551 Australia/Perth Western Australia (most areas) +AU -3143+12852 Australia/Eucla Western Australia (Eucla) +AZ +4023+04951 Asia/Baku +BB +1306-05937 America/Barbados +BD +2343+09025 Asia/Dhaka +BE +5050+00420 Europe/Brussels +BG +4241+02319 Europe/Sofia +BM +3217-06446 Atlantic/Bermuda +BN +0456+11455 Asia/Brunei +BO -1630-06809 America/La_Paz +BR -0351-03225 America/Noronha Atlantic islands +BR -0127-04829 America/Belem Pará (east); Amapá +BR -0343-03830 America/Fortaleza Brazil (northeast: MA, PI, CE, RN, PB) +BR -0803-03454 America/Recife Pernambuco +BR -0712-04812 America/Araguaina Tocantins +BR -0940-03543 America/Maceio Alagoas, Sergipe +BR -1259-03831 America/Bahia Bahia +BR -2332-04637 America/Sao_Paulo Brazil (southeast: GO, DF, MG, ES, RJ, SP, PR, SC, RS) +BR -2027-05437 America/Campo_Grande Mato Grosso do Sul +BR -1535-05605 America/Cuiaba Mato Grosso +BR -0226-05452 America/Santarem Pará (west) +BR -0846-06354 America/Porto_Velho Rondônia +BR +0249-06040 America/Boa_Vista Roraima +BR -0308-06001 America/Manaus Amazonas (east) +BR -0640-06952 America/Eirunepe Amazonas (west) +BR -0958-06748 America/Rio_Branco Acre +BS +2505-07721 America/Nassau +BT +2728+08939 Asia/Thimphu +BY +5354+02734 Europe/Minsk +BZ +1730-08812 America/Belize +CA +4734-05243 America/St_Johns Newfoundland; Labrador (southeast) +CA +4439-06336 America/Halifax Atlantic - NS (most areas); PE +CA +4612-05957 America/Glace_Bay Atlantic - NS (Cape Breton) +CA +4606-06447 America/Moncton Atlantic - New Brunswick +CA +5320-06025 America/Goose_Bay Atlantic - Labrador (most areas) +CA +5125-05707 America/Blanc-Sablon AST - QC (Lower North Shore) +CA +4339-07923 America/Toronto Eastern - ON, QC (most areas) +CA +4901-08816 America/Nipigon Eastern - ON, QC (no DST 1967-73) +CA +4823-08915 America/Thunder_Bay Eastern - ON (Thunder Bay) +CA +6344-06828 America/Iqaluit Eastern - NU (most east areas) +CA +6608-06544 America/Pangnirtung Eastern - NU (Pangnirtung) +CA +484531-0913718 America/Atikokan EST - ON (Atikokan); NU (Coral H) +CA +4953-09709 America/Winnipeg Central - ON (west); Manitoba +CA +4843-09434 America/Rainy_River Central - ON (Rainy R, Ft Frances) +CA +744144-0944945 America/Resolute Central - NU (Resolute) +CA +624900-0920459 America/Rankin_Inlet Central - NU (central) +CA +5024-10439 America/Regina CST - SK (most areas) +CA +5017-10750 America/Swift_Current CST - SK (midwest) +CA +5333-11328 America/Edmonton Mountain - AB; BC (E); SK (W) +CA +690650-1050310 America/Cambridge_Bay Mountain - NU (west) +CA +6227-11421 America/Yellowknife Mountain - NT (central) +CA +682059-1334300 America/Inuvik Mountain - NT (west) +CA +4906-11631 America/Creston MST - BC (Creston) +CA +5946-12014 America/Dawson_Creek MST - BC (Dawson Cr, Ft St John) +CA +5848-12242 America/Fort_Nelson MST - BC (Ft Nelson) +CA +4916-12307 America/Vancouver Pacific - BC (most areas) +CA +6043-13503 America/Whitehorse Pacific - Yukon (south) +CA +6404-13925 America/Dawson Pacific - Yukon (north) +CC -1210+09655 Indian/Cocos +CH,DE,LI +4723+00832 Europe/Zurich Swiss time +CI,BF,GM,GN,ML,MR,SH,SL,SN,ST,TG +0519-00402 Africa/Abidjan +CK -2114-15946 Pacific/Rarotonga +CL -3327-07040 America/Santiago Chile (most areas) +CL -2709-10926 Pacific/Easter Easter Island +CN +3114+12128 Asia/Shanghai Beijing Time +CN +4348+08735 Asia/Urumqi Xinjiang Time +CO +0436-07405 America/Bogota +CR +0956-08405 America/Costa_Rica +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 +CZ,SK +5005+01426 Europe/Prague +DE +5230+01322 Europe/Berlin Germany (most areas) +DK +5540+01235 Europe/Copenhagen +DO +1828-06954 America/Santo_Domingo +DZ +3647+00303 Africa/Algiers +EC -0210-07950 America/Guayaquil Ecuador (mainland) +EC -0054-08936 Pacific/Galapagos Galápagos Islands +EE +5925+02445 Europe/Tallinn +EG +3003+03115 Africa/Cairo +EH +2709-01312 Africa/El_Aaiun +ES +4024-00341 Europe/Madrid Spain (mainland) +ES +3553-00519 Africa/Ceuta Ceuta, Melilla +ES +2806-01524 Atlantic/Canary Canary Islands +FI,AX +6010+02458 Europe/Helsinki +FJ -1808+17825 Pacific/Fiji +FK -5142-05751 Atlantic/Stanley +FM +0725+15147 Pacific/Chuuk Chuuk/Truk, Yap +FM +0658+15813 Pacific/Pohnpei Pohnpei/Ponape +FM +0519+16259 Pacific/Kosrae Kosrae +FO +6201-00646 Atlantic/Faroe +FR +4852+00220 Europe/Paris +GB,GG,IM,JE +513030-0000731 Europe/London +GE +4143+04449 Asia/Tbilisi +GF +0456-05220 America/Cayenne +GH +0533-00013 Africa/Accra +GI +3608-00521 Europe/Gibraltar +GL +6411-05144 America/Godthab Greenland (most areas) +GL +7646-01840 America/Danmarkshavn National Park (east coast) +GL +7029-02158 America/Scoresbysund Scoresbysund/Ittoqqortoormiit +GL +7634-06847 America/Thule Thule/Pituffik +GR +3758+02343 Europe/Athens +GS -5416-03632 Atlantic/South_Georgia +GT +1438-09031 America/Guatemala +GU,MP +1328+14445 Pacific/Guam +GW +1151-01535 Africa/Bissau +GY +0648-05810 America/Guyana +HK +2217+11409 Asia/Hong_Kong +HN +1406-08713 America/Tegucigalpa +HT +1832-07220 America/Port-au-Prince +HU +4730+01905 Europe/Budapest +ID -0610+10648 Asia/Jakarta Java, Sumatra +ID -0002+10920 Asia/Pontianak Borneo (west, central) +ID -0507+11924 Asia/Makassar Borneo (east, south); Sulawesi/Celebes, Bali, Nusa Tengarra; Timor (west) +ID -0232+14042 Asia/Jayapura New Guinea (West Papua / Irian Jaya); Malukus/Moluccas +IE +5320-00615 Europe/Dublin +IL +314650+0351326 Asia/Jerusalem +IN +2232+08822 Asia/Kolkata +IO -0720+07225 Indian/Chagos +IQ +3321+04425 Asia/Baghdad +IR +3540+05126 Asia/Tehran +IS +6409-02151 Atlantic/Reykjavik +IT,SM,VA +4154+01229 Europe/Rome +JM +175805-0764736 America/Jamaica +JO +3157+03556 Asia/Amman +JP +353916+1394441 Asia/Tokyo +KE,DJ,ER,ET,KM,MG,SO,TZ,UG,YT -0117+03649 Africa/Nairobi +KG +4254+07436 Asia/Bishkek +KI +0125+17300 Pacific/Tarawa Gilbert Islands +KI -0308-17105 Pacific/Enderbury Phoenix Islands +KI +0152-15720 Pacific/Kiritimati Line Islands +KP +3901+12545 Asia/Pyongyang +KR +3733+12658 Asia/Seoul +KZ +4315+07657 Asia/Almaty Kazakhstan (most areas) +KZ +4448+06528 Asia/Qyzylorda Qyzylorda/Kyzylorda/Kzyl-Orda +KZ +5017+05710 Asia/Aqtobe Aqtobe/Aktobe +KZ +4431+05016 Asia/Aqtau Atyrau/Atirau/Gur'yev, Mangghystau/Mankistau +KZ +5113+05121 Asia/Oral West Kazakhstan +LB +3353+03530 Asia/Beirut +LK +0656+07951 Asia/Colombo +LR +0618-01047 Africa/Monrovia +LT +5441+02519 Europe/Vilnius +LU +4936+00609 Europe/Luxembourg +LV +5657+02406 Europe/Riga +LY +3254+01311 Africa/Tripoli +MA +3339-00735 Africa/Casablanca +MC +4342+00723 Europe/Monaco +MD +4700+02850 Europe/Chisinau +MH +0709+17112 Pacific/Majuro Marshall Islands (most areas) +MH +0905+16720 Pacific/Kwajalein Kwajalein +MM +1647+09610 Asia/Rangoon +MN +4755+10653 Asia/Ulaanbaatar Mongolia (most areas) +MN +4801+09139 Asia/Hovd Bayan-Ölgii, Govi-Altai, Hovd, Uvs, Zavkhan +MN +4804+11430 Asia/Choibalsan Dornod, Sükhbaatar +MO +2214+11335 Asia/Macau +MQ +1436-06105 America/Martinique +MT +3554+01431 Europe/Malta +MU -2010+05730 Indian/Mauritius +MV +0410+07330 Indian/Maldives +MX +1924-09909 America/Mexico_City Central Time +MX +2105-08646 America/Cancun Eastern Standard Time - Quintana Roo +MX +2058-08937 America/Merida Central Time - Campeche, Yucatán +MX +2540-10019 America/Monterrey Central Time - Durango; Coahuila, Nuevo León, Tamaulipas (most areas) +MX +2550-09730 America/Matamoros Central Time US - Coahuila, Nuevo León, Tamaulipas (US border) +MX +2313-10625 America/Mazatlan Mountain Time - Baja California Sur, Nayarit, Sinaloa +MX +2838-10605 America/Chihuahua Mountain Time - Chihuahua (most areas) +MX +2934-10425 America/Ojinaga Mountain Time US - Chihuahua (US border) +MX +2904-11058 America/Hermosillo Mountain Standard Time - Sonora +MX +3232-11701 America/Tijuana Pacific Time US - Baja California +MX +2048-10515 America/Bahia_Banderas Central Time - Bahía de Banderas +MY +0310+10142 Asia/Kuala_Lumpur Malaysia (peninsula) +MY +0133+11020 Asia/Kuching Sabah, Sarawak +MZ,BI,BW,CD,MW,RW,ZM,ZW -2558+03235 Africa/Maputo Central Africa Time +NA -2234+01706 Africa/Windhoek +NC -2216+16627 Pacific/Noumea +NF -2903+16758 Pacific/Norfolk +NG,AO,BJ,CD,CF,CG,CM,GA,GQ,NE +0627+00324 Africa/Lagos West Africa Time +NI +1209-08617 America/Managua +NL +5222+00454 Europe/Amsterdam +NO,SJ +5955+01045 Europe/Oslo +NP +2743+08519 Asia/Kathmandu +NR -0031+16655 Pacific/Nauru +NU -1901-16955 Pacific/Niue +NZ,AQ -3652+17446 Pacific/Auckland New Zealand time +NZ -4357-17633 Pacific/Chatham Chatham Islands +PA,KY +0858-07932 America/Panama +PE -1203-07703 America/Lima +PF -1732-14934 Pacific/Tahiti Society Islands +PF -0900-13930 Pacific/Marquesas Marquesas Islands +PF -2308-13457 Pacific/Gambier Gambier Islands +PG -0930+14710 Pacific/Port_Moresby Papua New Guinea (most areas) +PG -0613+15534 Pacific/Bougainville Bougainville +PH +1435+12100 Asia/Manila +PK +2452+06703 Asia/Karachi +PL +5215+02100 Europe/Warsaw +PM +4703-05620 America/Miquelon +PN -2504-13005 Pacific/Pitcairn +PR +182806-0660622 America/Puerto_Rico +PS +3130+03428 Asia/Gaza Gaza Strip +PS +313200+0350542 Asia/Hebron West Bank +PT +3843-00908 Europe/Lisbon Portugal (mainland) +PT +3238-01654 Atlantic/Madeira Madeira Islands +PT +3744-02540 Atlantic/Azores Azores +PW +0720+13429 Pacific/Palau +PY -2516-05740 America/Asuncion +QA,BH +2517+05132 Asia/Qatar +RE,TF -2052+05528 Indian/Reunion Réunion, Crozet, Scattered Islands +RO +4426+02606 Europe/Bucharest +RS,BA,HR,ME,MK,SI +4450+02030 Europe/Belgrade +RU +5443+02030 Europe/Kaliningrad MSK-01 - Kaliningrad +RU +554521+0373704 Europe/Moscow MSK+00 - Moscow area +RU +4457+03406 Europe/Simferopol MSK+00 - Crimea +RU +4844+04425 Europe/Volgograd MSK+00 - Volgograd, Saratov +RU +5836+04939 Europe/Kirov MSK+00 - Kirov +RU +4621+04803 Europe/Astrakhan MSK+01 - Astrakhan +RU +5312+05009 Europe/Samara MSK+01 - Samara, Udmurtia +RU +5420+04824 Europe/Ulyanovsk MSK+01 - Ulyanovsk +RU +5651+06036 Asia/Yekaterinburg MSK+02 - Urals +RU +5500+07324 Asia/Omsk MSK+03 - Omsk +RU +5502+08255 Asia/Novosibirsk MSK+03 - Novosibirsk +RU +5322+08345 Asia/Barnaul MSK+04 - Altai +RU +5630+08458 Asia/Tomsk MSK+04 - Tomsk +RU +5345+08707 Asia/Novokuznetsk MSK+04 - Kemerovo +RU +5601+09250 Asia/Krasnoyarsk MSK+04 - Krasnoyarsk area +RU +5216+10420 Asia/Irkutsk MSK+05 - Irkutsk, Buryatia +RU +5203+11328 Asia/Chita MSK+06 - Zabaykalsky +RU +6200+12940 Asia/Yakutsk MSK+06 - Lena River +RU +623923+1353314 Asia/Khandyga MSK+06 - Tomponsky, Ust-Maysky +RU +4310+13156 Asia/Vladivostok MSK+07 - Amur River +RU +643337+1431336 Asia/Ust-Nera MSK+07 - Oymyakonsky +RU +5934+15048 Asia/Magadan MSK+08 - Magadan +RU +4658+14242 Asia/Sakhalin MSK+08 - Sakhalin Island +RU +6728+15343 Asia/Srednekolymsk MSK+08 - Sakha (E); North Kuril Is +RU +5301+15839 Asia/Kamchatka MSK+09 - Kamchatka +RU +6445+17729 Asia/Anadyr MSK+09 - Bering Sea +SA,KW,YE +2438+04643 Asia/Riyadh +SB -0932+16012 Pacific/Guadalcanal +SC -0440+05528 Indian/Mahe +SD,SS +1536+03232 Africa/Khartoum +SE +5920+01803 Europe/Stockholm +SG +0117+10351 Asia/Singapore +SR +0550-05510 America/Paramaribo +SV +1342-08912 America/El_Salvador +SY +3330+03618 Asia/Damascus +TC +2128-07108 America/Grand_Turk +TD +1207+01503 Africa/Ndjamena +TF -492110+0701303 Indian/Kerguelen Kerguelen, St Paul Island, Amsterdam Island +TH,KH,LA,VN +1345+10031 Asia/Bangkok Indochina (most areas) +TJ +3835+06848 Asia/Dushanbe +TK -0922-17114 Pacific/Fakaofo +TL -0833+12535 Asia/Dili +TM +3757+05823 Asia/Ashgabat +TN +3648+01011 Africa/Tunis +TO -2110-17510 Pacific/Tongatapu +TR +4101+02858 Europe/Istanbul +TT,AG,AI,BL,DM,GD,GP,KN,LC,MF,MS,VC,VG,VI +1039-06131 America/Port_of_Spain +TV -0831+17913 Pacific/Funafuti +TW +2503+12130 Asia/Taipei +UA +5026+03031 Europe/Kiev Ukraine (most areas) +UA +4837+02218 Europe/Uzhgorod Ruthenia +UA +4750+03510 Europe/Zaporozhye Zaporozh'ye/Zaporizhia; Lugansk/Luhansk (east) +UM +1917+16637 Pacific/Wake Wake Island +US +404251-0740023 America/New_York Eastern (most areas) +US +421953-0830245 America/Detroit Eastern - MI (most areas) +US +381515-0854534 America/Kentucky/Louisville Eastern - KY (Louisville area) +US +364947-0845057 America/Kentucky/Monticello Eastern - KY (Wayne) +US +394606-0860929 America/Indiana/Indianapolis Eastern - IN (most areas) +US +384038-0873143 America/Indiana/Vincennes Eastern - IN (Da, Du, K, Mn) +US +410305-0863611 America/Indiana/Winamac Eastern - IN (Pulaski) +US +382232-0862041 America/Indiana/Marengo Eastern - IN (Crawford) +US +382931-0871643 America/Indiana/Petersburg Eastern - IN (Pike) +US +384452-0850402 America/Indiana/Vevay Eastern - IN (Switzerland) +US +415100-0873900 America/Chicago Central (most areas) +US +375711-0864541 America/Indiana/Tell_City Central - IN (Perry) +US +411745-0863730 America/Indiana/Knox Central - IN (Starke) +US +450628-0873651 America/Menominee Central - MI (Wisconsin border) +US +470659-1011757 America/North_Dakota/Center Central - ND (Oliver) +US +465042-1012439 America/North_Dakota/New_Salem Central - ND (Morton rural) +US +471551-1014640 America/North_Dakota/Beulah Central - ND (Mercer) +US +394421-1045903 America/Denver Mountain (most areas) +US +433649-1161209 America/Boise Mountain - ID (south); OR (east) +US +332654-1120424 America/Phoenix MST - Arizona (except Navajo) +US +340308-1181434 America/Los_Angeles Pacific +US +611305-1495401 America/Anchorage Alaska (most areas) +US +581807-1342511 America/Juneau Alaska - Juneau area +US +571035-1351807 America/Sitka Alaska - Sitka area +US +550737-1313435 America/Metlakatla Alaska - Annette Island +US +593249-1394338 America/Yakutat Alaska - Yakutat +US +643004-1652423 America/Nome Alaska (west) +US +515248-1763929 America/Adak Aleutian Islands +US,UM +211825-1575130 Pacific/Honolulu Hawaii +UY -3453-05611 America/Montevideo +UZ +3940+06648 Asia/Samarkand Uzbekistan (west) +UZ +4120+06918 Asia/Tashkent Uzbekistan (east) +VE +1030-06656 America/Caracas +VN +1045+10640 Asia/Ho_Chi_Minh Vietnam (south) +VU -1740+16825 Pacific/Efate +WF -1318-17610 Pacific/Wallis +WS -1350-17144 Pacific/Apia +ZA,LS,SZ -2615+02800 Africa/Johannesburg diff --git a/tz/zoneinfo2tdf.pl b/tz/zoneinfo2tdf.pl new file mode 100755 index 0000000..e05ec01 --- /dev/null +++ b/tz/zoneinfo2tdf.pl @@ -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"; +} |