Merge 2018e

Changes to code

    zic now accepts subsecond precision in expressions like
    00:19:32.13, which is approximately the legal time of the
    Netherlands from 1835 to 1937.  However, because it is
    questionable whether the few recorded uses of non-integer offsets
    had subsecond precision in practice, there are no plans for tzdata
    to use this feature.  (Thanks to Steve Allen for pointing out
    the limitations of historical data in this area.)

    The code is a bit more portable to MS-Windows.  Installers can
    compile with -DRESERVE_STD_EXT_IDS on MS-Windows platforms that
    reserve identifiers like 'localtime'.  (Thanks to Manuela
    Friedrich).

  Changes to documentation and commentary

    theory.html now outlines tzdb's extensions to POSIX's model for
    civil time, and has a section "POSIX features no longer needed"
    that lists POSIX API components that are now vestigial.
    (From suggestions by Steve Summit.)  It also better distinguishes
    time zones from tz regions.  (From a suggestion by Guy Harris.)

    Commentary is now more consistent about using the phrase "daylight
    saving time", to match the C name tm_isdst.  Daylight saving time
    need not occur in summer, and need not have a positive offset from
    standard time.

    Commentary about historical transitions in Uruguay has been expanded
    with links to many relevant legal documents.
    (Thanks to Tim Parenti.)

    Commentary now uses some non-ASCII characters with Unicode value
    less than U+0100, as they can be useful and should work even with
    older editors such as XEmacs.
This commit is contained in:
christos 2018-05-04 15:51:00 +00:00
parent ee08ce7d85
commit cfc8dcb49a
16 changed files with 1652 additions and 996 deletions

View File

@ -25,7 +25,8 @@ justification. Citations should use https: URLs if available.
Please submit changes against either the latest release in Please submit changes against either the latest release in
<https://www.iana.org/time-zones> or the master branch of the development <https://www.iana.org/time-zones> or the master branch of the development
repository. If you use Git the following workflow may be helpful: repository. The latter is preferred. If you use Git the following
workflow may be helpful:
* Copy the development repository. * Copy the development repository.
@ -42,6 +43,12 @@ repository. If you use Git the following workflow may be helpful:
git checkout -b mybranch git checkout -b mybranch
* Sleuth by using 'git blame'. For example, when fixing data for
Africa/Sao_Tome, if the command 'git blame africa' outputs a line
'2951fa3b (Paul Eggert 2018-01-08 09:03:13 -0800 1068) Zone
Africa/Sao_Tome 0:26:56 - LMT 1884', commit 2951fa3b should
provide some justification for the 'Zone Africa/Sao_Tome' line.
* Edit source files. Include commentary that justifies the * Edit source files. Include commentary that justifies the
changes by citing reliable sources. changes by citing reliable sources.
@ -67,6 +74,9 @@ repository. If you use Git the following workflow may be helpful:
git send-email master git send-email master
For an archived example of such an email, see
<https://mm.icann.org/pipermail/tz/2018-February/026122.html>.
* Start anew by getting current with the master branch again * Start anew by getting current with the master branch again
(the second step above). (the second step above).

View File

@ -10,9 +10,18 @@ VERSION= unknown
# Email address for bug reports. # Email address for bug reports.
BUGEMAIL= tz@iana.org BUGEMAIL= tz@iana.org
# Choose source data features. To get new features right away, use:
# DATAFORM= vanguard
# To wait a while before using new features, to give downstream users
# time to upgrade zic (the default), use:
# DATAFORM= main
# To wait even longer for new features, use:
# DATAFORM= rearguard
DATAFORM= main
# Change the line below for your time zone (after finding the zone you want in # 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). # 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 # Alternatively, if you discover you've got the wrong time zone, you can just
# zic -l rightzone # zic -l rightzone
# to correct things. # to correct things.
# Use the command # Use the command
@ -25,11 +34,11 @@ LOCALTIME= GMT
# for handling POSIX-style time zone environment variables, # for handling POSIX-style time zone environment variables,
# change the line below (after finding the zone you want in the # change the line below (after finding the zone you want in the
# time zone files, or adding it to a time zone file). # time zone files, or adding it to a time zone file).
# (When a POSIX-style environment variable is handled, the rules in the # 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 # template file are used to determine "spring forward" and "fall back" days and
# times; the environment variable itself specifies UT offsets of standard and # times; the environment variable itself specifies UT offsets of standard and
# summer time.) # daylight saving time.
# Alternately, if you discover you've got the wrong time zone, you can just # Alternatively, if you discover you've got the wrong time zone, you can just
# zic -p rightzone # zic -p rightzone
# to correct things. # to correct things.
# Use the command # Use the command
@ -189,13 +198,18 @@ LDLIBS=
# -DHAVE_STDINT_H if you have a non-C99 compiler with <stdint.h> # -DHAVE_STDINT_H if you have a non-C99 compiler with <stdint.h>
# -DHAVE_STRFTIME_L if <time.h> declares locale_t and strftime_l # -DHAVE_STRFTIME_L if <time.h> declares locale_t and strftime_l
# -DHAVE_STRDUP=0 if your system lacks the strdup function # -DHAVE_STRDUP=0 if your system lacks the strdup function
# -DHAVE_STRTOLL=0 if your system lacks the strtoll function
# -DHAVE_SYMLINK=0 if your system lacks the symlink 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_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_SYS_WAIT_H=0 if your compiler lacks a <sys/wait.h>
# -DHAVE_TZSET=0 if your system lacks a tzset function # -DHAVE_TZSET=0 if your system lacks a tzset function
# -DHAVE_UNISTD_H=0 if your compiler lacks a <unistd.h> # -DHAVE_UNISTD_H=0 if your compiler lacks a <unistd.h>
# -Dlocale_t=XXX if your system uses XXX instead of locale_t # -Dlocale_t=XXX if your system uses XXX instead of locale_t
# -DRESERVE_STD_EXT_IDS if your platform reserves standard identifiers
# with external linkage, e.g., applications cannot define 'localtime'.
# -Dssize_t=long on hosts like MS-Windows that lack ssize_t # -Dssize_t=long on hosts like MS-Windows that lack ssize_t
# -DSUPPRESS_TZDIR to not prepend TZDIR to file names; this has
# security implications and is not recommended for general use
# -DTHREAD_SAFE to make localtime.c thread-safe, as POSIX requires; # -DTHREAD_SAFE to make localtime.c thread-safe, as POSIX requires;
# not needed by the main-program tz code, which is single-threaded. # not needed by the main-program tz code, which is single-threaded.
# Append other compiler flags as needed, e.g., -pthread on GNU/Linux. # Append other compiler flags as needed, e.g., -pthread on GNU/Linux.
@ -222,14 +236,16 @@ GCC_DEBUG_FLAGS = -DGCC_LINT -g3 -O3 -fno-common \
$(GCC_INSTRUMENT) \ $(GCC_INSTRUMENT) \
-Wall -Wextra \ -Wall -Wextra \
-Walloc-size-larger-than=100000 -Warray-bounds=2 \ -Walloc-size-larger-than=100000 -Warray-bounds=2 \
-Wbad-function-cast -Wcast-align -Wdate-time \ -Wbad-function-cast -Wcast-align=strict -Wdate-time \
-Wdeclaration-after-statement -Wdouble-promotion \ -Wdeclaration-after-statement -Wdouble-promotion \
-Wformat=2 -Wformat-overflow=2 -Wformat-signedness -Wformat-truncation \ -Wformat=2 -Wformat-overflow=2 -Wformat-signedness -Wformat-truncation \
-Winit-self -Wjump-misses-init -Wlogical-op \ -Winit-self -Wjump-misses-init -Wlogical-op \
-Wmissing-declarations -Wmissing-prototypes -Wnested-externs \ -Wmissing-declarations -Wmissing-prototypes -Wnested-externs \
-Wold-style-definition -Woverlength-strings -Wpointer-arith \ -Wold-style-definition -Woverlength-strings -Wpointer-arith \
-Wshadow -Wshift-overflow=2 -Wstrict-prototypes -Wstringop-overflow=5 \ -Wshadow -Wshift-overflow=2 -Wstrict-prototypes -Wstringop-overflow=4 \
-Wstringop-truncation -Wsuggest-attribute=cold \
-Wsuggest-attribute=const -Wsuggest-attribute=format \ -Wsuggest-attribute=const -Wsuggest-attribute=format \
-Wsuggest-attribute=malloc \
-Wsuggest-attribute=noreturn -Wsuggest-attribute=pure \ -Wsuggest-attribute=noreturn -Wsuggest-attribute=pure \
-Wtrampolines -Wundef -Wuninitialized -Wunused \ -Wtrampolines -Wundef -Wuninitialized -Wunused \
-Wvariadic-macros -Wvla -Wwrite-strings \ -Wvariadic-macros -Wvla -Wwrite-strings \
@ -394,13 +410,19 @@ SAFE_CHARSET3= 'abcdefghijklmnopqrstuvwxyz{|}~'
SAFE_CHARSET= $(SAFE_CHARSET1)$(SAFE_CHARSET2)$(SAFE_CHARSET3) SAFE_CHARSET= $(SAFE_CHARSET1)$(SAFE_CHARSET2)$(SAFE_CHARSET3)
SAFE_CHAR= '[]'$(SAFE_CHARSET)'-]' SAFE_CHAR= '[]'$(SAFE_CHARSET)'-]'
# Non-ASCII non-letters that OK_CHAR allows, as these characters are
# useful in commentary. XEmacs 21.5.34 displays them correctly,
# presumably because they are Latin-1.
UNUSUAL_OK_CHARSET= °±½¾×
# OK_CHAR matches any character allowed in the distributed files. # OK_CHAR matches any character allowed in the distributed files.
# This is the same as SAFE_CHAR, except that multibyte letters are # This is the same as SAFE_CHAR, except that UNUSUAL_OK_CHARSET and
# also allowed so that commentary can contain people's names and quote # multibyte letters are also allowed so that commentary can contain a
# non-English sources. For non-letters the sources are limited to # few safe symbols and people's names and can quote non-English sources.
# ASCII renderings for the convenience of maintainers whose text editors # Other non-letters are limited to ASCII renderings for the
# mishandle UTF-8 by default (e.g., XEmacs 21.4.22). # convenience of maintainers using XEmacs 21.5.34, which by default
OK_CHAR= '[][:alpha:]'$(SAFE_CHARSET)'-]' # mishandles Unicode characters U+0100 and greater.
OK_CHAR= '[][:alpha:]$(UNUSUAL_OK_CHARSET)'$(SAFE_CHARSET)'-]'
# SAFE_LINE matches a line of safe characters. # SAFE_LINE matches a line of safe characters.
# SAFE_SHARP_LINE is similar, except any OK character can follow '#'; # SAFE_SHARP_LINE is similar, except any OK character can follow '#';
@ -462,10 +484,12 @@ TDATA= $(YDATA) $(NDATA) $(BACKWARD)
ZONETABLES= zone1970.tab zone.tab ZONETABLES= zone1970.tab zone.tab
TABDATA= iso3166.tab $(TZDATA_TEXT) $(ZONETABLES) TABDATA= iso3166.tab $(TZDATA_TEXT) $(ZONETABLES)
LEAP_DEPS= leapseconds.awk leap-seconds.list LEAP_DEPS= leapseconds.awk leap-seconds.list
TZDATA_ZI_DEPS= zishrink.awk version $(TDATA) $(PACKRATDATA) TZDATA_ZI_DEPS= ziguard.awk zishrink.awk version $(TDATA) $(PACKRATDATA)
DSTDATA_ZI_DEPS= ziguard.awk $(TDATA) $(PACKRATDATA)
DATA= $(TDATA_TO_CHECK) backzone iso3166.tab leap-seconds.list \ DATA= $(TDATA_TO_CHECK) backzone iso3166.tab leap-seconds.list \
leapseconds yearistype.sh $(ZONETABLES) leapseconds yearistype.sh $(ZONETABLES)
AWK_SCRIPTS= checklinks.awk checktab.awk leapseconds.awk zishrink.awk AWK_SCRIPTS= checklinks.awk checktab.awk leapseconds.awk \
ziguard.awk zishrink.awk
MISC= $(AWK_SCRIPTS) zoneinfo2tdf.pl MISC= $(AWK_SCRIPTS) zoneinfo2tdf.pl
TZS_YEAR= 2050 TZS_YEAR= 2050
TZS= to$(TZS_YEAR).tzs TZS= to$(TZS_YEAR).tzs
@ -492,6 +516,7 @@ VERSION_DEPS= \
tzfile.5 tzfile.h tzselect.8 tzselect.ksh \ tzfile.5 tzfile.h tzselect.8 tzselect.ksh \
workman.sh yearistype.sh \ workman.sh yearistype.sh \
zdump.8 zdump.c zic.8 zic.c \ zdump.8 zdump.c zic.8 zic.c \
ziguard.awk zishrink.awk \
zone.tab zone1970.tab zoneinfo2tdf.pl zone.tab zone1970.tab zoneinfo2tdf.pl
# And for the benefit of csh users on systems that assume the user # And for the benefit of csh users on systems that assume the user
@ -499,7 +524,8 @@ VERSION_DEPS= \
SHELL= /bin/sh SHELL= /bin/sh
all: tzselect yearistype zic zdump libtz.a $(TABDATA) all: tzselect yearistype zic zdump libtz.a $(TABDATA) \
vanguard.zi main.zi rearguard.zi
ALL: all date $(ENCHILADA) ALL: all date $(ENCHILADA)
@ -534,11 +560,15 @@ version: $(VERSION_DEPS)
printf '%s\n' "$$V" >$@.out printf '%s\n' "$$V" >$@.out
mv $@.out $@ mv $@.out $@
# This file can be tailored by setting BACKWARD, PACKRATDATA, etc. # These files can be tailored by setting BACKWARD, PACKRATDATA, etc.
tzdata.zi: $(TZDATA_ZI_DEPS) vanguard.zi main.zi rearguard.zi: $(DSTDATA_ZI_DEPS)
$(AWK) -v DATAFORM=`expr $@ : '\(.*\).zi'` -f ziguard.awk \
$(TDATA) $(PACKRATDATA) >$@.out
mv $@.out $@
tzdata.zi: $(DATAFORM).zi version
version=`sed 1q version` && \ version=`sed 1q version` && \
LC_ALL=C $(AWK) -v version="$$version" -f zishrink.awk \ LC_ALL=C $(AWK) -v version="$$version" -f zishrink.awk \
$(TDATA) $(PACKRATDATA) >$@.out $(DATAFORM).zi >$@.out
mv $@.out $@ mv $@.out $@
version.h: version version.h: version
@ -614,19 +644,29 @@ posix_packrat:
zones: $(REDO) zones: $(REDO)
# dummy.zd is not a real file; it is mentioned here only so that the
# top-level 'make' does not have a syntax error.
ZDS = dummy.zd
# Rule used only by submakes invoked by the $(TZS_NEW) rule.
# It is separate so that GNU 'make -j' can run instances in parallel.
$(ZDS): zdump
./zdump -i -c $(TZS_YEAR) '$(wd)/'$$(expr $@ : '\(.*\).zd') >$@
$(TZS_NEW): tzdata.zi zdump zic $(TZS_NEW): tzdata.zi zdump zic
mkdir -p tzs.dir rm -fr tzs.dir
mkdir tzs.dir
$(zic) -d tzs.dir tzdata.zi $(zic) -d tzs.dir tzdata.zi
$(AWK) '/^L/{print "Link\t" $$2 "\t" $$3}' \ $(AWK) '/^L/{print "Link\t" $$2 "\t" $$3}' \
tzdata.zi | LC_ALL=C sort >$@.out tzdata.zi | LC_ALL=C sort >$@.out
wd=`pwd` && \ wd=`pwd` && \
zones=`$(AWK) -v wd="$$wd" \ set x `$(AWK) '/^Z/{print "tzs.dir/" $$2 ".zd"}' tzdata.zi \
'/^Z/{print wd "/tzs.dir/" $$2}' tzdata.zi \ | LC_ALL=C sort -t . -k 2,2` && \
| LC_ALL=C sort` && \ shift && \
./zdump -i -c $(TZS_YEAR) $$zones >>$@.out ZDS=$$* && \
sed 's,^TZ=".*tzs\.dir/,TZ=",' $@.out >$@.sed.out $(MAKE) wd="$$wd" TZS_YEAR=$(TZS_YEAR) ZDS="$$ZDS" $$ZDS && \
rm -fr tzs.dir $@.out sed 's,^TZ=".*tzs\.dir/,TZ=",' $$ZDS >>$@.out
mv $@.sed.out $@ rm -fr tzs.dir
mv $@.out $@
# If $(TZS) does not already exist (e.g., old-format tarballs), create it. # If $(TZS) does not already exist (e.g., old-format tarballs), create it.
# If it exists but 'make check_tzs' fails, a maintainer should inspect the # If it exists but 'make check_tzs' fails, a maintainer should inspect the
@ -669,8 +709,10 @@ check_character_set: $(ENCHILADA)
sharp='#' && \ sharp='#' && \
! grep -Env $(SAFE_LINE) $(MANS) date.1 $(MANTXTS) \ ! grep -Env $(SAFE_LINE) $(MANS) date.1 $(MANTXTS) \
$(MISC) $(SOURCES) $(WEB_PAGES) \ $(MISC) $(SOURCES) $(WEB_PAGES) \
CONTRIBUTING LICENSE Makefile README \ CONTRIBUTING LICENSE README \
version tzdata.zi && \ version tzdata.zi && \
! grep -Env $(SAFE_LINE)'|^UNUSUAL_OK_CHARSET='$(OK_CHAR)'*$$' \
Makefile && \
! grep -Env $(SAFE_SHARP_LINE) $(TDATA_TO_CHECK) backzone \ ! grep -Env $(SAFE_SHARP_LINE) $(TDATA_TO_CHECK) backzone \
leapseconds yearistype.sh zone.tab && \ leapseconds yearistype.sh zone.tab && \
! grep -Env $(OK_LINE) $(ENCHILADA); \ ! grep -Env $(OK_LINE) $(ENCHILADA); \
@ -702,7 +744,7 @@ check_sorted: backward backzone iso3166.tab zone.tab zone1970.tab
$(AWK) '/^[^#]/ $(CHECK_CC_LIST)' zone1970.tab | \ $(AWK) '/^[^#]/ $(CHECK_CC_LIST)' zone1970.tab | \
LC_ALL=C sort -cu LC_ALL=C sort -cu
check_links: checklinks.awk $(TDATA_TO_CHECK) check_links: checklinks.awk $(TDATA_TO_CHECK) tzdata.zi
$(AWK) -f checklinks.awk $(TDATA_TO_CHECK) $(AWK) -f checklinks.awk $(TDATA_TO_CHECK)
$(AWK) -f checklinks.awk tzdata.zi $(AWK) -f checklinks.awk tzdata.zi
@ -720,17 +762,26 @@ check_tzs: $(TZS) $(TZS_NEW)
check_web: tz-how-to.html check_web: tz-how-to.html
$(VALIDATE_ENV) $(VALIDATE) $(VALIDATE_FLAGS) tz-how-to.html $(VALIDATE_ENV) $(VALIDATE) $(VALIDATE_FLAGS) tz-how-to.html
# Check that tzdata.zi generates the same binary data that its sources do. # Check that zishrink.awk does not alter the data, and that ziguard.awk
check_zishrink: tzdata.zi zic leapseconds $(PACKRATDATA) $(TDATA) # preserves main-format data.
check_zishrink: zic leapseconds $(PACKRATDATA) $(TDATA) \
$(DATAFORM).zi tzdata.zi
for type in posix right; do \ for type in posix right; do \
mkdir -p time_t.dir/$$type time_t.dir/$$type-shrunk && \ mkdir -p time_t.dir/$$type time_t.dir/$$type-t \
time_t.dir/$$type-shrunk && \
case $$type in \ case $$type in \
right) leap='-L leapseconds';; \ right) leap='-L leapseconds';; \
*) leap=;; \ *) leap=;; \
esac && \ esac && \
$(ZIC) $$leap -d time_t.dir/$$type $(TDATA) && \ $(ZIC) $$leap -d time_t.dir/$$type $(DATAFORM).zi && \
$(AWK) '/^Rule/' $(TDATA) | \ case $(DATAFORM) in \
$(ZIC) $$leap -d time_t.dir/$$type - $(PACKRATDATA) && \ main) \
$(ZIC) $$leap -d time_t.dir/$$type-t $(TDATA) && \
$(AWK) '/^Rule/' $(TDATA) | \
$(ZIC) $$leap -d time_t.dir/$$type-t - \
$(PACKRATDATA) && \
diff -r time_t.dir/$$type time_t.dir/$$type-t;; \
esac && \
$(ZIC) $$leap -d time_t.dir/$$type-shrunk tzdata.zi && \ $(ZIC) $$leap -d time_t.dir/$$type-shrunk tzdata.zi && \
diff -r time_t.dir/$$type time_t.dir/$$type-shrunk || exit; \ diff -r time_t.dir/$$type time_t.dir/$$type-shrunk || exit; \
done done
@ -740,7 +791,7 @@ clean_misc:
rm -f core *.o *.out \ rm -f core *.o *.out \
date tzselect version.h zdump zic yearistype libtz.a date tzselect version.h zdump zic yearistype libtz.a
clean: clean_misc clean: clean_misc
rm -fr *.dir tzdata.zi tzdb-*/ $(TZS_NEW) rm -fr *.dir *.zi tzdb-*/ $(TZS_NEW)
maintainer-clean: clean maintainer-clean: clean
@echo 'This command is intended for maintainers to use; it' @echo 'This command is intended for maintainers to use; it'
@ -852,16 +903,27 @@ check_time_t_alternatives:
done done
rm -fr time_t.dir rm -fr time_t.dir
TRADITIONAL_ASC = \
tzcode$(VERSION).tar.gz.asc \
tzdata$(VERSION).tar.gz.asc
ALL_ASC = $(TRADITIONAL_ASC) \
tzdata$(VERSION)-rearguard.tar.gz.asc \
tzdb-$(VERSION).tar.lz.asc
tarballs traditional_tarballs signatures traditional_signatures: version tarballs traditional_tarballs signatures traditional_signatures: version
VERSION=`cat version` && \ VERSION=`cat version` && \
$(MAKE) VERSION="$$VERSION" $@_version $(MAKE) VERSION="$$VERSION" $@_version
tarballs_version: traditional_tarballs_version tzdb-$(VERSION).tar.lz # These *_version rules are intended for use if VERSION is set by some
# other means. Ordinarily these rules are used only by the above
# non-_version rules, which set VERSION on the 'make' command line.
tarballs_version: traditional_tarballs_version \
tzdata$(VERSION)-rearguard.tar.gz \
tzdb-$(VERSION).tar.lz
traditional_tarballs_version: \ traditional_tarballs_version: \
tzcode$(VERSION).tar.gz tzdata$(VERSION).tar.gz tzcode$(VERSION).tar.gz tzdata$(VERSION).tar.gz
signatures_version: traditional_signatures_version tzdb-$(VERSION).tar.lz.asc signatures_version: $(ALL_ASC)
traditional_signatures_version: \ traditional_signatures_version: $(TRADITIONAL_ASC)
tzcode$(VERSION).tar.gz.asc tzdata$(VERSION).tar.gz.asc \
tzcode$(VERSION).tar.gz: set-timestamps.out tzcode$(VERSION).tar.gz: set-timestamps.out
LC_ALL=C && export LC_ALL && \ LC_ALL=C && export LC_ALL && \
@ -876,6 +938,26 @@ tzdata$(VERSION).tar.gz: set-timestamps.out
gzip $(GZIPFLAGS) >$@.out gzip $(GZIPFLAGS) >$@.out
mv $@.out $@ mv $@.out $@
tzdata$(VERSION)-rearguard.tar.gz: rearguard.zi set-timestamps.out
rm -fr tzdata$(VERSION)-rearguard.dir
mkdir tzdata$(VERSION)-rearguard.dir
ln $(COMMON) $(DATA) $(MISC) tzdata$(VERSION)-rearguard.dir
cd tzdata$(VERSION)-rearguard.dir && \
rm -f $(TDATA) $(PACKRATDATA) version
for f in $(TDATA) $(PACKRATDATA); do \
rearf=tzdata$(VERSION)-rearguard.dir/$$f; \
$(AWK) -v DATAFORM=rearguard -f ziguard.awk $$f >$$rearf && \
touch -cmr `ls -t ziguard.awk $$f` $$rearf || exit; \
done
sed '1s/$$/-rearguard/' \
<version >tzdata$(VERSION)-rearguard.dir/version
touch -cmr version tzdata$(VERSION)-rearguard.dir/version
LC_ALL=C && export LC_ALL && \
(cd tzdata$(VERSION)-rearguard.dir && \
tar $(TARFLAGS) -cf - $(COMMON) $(DATA) $(MISC) | \
gzip $(GZIPFLAGS)) >$@.out
mv $@.out $@
tzdb-$(VERSION).tar.lz: set-timestamps.out tzdb-$(VERSION).tar.lz: set-timestamps.out
rm -fr tzdb-$(VERSION) rm -fr tzdb-$(VERSION)
mkdir tzdb-$(VERSION) mkdir tzdb-$(VERSION)
@ -886,12 +968,10 @@ tzdb-$(VERSION).tar.lz: set-timestamps.out
mv $@.out $@ mv $@.out $@
tzcode$(VERSION).tar.gz.asc: tzcode$(VERSION).tar.gz tzcode$(VERSION).tar.gz.asc: tzcode$(VERSION).tar.gz
gpg --armor --detach-sign $?
tzdata$(VERSION).tar.gz.asc: tzdata$(VERSION).tar.gz tzdata$(VERSION).tar.gz.asc: tzdata$(VERSION).tar.gz
gpg --armor --detach-sign $? tzdata$(VERSION)-rearguard.tar.gz.asc: tzdata$(VERSION)-rearguard.tar.gz
tzdb-$(VERSION).tar.lz.asc: tzdb-$(VERSION).tar.lz tzdb-$(VERSION).tar.lz.asc: tzdb-$(VERSION).tar.lz
$(ALL_ASC):
gpg --armor --detach-sign $? gpg --armor --detach-sign $?
typecheck: typecheck:
@ -917,13 +997,17 @@ zic.o: private.h tzfile.h version.h
.KEEP_STATE: .KEEP_STATE:
.PHONY: ALL INSTALL all .PHONY: ALL INSTALL all
.PHONY: check check_character_set check_links .PHONY: check check_character_set check_links check_name_lengths
.PHONY: check_public check_sorted check_tables .PHONY: check_public check_sorted check_tables
.PHONY: check_time_t_alternatives check_tzs check_web check_white_space .PHONY: check_time_t_alternatives check_tzs check_web check_white_space
.PHONY: check_zishrink .PHONY: check_zishrink
.PHONY: clean clean_misc force_tzs .PHONY: clean clean_misc dummy.zd force_tzs
.PHONY: install install_data maintainer-clean names .PHONY: install install_data maintainer-clean names
.PHONY: posix_only posix_packrat posix_right .PHONY: posix_only posix_packrat posix_right
.PHONY: public right_only right_posix signatures signatures_version .PHONY: public right_only right_posix signatures signatures_version
.PHONY: tarballs tarballs_version typecheck .PHONY: tarballs tarballs_version
.PHONY: traditional_signatures traditional_signatures_version
.PHONY: traditional_tarballs traditional_tarballs_version
.PHONY: typecheck
.PHONY: zonenames zones .PHONY: zonenames zones
.PHONY: $(ZDS)

View File

@ -1,9 +1,210 @@
News for the tz database News for the tz database
Release 2018e - 2018-05-01 23:42:51 -0700
Briefly:
North Korea switches back to +09 on 2018-05-05.
The main format uses negative DST again, for Ireland etc.
'make tarballs' now also builds a rearguard tarball.
New 's' and 'd' suffixes in SAVE columns of Rule and Zone lines.
Changes to past and future time stamps
North Korea switches back from +0830 to +09 on 2018-05-05.
(Thanks to Kang Seonghoon, Arthur David Olson, Seo Sanghyeon,
and Tim Parenti.)
Bring back the negative-DST changes of 2018a, except be more
compatible with data parsers that do not support negative DST.
Also, this now affects historical time stamps in Namibia and the
former Czechoslovakia, not just Ireland. The main format now uses
negative DST to model time stamps in Europe/Dublin (from 1971 on),
Europe/Prague (1946/7), and Africa/Windhoek (1994/2017). This
does not affect UT offsets, only time zone abbreviations and the
tm_isdst flag. Also, this does not affect rearguard or vanguard
formats; effectively the main format now uses vanguard instead of
rearguard format. Data parsers that do not support negative DST
can still use data from the rearguard tarball described below.
Changes to build procedure
The command 'make tarballs' now also builds the tarball
tzdataVERSION-rearguard.tar.gz, which is like tzdataVERSION.tar.gz
except that it uses rearguard format intended for trailing-edge
data parsers.
Changes to data format and to code
The SAVE column of Rule and Zone lines can now have an 's' or 'd'
suffix, which specifies whether the adjusted time is standard time
or daylight saving time. If no suffix is given, daylight saving
time is used if and only if the SAVE column is nonzero; this is
the longstanding behavior. Although this new feature is not used
in tzdata, it could be used to specify the legal time in Namibia
1994-2017, as opposed to the popular time (see below).
Changes to past time stamps
From 1994 through 2017 Namibia observed DST in winter, not summer.
That is, it used negative DST, as Ireland still does. This change
does not affect UTC offsets; it affects only the tm_isdst flag and
the abbreviation used during summer, which is now CAT, not WAST.
Although (as noted by Michael Deckers) summer and winter time were
both simply called "standard time" in Namibian law, in common
practice winter time was considered to be DST (as noted by Stephen
Colebourne). The full effect of this change is only in vanguard
format; in rearguard and main format, the tm_isdst flag is still
zero in winter and nonzero in summer.
In 1946/7 Czechoslovakia also observed negative DST in winter.
The full effect of this change is only in vanguard format; in
rearguard and main formats, it is modeled as plain GMT without
daylight saving. Also, the dates of some 1944/5 DST transitions
in Czechoslovakia have been changed.
Release 2018d - 2018-03-22 07:05:46 -0700
Briefly:
Palestine starts DST a week earlier in 2018.
Add support for vanguard and rearguard data consumers.
Add subsecond precision to source data format, though not to data.
Changes to future time stamps
In 2018, Palestine starts DST on March 24, not March 31.
Adjust future predictions accordingly. (Thanks to Sharef Mustafa.)
Changes to past and future time stamps
Casey Station in Antarctica changed from +11 to +08 on 2018-03-11
at 04:00. (Thanks to Steffen Thorsen.)
Changes to past time stamps
Historical transitions for Uruguay, represented by
America/Montevideo, have been updated per official legal documents,
replacing previous data mainly originating from the inventions of
Shanks & Pottenger. This has resulted in adjustments ranging from
30 to 90 minutes in either direction over at least two dozen
distinct periods ranging from one day to several years in length.
A mere handful of pre-1991 transitions are unaffected; data since
then has come from more reliable contemporaneous reporting. These
changes affect various timestamps in 1920-1923, 1936, 1939,
1942-1943, 1959, 1966-1970, 1972, 1974-1980, and 1988-1990.
Additionally, Uruguay's pre-standard-time UT offset has been
adjusted westward by 7 seconds, from UT-03:44:44 to UT-03:44:51, to
match the location of the Observatory of the National Meteorological
Institute in Montevideo.
(Thanks to Jeremie Bonjour, Tim Parenti, and Michael Deckers.)
Enderbury and Kiritimati skipped New Year's Eve 1994, not
New Year's Day 1995. (Thanks to Kerry Shetline.)
Fix the 1912-01-01 transition for Portugal and its colonies.
This transition was at 00:00 according to the new UT offset, not
according to the old one. Also assume that Cape Verde switched on
the same date as the rest, not in 1907. This affects
Africa/Bissau, Africa/Sao_Tome, Asia/Macau, Atlantic/Azores,
Atlantic/Cape_Verde, Atlantic/Madeira, and Europe/Lisbon.
(Thanks to Michael Deckers.)
Fix an off-by-1 error for pre-1913 timestamps in Jamaica and in
Turks & Caicos.
Changes to past time zone abbreviations
MMT took effect in Uruguay from 1908-06-10, not 1898-06-28. There
is no clock change associated with the transition.
Changes to build procedure
The new DATAFORM macro in the Makefile lets the installer choose
among three source data formats. The idea is to lessen downstream
disruption when data formats are improved.
* DATAFORM=vanguard installs from the latest, bleeding-edge
format. DATAFORM=main (the default) installs from the format
used in the 'africa' etc. files. DATAFORM=rearguard installs
from a trailing-edge format. Eventually, elements of today's
vanguard format should move to the main format, and similarly
the main format's features should eventually move to the
rearguard format.
* In the current version, the main and rearguard formats are
identical and match that of 2018c, so this change does not
affect default behavior. The vanguard format currently contains
one feature not in the main format: negative SAVE values. This
improves support for Ireland, which uses Irish Standard Time
(IST, UTC+01) in summer and GMT (UTC) in winter. tzcode has
supported negative SAVE values for decades, and this feature
should move to the main format soon. However, it will not move
to the rearguard format for quite some time because some
downstream parsers do not support it.
* The build procedure constructs three files vanguard.zi, main.zi,
and rearguard.zi, one for each format. The files represent the
same data as closely as the formats allow. These three files
are intended for downstream data consumers and are not
installed. Zoneinfo parsers that do not support negative SAVE values
should start using rearguard.zi, so that they will be unaffected
when the negative-DST feature moves from vanguard to main.
Bleeding-edge Zoneinfo parsers that support the new features
already can use vanguard.zi; in this respect, current tzcode is
bleeding-edge.
The Makefile should now be safe for parallelized builds, and 'make
-j to2050new.tzs' is now much faster on a multiprocessor host
with GNU Make.
When built with -DSUPPRESS_TZDIR, the tzcode library no longer
prepends TZDIR/ to file names that do not begin with '/'. This is
not recommended for general use, due to its security implications.
(From a suggestion by Manuela Friedrich.)
Changes to code
zic now accepts subsecond precision in expressions like
00:19:32.13, which is approximately the legal time of the
Netherlands from 1835 to 1937. However, because it is
questionable whether the few recorded uses of non-integer offsets
had subsecond precision in practice, there are no plans for tzdata
to use this feature. (Thanks to Steve Allen for pointing out
the limitations of historical data in this area.)
The code is a bit more portable to MS-Windows. Installers can
compile with -DRESERVE_STD_EXT_IDS on MS-Windows platforms that
reserve identifiers like 'localtime'. (Thanks to Manuela
Friedrich).
Changes to documentation and commentary
theory.html now outlines tzdb's extensions to POSIX's model for
civil time, and has a section "POSIX features no longer needed"
that lists POSIX API components that are now vestigial.
(From suggestions by Steve Summit.) It also better distinguishes
time zones from tz regions. (From a suggestion by Guy Harris.)
Commentary is now more consistent about using the phrase "daylight
saving time", to match the C name tm_isdst. Daylight saving time
need not occur in summer, and need not have a positive offset from
standard time.
Commentary about historical transitions in Uruguay has been expanded
with links to many relevant legal documents.
(Thanks to Tim Parenti.)
Commentary now uses some non-ASCII characters with Unicode value
less than U+0100, as they can be useful and should work even with
older editors such as XEmacs.
Release 2018c - 2018-01-22 23:00:44 -0800 Release 2018c - 2018-01-22 23:00:44 -0800
Briefly: Briefly:
Revert Irish changes that relied on negative DST offsets. Revert Irish changes that relied on negative SAVE values.
Changes to tm_isdst Changes to tm_isdst
@ -14,8 +215,8 @@ Release 2018c - 2018-01-22 23:00:44 -0800
struct tm type. This reversion is intended to be a temporary struct tm type. This reversion is intended to be a temporary
workaround for problems discovered with downstream uses of workaround for problems discovered with downstream uses of
releases 2018a and 2018b, which implemented Irish time by using releases 2018a and 2018b, which implemented Irish time by using
negative DST offsets in the Eire rules of the 'europe' file. negative SAVE values in the Eire rules of the 'europe' file.
Although negative DST offsets have been part of tzcode for many Although negative SAVE values have been part of tzcode for many
years and are supported by many platforms, they were not years and are supported by many platforms, they were not
documented before 2018a and ICU and OpenJDK do not currently documented before 2018a and ICU and OpenJDK do not currently
support them. A mechanism to export data to platforms lacking support them. A mechanism to export data to platforms lacking
@ -900,7 +1101,7 @@ Release 2016b - 2016-03-12 17:30:14 -0800
Comments in zone tables have been improved. (Thanks to J William Piggott.) Comments in zone tables have been improved. (Thanks to J William Piggott.)
tzselect again limits its menu comments so that menus fit on a tzselect again limits its menu comments so that menus fit on a
24x80 alphanumeric display. 24×80 alphanumeric display.
A new web page tz-how-to.html. (Thanks to Bill Seymour.) A new web page tz-how-to.html. (Thanks to Bill Seymour.)

View File

@ -1,4 +1,6 @@
/* $NetBSD: asctime.c,v 1.24 2018/01/07 21:19:35 kamil Exp $ */ /* $NetBSD: asctime.c,v 1.25 2018/05/04 15:51:00 christos Exp $ */
/* asctime and asctime_r a la POSIX and ISO C, except pad years before 1000. */
/* /*
** This file is in the public domain, so clarified as of ** This file is in the public domain, so clarified as of
@ -16,7 +18,7 @@
#if 0 #if 0
static char elsieid[] = "@(#)asctime.c 8.5"; static char elsieid[] = "@(#)asctime.c 8.5";
#else #else
__RCSID("$NetBSD: asctime.c,v 1.24 2018/01/07 21:19:35 kamil Exp $"); __RCSID("$NetBSD: asctime.c,v 1.25 2018/05/04 15:51:00 christos Exp $");
#endif #endif
#endif /* LIBC_SCCS and not lint */ #endif /* LIBC_SCCS and not lint */
@ -45,7 +47,7 @@ __weak_alias(asctime_r,_asctime_r)
** leading zeroes to get the newline in the traditional place. ** leading zeroes to get the newline in the traditional place.
** The -4 ensures that we get four characters of output even if ** The -4 ensures that we get four characters of output even if
** we call a strftime variant that produces fewer characters for some years. ** 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, ** The ISO C and POSIX standards prohibit padding the year,
** but many implementations pad anyway; most likely the standards are buggy. ** but many implementations pad anyway; most likely the standards are buggy.
*/ */
#ifdef __GNUC__ #ifdef __GNUC__
@ -80,10 +82,6 @@ __weak_alias(asctime_r,_asctime_r)
static char buf_asctime[MAX_ASCTIME_BUF_SIZE]; static char buf_asctime[MAX_ASCTIME_BUF_SIZE];
/*
** A la ISO/IEC 9945-1, ANSI/IEEE Std 1003.1, 2004 Edition.
*/
char * char *
asctime_r(const struct tm *timeptr, char *buf) asctime_r(const struct tm *timeptr, char *buf)
{ {
@ -131,10 +129,6 @@ asctime_r(const struct tm *timeptr, char *buf)
} }
} }
/*
** A la ISO/IEC 9945-1, ANSI/IEEE Std 1003.1, 2004 Edition.
*/
char * char *
asctime(const struct tm *timeptr) asctime(const struct tm *timeptr)
{ {

View File

@ -1,8 +1,8 @@
.\" $NetBSD: ctime.3,v 1.58 2018/02/11 13:28:26 wiz Exp $ .\" $NetBSD: ctime.3,v 1.59 2018/05/04 15:51:00 christos Exp $
.\" .\"
.\" XXX: License missing? .\" XXX: License missing?
.\" .\"
.Dd February 7, 2018 .Dd May 5, 2018
.Dt CTIME 3 .Dt CTIME 3
.Os .Os
.Sh NAME .Sh NAME
@ -258,15 +258,15 @@ to their normal ranges.
.Fa tm_isdst .Fa tm_isdst
causes causes
.Fn mktime .Fn mktime
to presume initially that summer time (for example, Daylight Saving Time to presume initially that daylight saving time
in the U.S.A.) respectively, respectively,
is or is not in effect for the specified time. is or is not in effect for the specified time.
.It .It
A negative value for A negative value for
.Fa tm_isdst .Fa tm_isdst
causes the causes the
.Fn mktime .Fn mktime
function to attempt to divine whether summer time is in effect function to attempt to divine whether daylight saving time is in effect
for the specified time; in this case it does not use a consistent for the specified time; in this case it does not use a consistent
rule and may give a different answer when later rule and may give a different answer when later
presented with the same argument. presented with the same argument.
@ -334,13 +334,14 @@ includes the following fields:
int tm_wday; /* day of week (Sunday = 0) */ int tm_wday; /* day of week (Sunday = 0) */
int tm_yday; /* day of year (0 - 365) */ int tm_yday; /* day of year (0 - 365) */
int tm_isdst; /* is summer time in effect? */ int tm_isdst; /* is summer time in effect? */
int tm_isdst; /* is daylight saving time in effect? */
char *tm_zone; /* abbreviation of timezone name (optional) */ char *tm_zone; /* abbreviation of timezone name (optional) */
long tm_gmtoff; /* offset from UT in seconds (optional) */ long tm_gmtoff; /* offset from UT in seconds (optional) */
.Ed .Ed
.Bl -bullet .Bl -bullet
.It .It
.Va tm_isdst .Va tm_isdst
is non-zero if summer time is in effect. is non-zero if daylight saving time is in effect.
.It .It
.Va tm_gmtoff .Va tm_gmtoff
is the offset (in seconds) of the time represented from UT, is the offset (in seconds) of the time represented from UT,

View File

@ -1,4 +1,4 @@
/* $NetBSD: localtime.c,v 1.111 2018/01/25 22:48:42 christos Exp $ */ /* $NetBSD: localtime.c,v 1.112 2018/05/04 15:51:00 christos Exp $ */
/* /*
** This file is in the public domain, so clarified as of ** This file is in the public domain, so clarified as of
@ -10,7 +10,7 @@
#if 0 #if 0
static char elsieid[] = "@(#)localtime.c 8.17"; static char elsieid[] = "@(#)localtime.c 8.17";
#else #else
__RCSID("$NetBSD: localtime.c,v 1.111 2018/01/25 22:48:42 christos Exp $"); __RCSID("$NetBSD: localtime.c,v 1.112 2018/05/04 15:51:00 christos Exp $");
#endif #endif
#endif /* LIBC_SCCS and not lint */ #endif /* LIBC_SCCS and not lint */
@ -95,9 +95,8 @@ static const char gmt[] = "GMT";
/* /*
** The DST rules to use if TZ has no rules and we can't load TZDEFRULES. ** The DST rules to use if TZ has no rules and we can't load TZDEFRULES.
** Default to US rules as of 2017-05-07. ** Default to US rules as of 2017-05-07.
** POSIX 1003.1 section 8.1.1 says that the default DST rules are ** POSIX does not specify the default DST rules;
** implementation dependent; for historical reasons, US rules are a ** for historical reasons, US rules are a common default.
** common default.
*/ */
#ifndef TZDEFRULESTRING #ifndef TZDEFRULESTRING
#define TZDEFRULESTRING ",M3.2.0,M11.1.0" #define TZDEFRULESTRING ",M3.2.0,M11.1.0"
@ -448,7 +447,13 @@ tzloadbody(char const *name, struct state *sp, bool doextend,
if (name[0] == ':') if (name[0] == ':')
++name; ++name;
#ifdef SUPPRESS_TZDIR
/* Do not prepend TZDIR. This is intended for specialized
applications only, due to its security implications. */
doaccess = true;
#else
doaccess = name[0] == '/'; doaccess = name[0] == '/';
#endif
if (!doaccess) { if (!doaccess) {
size_t namelen = strlen(name); size_t namelen = strlen(name);
if (sizeof lsp->fullname - sizeof tzdirslash <= namelen) if (sizeof lsp->fullname - sizeof tzdirslash <= namelen)
@ -1277,12 +1282,13 @@ tzparse(const char *name, struct state *sp, bool lastditch)
/* No adjustment to transition time */ /* No adjustment to transition time */
} else { } else {
/* /*
** If summer time is in effect, and the ** If daylight saving time is in
** transition time was not specified as ** effect, and the transition time was
** standard time, add the summer time ** not specified as standard time, add
** offset to the transition time; ** the daylight saving time offset to
** otherwise, add the standard time ** the transition time; otherwise, add
** offset to the transition time. ** the standard time offset to the
** transition time.
*/ */
/* /*
** Transitions from DST to DDST ** Transitions from DST to DDST
@ -2361,7 +2367,7 @@ timeoff(struct tm *tmp, long offset)
#ifdef STD_INSPIRED #ifdef STD_INSPIRED
/* /*
** IEEE Std 1003.1-1988 (POSIX) legislates that 536457599 ** IEEE Std 1003.1 (POSIX) says that 536457599
** shall correspond to "Wed Dec 31 23:59:59 UTC 1986", which ** shall correspond to "Wed Dec 31 23:59:59 UTC 1986", which
** is not the case if we are accounting for leap seconds. ** is not the case if we are accounting for leap seconds.
** So, we provide the following conversion routines for use ** So, we provide the following conversion routines for use

View File

@ -1,4 +1,4 @@
/* $NetBSD: private.h,v 1.51 2017/10/24 17:38:17 christos Exp $ */ /* $NetBSD: private.h,v 1.52 2018/05/04 15:51:00 christos Exp $ */
#ifndef PRIVATE_H #ifndef PRIVATE_H
#define PRIVATE_H #define PRIVATE_H
@ -27,6 +27,16 @@
** Thank you! ** Thank you!
*/ */
/*
** zdump has been made independent of the rest of the time
** conversion package to increase confidence in the verification it provides.
** You can use zdump to help in verifying other implementations.
** To do this, compile with -DUSE_LTZ=0 and link without the tz library.
*/
#ifndef USE_LTZ
# define USE_LTZ 1
#endif
/* This string was in the Factory zone through version 2016f. */ /* This string was in the Factory zone through version 2016f. */
#define GRANDPARENTED "Local time zone must be set--see zic manual page" #define GRANDPARENTED "Local time zone must be set--see zic manual page"
@ -78,6 +88,10 @@
#define HAVE_STRDUP 1 #define HAVE_STRDUP 1
#endif #endif
#ifndef HAVE_STRTOLL
#define HAVE_STRTOLL 1
#endif
#ifndef HAVE_SYMLINK #ifndef HAVE_SYMLINK
#define HAVE_SYMLINK 1 #define HAVE_SYMLINK 1
#endif /* !defined HAVE_SYMLINK */ #endif /* !defined HAVE_SYMLINK */
@ -282,15 +296,19 @@ typedef int int_fast32_t;
#ifndef INTMAX_MAX #ifndef INTMAX_MAX
# ifdef LLONG_MAX # ifdef LLONG_MAX
typedef long long intmax_t; typedef long long intmax_t;
# define strtoimax strtoll # if HAVE_STRTOLL
# define strtoimax strtoll
# endif
# define INTMAX_MAX LLONG_MAX # define INTMAX_MAX LLONG_MAX
# define INTMAX_MIN LLONG_MIN # define INTMAX_MIN LLONG_MIN
# else # else
typedef long intmax_t; typedef long intmax_t;
# define strtoimax strtol
# define INTMAX_MAX LONG_MAX # define INTMAX_MAX LONG_MAX
# define INTMAX_MIN LONG_MIN # define INTMAX_MIN LONG_MIN
# endif # endif
# ifndef strtoimax
# define strtoimax strtol
# endif
#endif #endif
#ifndef PRIdMAX #ifndef PRIdMAX
@ -340,12 +358,14 @@ typedef unsigned long uintmax_t;
#define SIZE_MAX ((size_t) -1) #define SIZE_MAX ((size_t) -1)
#endif #endif
#if 2 < __GNUC__ + (96 <= __GNUC_MINOR__) #if 3 <= __GNUC__
# define ATTRIBUTE_CONST __attribute__ ((__const__)) # define ATTRIBUTE_CONST __attribute__ ((__const__))
# define ATTRIBUTE_MALLOC __attribute__ ((__malloc__))
# define ATTRIBUTE_PURE __attribute__ ((__pure__)) # define ATTRIBUTE_PURE __attribute__ ((__pure__))
# define ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec)) # define ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec))
#else #else
# define ATTRIBUTE_CONST /* empty */ # define ATTRIBUTE_CONST /* empty */
# define ATTRIBUTE_MALLOC /* empty */
# define ATTRIBUTE_PURE /* empty */ # define ATTRIBUTE_PURE /* empty */
# define ATTRIBUTE_FORMAT(spec) /* empty */ # define ATTRIBUTE_FORMAT(spec) /* empty */
#endif #endif
@ -372,6 +392,16 @@ typedef unsigned long uintmax_t;
#ifndef EPOCH_OFFSET #ifndef EPOCH_OFFSET
# define EPOCH_OFFSET 0 # define EPOCH_OFFSET 0
#endif #endif
#ifndef RESERVE_STD_EXT_IDS
# define RESERVE_STD_EXT_IDS 0
#endif
/* If standard C identifiers with external linkage (e.g., localtime)
are reserved and are not already being renamed anyway, rename them
as if compiling with '-Dtime_tz=time_t'. */
#if !defined time_tz && RESERVE_STD_EXT_IDS && USE_LTZ
# define time_tz time_t
#endif
/* /*
** Compile with -Dtime_tz=T to build the tz package with a private ** Compile with -Dtime_tz=T to build the tz package with a private

View File

@ -1,4 +1,4 @@
/* $NetBSD: strftime.c,v 1.40 2017/10/24 17:38:17 christos Exp $ */ /* $NetBSD: strftime.c,v 1.41 2018/05/04 15:51:00 christos Exp $ */
/* Convert a broken-down timestamp to a string. */ /* Convert a broken-down timestamp to a string. */
@ -35,7 +35,7 @@
static char elsieid[] = "@(#)strftime.c 7.64"; static char elsieid[] = "@(#)strftime.c 7.64";
static char elsieid[] = "@(#)strftime.c 8.3"; static char elsieid[] = "@(#)strftime.c 8.3";
#else #else
__RCSID("$NetBSD: strftime.c,v 1.40 2017/10/24 17:38:17 christos Exp $"); __RCSID("$NetBSD: strftime.c,v 1.41 2018/05/04 15:51:00 christos Exp $");
#endif #endif
#endif /* LIBC_SCCS and not lint */ #endif /* LIBC_SCCS and not lint */
@ -213,7 +213,7 @@ label:
** %Ec %EC %Ex %EX %Ey %EY ** %Ec %EC %Ex %EX %Ey %EY
** %Od %oe %OH %OI %Om %OM ** %Od %oe %OH %OI %Om %OM
** %OS %Ou %OU %OV %Ow %OW %Oy ** %OS %Ou %OU %OV %Ow %OW %Oy
** are supposed to provide alternate ** are supposed to provide alternative
** representations. ** representations.
*/ */
goto label; goto label;

File diff suppressed because it is too large Load Diff

View File

@ -81,19 +81,19 @@ doing so got a crook trying to be declared dead to
emerge a bit too early from the titular enclosure. emerge a bit too early from the titular enclosure.
</li> </li>
<li> <li>
The 1960s ITC television series <em>The Prisoner</em> included an episode "The Chimes of Big Ben", <em>The Prisoner</em>, episode 2, ITC, 1967-10-06.
entitled "The Chimes of Big Ben" in which our protagonist tumbled to Our protagonist tumbles to
the fraudulent nature of a Poland-to-England escape upon hearing "Big the fraudulent nature of a Poland-to-England escape upon hearing "Big
Ben" chiming on Polish local time. Ben" chiming on Polish local time.
</li> </li>
<li> <li>
The series <em>Seinfeld</em> included an episode entitled "The Susie," first "The Susie", <em>Seinfeld</em>, season 8, episode 15, NBC, 1997-02-13.
broadcast 1997-02-13, in which Kramer decides that daylight saving time Kramer decides that daylight saving time
isn't coming fast enough, so he sets his watch ahead an hour. isn't coming fast enough, so he sets his watch ahead an hour.
</li> </li>
<li> <li>
The "20 Hours in America" episode of <em>The West Wing</em>, "20 Hours in America", <em>The West Wing</em>, season 4, episodes 1&ndash;2,
first aired 2002-09-25, contained a <a 2002-09-25, contained a <a
href="https://www.youtube.com/watch?v=-J1NHzQ1sgc">scene</a> that href="https://www.youtube.com/watch?v=-J1NHzQ1sgc">scene</a> that
saw White House staffers stranded in Indiana; they thought they had time to 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. catch Air Force One but were done in by intra-Indiana local time changes.
@ -144,6 +144,9 @@ hinges on whether or not Russia observes daylight saving time.
"The Lost Hour", <em>Eerie, Indiana</em>, episode 10, NBC, 1991-12-01. "The Lost Hour", <em>Eerie, Indiana</em>, episode 10, NBC, 1991-12-01.
Despite Indiana's then-lack of DST, Marshall changes his clock with Despite Indiana's then-lack of DST, Marshall changes his clock with
unusual consequences. unusual consequences.
See "<a
href="https://www.avclub.com/eerie-indiana-was-a-few-dimensions-ahead-of-its-time-1819833380"><em>Eerie,
Indiana</em> was a few dimensions ahead of its time</a>".
</li> </li>
<li> <li>
"Time Tunnel", <em>The Adventures of Pete &amp; Pete</em>, season 2, episode 5, "Time Tunnel", <em>The Adventures of Pete &amp; Pete</em>, season 2, episode 5,
@ -162,6 +165,11 @@ CBS, 2016-01-17.
The applicability of a contract hinges on the The applicability of a contract hinges on the
time zone associated with a video timestamp. time zone associated with a video timestamp.
</li> </li>
<li>
"Justice", <em>Veep</em>, season 6, episode 4, HBO, 2017-05-07.
Jonah's inability to understand DST ends up impressing a wealthy
backer who sets him up for a 2020 presidential run.
</li>
</ul> </ul>
<h2>Books, plays, and magazines</h2> <h2>Books, plays, and magazines</h2>
<ul> <ul>
@ -423,7 +431,7 @@ Supernaw.</td></tr>
<tr><td>ADO Rating</td><td>1.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>Notes<td>The title song is also available on "Bob Dylan's Greatest Hits" and "The Essential Bob Dylan."</td></tr>
<tr><td>&nbsp;</td><td></td></tr> <tr><td>&nbsp;</td><td></td></tr>
<tr><td>Artist</td><td>Luciana Souza</td></tr> <tr><td>Artist</td><td>Luciana Souza</td></tr>
<tr><td>CD</td><td>Tide</td></tr> <tr><td>CD</td><td>Tide</td></tr>
<tr><td>Copyright Date</td><td>2009</td></tr> <tr><td>Copyright Date</td><td>2009</td></tr>
@ -488,6 +496,22 @@ it's already tomorrow in Australia!"
<h2>Jokes</h2> <h2>Jokes</h2>
<ul> <ul>
<li> <li>
The idea behind daylight saving time was first proposed as a joke by
Benjamin Franklin. To enforce it, he suggested, "Every
morning, as soon as the sun rises, let all the bells in every church
be set ringing; and if that is not sufficient, let cannon be fired in
every street, to wake the sluggards effectually, and make them open
their eyes to see their true interest. All the difficulty will be in
the first two or three days: after which the reformation will be as
natural and easy as the present irregularity; for, <em>ce n'est que le
premier pas qui co&ucirc;te</em>."
<a href="http://www.webexhibits.org/daylightsaving/franklin3.html">Franklin's
joke</a> was first published on 1784-04-26 by the
<em>Journal de Paris</em> as <a
href="https://en.wikipedia.org/wiki/File:Franklin-Benjamin-Journal-de-Paris-1784.jpg">an
anonymous letter translated into French</a>.
</li>
<li>
"We've been using the five-cent nickel in this country since 1492. "We've been using the five-cent nickel in this country since 1492.
Now that's pretty near 100 years, daylight saving." Now that's pretty near 100 years, daylight saving."
(Groucho Marx as Captain Spaulding in <em>Animal Crackers</em>, 1930, (Groucho Marx as Captain Spaulding in <em>Animal Crackers</em>, 1930,
@ -571,7 +595,7 @@ but maybe in your time zone I haven't finished yet. So stay tuned!"
</ul> </ul>
<h2>See also</h2> <h2>See also</h2>
<ul> <ul>
<li><a href="tz-link.htm">Sources for Time Zone and Daylight Saving <li><a href="tz-link.html">Sources for Time Zone and Daylight Saving
Time Data</a></li> Time Data</a></li>
</ul> </ul>
<hr> <hr>

View File

@ -7,7 +7,9 @@
<body> <body>
<h1>Sources for time zone and daylight saving time data</h1> <h1>Sources for time zone and daylight saving time data</h1>
<p> <p>
Time zone and daylight saving rules are controlled by individual <a href="https://en.wikipedia.org/wiki/Time_zone">Time zone</a> and
<a href="https://en.wikipedia.org/wiki/Daylight_saving_time">daylight-saving</a>
rules are controlled by individual
governments. They are sometimes changed with little notice, and their governments. They are sometimes changed with little notice, and their
histories and planned futures are often recorded only fitfully. Here histories and planned futures are often recorded only fitfully. Here
is a summary of attempts to organize and record relevant data in this is a summary of attempts to organize and record relevant data in this
@ -20,12 +22,9 @@ time zone database contains code and data
that represent the history of local time that represent the history of local time
for many representative locations around the globe. for many representative locations around the globe.
It is updated periodically to reflect changes made by political bodies It is updated periodically to reflect changes made by political bodies
to <a href="https://en.wikipedia.org/wiki/Time_zone">time zone</a> to time zone boundaries and daylight saving rules.
boundaries and This database (known as <code><abbr>tz</abbr></code>,
<a href="https://en.wikipedia.org/wiki/Daylight_saving_time">daylight-saving</a> <code><abbr>tzdb</abbr></code>, or <code>zoneinfo</code>)
rules.
This database (often called <code>zoneinfo</code> or
<code><abbr>tz</abbr></code>)
is used by several implementations, is used by several implementations,
including including
<a href="https://www.gnu.org/software/libc/">the <a href="https://www.gnu.org/software/libc/">the
@ -109,7 +108,7 @@ gzip -dc tzdata-latest.tar.gz | tar -xf -
release in a single-tarball format containing extra data release in a single-tarball format containing extra data
useful for regression testing:</p> useful for regression testing:</p>
<pre style="margin-left: 2em"><code>wget <a href="https://www.iana.org/time-zones/repository/tzdb-latest.tar.lz">https://www.iana.org/time-zones/repository/tzdb-latest.tar.lz</a> <pre style="margin-left: 2em"><code>wget <a href="https://www.iana.org/time-zones/repository/tzdb-latest.tar.lz">https://www.iana.org/time-zones/repository/tzdb-latest.tar.lz</a>
<a href="http://www.nongnu.org/lzip/">lzip</a> -dc tzdb-latest.tar.lz | tar -xf - <a href="https://www.nongnu.org/lzip/">lzip</a> -dc tzdb-latest.tar.lz | tar -xf -
</code></pre> </code></pre>
<p>These commands use convenience links to the latest release <p>These commands use convenience links to the latest release
of the <code><abbr>tz</abbr></code> database hosted by the of the <code><abbr>tz</abbr></code> database hosted by the
@ -130,7 +129,7 @@ Since version 2016h, each release has contained a text file named
The releases are also available in an The releases are also available in an
<a href="ftp://ftp.iana.org/tz/releases/"><abbr <a href="ftp://ftp.iana.org/tz/releases/"><abbr
title="File Transfer Protocol">FTP</abbr> directory</a> via a title="File Transfer Protocol">FTP</abbr> directory</a> via a
less-secure protocol .</p> less-secure protocol.</p>
<p>Alternatively, a development repository of code and data can be <p>Alternatively, a development repository of code and data can be
retrieved from <a href="https://github.com">GitHub</a> via the shell retrieved from <a href="https://github.com">GitHub</a> via the shell
command:</p> command:</p>
@ -182,6 +181,8 @@ data yourself. System-specific instructions for installing the
latest <code><abbr>tz</abbr></code> data have also been published latest <code><abbr>tz</abbr></code> data have also been published
for <a href="https://www.ibm.com/developerworks/aix/library/au-aix-olson-time-zone/index.html"><abbr>AIX</abbr></a>, for <a href="https://www.ibm.com/developerworks/aix/library/au-aix-olson-time-zone/index.html"><abbr>AIX</abbr></a>,
<a <a
href="https://play.google.com/store/apps/details?id=com.google.android.timezone.data">Android</a>,
<a
href="http://userguide.icu-project.org/datetime/timezone"><abbr href="http://userguide.icu-project.org/datetime/timezone"><abbr
title="International Components for Unicode">ICU</abbr></a>, title="International Components for Unicode">ICU</abbr></a>,
<a href="https://developer.ibm.com/javasdk/support/dst/jtzu/"><abbr>IBM</abbr></a> <a href="https://developer.ibm.com/javasdk/support/dst/jtzu/"><abbr>IBM</abbr></a>
@ -190,7 +191,7 @@ href="http://www.oracle.com/technetwork/java/javase/tzupdater-readme-136440.html
Java, <a href="http://www.joda.org/joda-time/tz_update.html">Joda-Time</a>, <a Java, <a href="http://www.joda.org/joda-time/tz_update.html">Joda-Time</a>, <a
href="https://dev.mysql.com/doc/refman/en/time-zone-support.html">MySQL</a>, href="https://dev.mysql.com/doc/refman/en/time-zone-support.html">MySQL</a>,
and <a and <a
href="http://nodatime.org/userguide/tzdb">Noda Time</a> (see below). href="https://nodatime.org/userguide/tzdb">Noda Time</a> (see below).
</p> </p>
<p>Sources for the <code><abbr>tz</abbr></code> database are <p>Sources for the <code><abbr>tz</abbr></code> database are
<a href="https://en.wikipedia.org/wiki/UTF-8"><abbr <a href="https://en.wikipedia.org/wiki/UTF-8"><abbr
@ -201,7 +202,7 @@ title="linefeed">LF</abbr></a>,
which can be modified by common text editors such which can be modified by common text editors such
as <a href="https://www.gnu.org/software/emacs/">GNU Emacs</a>, 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="https://wiki.gnome.org/Apps/Gedit">gedit</a>, and
<a href="http://www.vim.org">vim</a>. <a href="https://www.vim.org">vim</a>.
Specialized source-file editing can be done via the Specialized source-file editing can be done via the
<a href="https://packagecontrol.io/packages/zoneinfo">Sublime <a href="https://packagecontrol.io/packages/zoneinfo">Sublime
zoneinfo</a> package for <a zoneinfo</a> package for <a
@ -237,9 +238,11 @@ These are listed roughly in ascending order of complexity and fanciness.
</p> </p>
<ul> <ul>
<li><a href="https://time.is">Time.is</a> shows locations' <li><a href="https://time.is">Time.is</a> shows locations'
time and zones in a simple format.</li> time and zones.</li>
<li><a href="https://www.timejones.com">TimeJones.com</a> is a simple <li><a href="https://www.timejones.com">TimeJones.com</a>,
time zone converter.</li> <a href="https://timezoneconverterapp.com">Time Zone Converter</a> and
<a href="http://worldclock.com">The World Clock</a>
are time zone converters.</li>
<li><a <li><a
href="http://twiki.org/cgi-bin/xtra/tzdatepick.html">Date and Time Gateway</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> lets you see the <code><abbr>TZ</abbr></code> values directly.</li>
@ -253,10 +256,12 @@ uses a pulldown menu.</li>
timezone information for all countries</a> displays tables of DST rules. timezone information for all countries</a> displays tables of DST rules.
<li><a href="https://www.timeanddate.com/worldclock/">The World Clock &ndash; <li><a href="https://www.timeanddate.com/worldclock/">The World Clock &ndash;
Worldwide</a> lets you sort zone names and convert times.</li> Worldwide</a> lets you sort zone names and convert times.</li>
<li><a href="http://www.zeitverschiebung.net/en/">Time Difference</a> <li><a href="https://24timezones.com">24TimeZones</a> has a world
time map and a time converter.</li>
<li><a href="https://www.zeitverschiebung.net/en/">Time Difference</a>
calculates the current time difference between locations.</li> 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.wx-now.com">Weather Now</a> and
<li><a href="http://www.thetimenow.com">The Time Now</a> also lists weather.</li> <a href="http://www.thetimenow.com">The Time Now</a> list the weather too.</li>
</ul> </ul>
<h2 id="protocols">Network protocols for <code><abbr>tz</abbr></code> data</h2> <h2 id="protocols">Network protocols for <code><abbr>tz</abbr></code> data</h2>
<ul> <ul>
@ -267,10 +272,10 @@ href="https://tools.ietf.org/html/rfc7808">TZDIST</a>
(Internet <abbr>RFC</abbr> 7808), a time zone data distribution service, (Internet <abbr>RFC</abbr> 7808), a time zone data distribution service,
along with <a href="https://tools.ietf.org/html/rfc7809">CalDAV</a> along with <a href="https://tools.ietf.org/html/rfc7809">CalDAV</a>
(Internet <abbr>RFC</abbr> 7809), a calendar access protocol for (Internet <abbr>RFC</abbr> 7809), a calendar access protocol for
transferring time zone data by reference. The (expired) draft <a transferring time zone data by reference. The draft <a
id="TZDIST-Geolocate" id="TZDIST-Geolocate"
href="https://tools.ietf.org/html/draft-murchison-tzdist-geolocate-00">TZDIST href="https://tools.ietf.org/html/draft-murchison-tzdist-geolocate-01">TZDIST
Geolocate Extension</a> would have let a client determine its time zone region Geolocate Extension</a> lets a client determine its time zone region
from its geographic location using a <a from its geographic location using a <a
href="https://tools.ietf.org/html/rfc5870">'geo' URI</a>.</li> href="https://tools.ietf.org/html/rfc5870">'geo' URI</a>.</li>
<li>The <a href="https://tools.ietf.org/html/rfc5545"> <li>The <a href="https://tools.ietf.org/html/rfc5545">
@ -285,7 +290,7 @@ variant <a href="https://tools.ietf.org/html/rfc6321">xCal</a>
title="Extensible Markup Language">XML</abbr></a> format, and a variant title="Extensible Markup Language">XML</abbr></a> format, and a variant
<a href="https://tools.ietf.org/html/rfc7265">jCal</a> <a href="https://tools.ietf.org/html/rfc7265">jCal</a>
(Internet <abbr>RFC</abbr> 7265) (Internet <abbr>RFC</abbr> 7265)
uses <a href="http://www.json.org"><abbr uses <a href="https://www.json.org"><abbr
title="JavaScript Object Notation">JSON</abbr></a> format.</li> title="JavaScript Object Notation">JSON</abbr></a> format.</li>
</ul> </ul>
<h2 id="compilers">Other <code><abbr>tz</abbr></code> compilers</h2> <h2 id="compilers">Other <code><abbr>tz</abbr></code> compilers</h2>
@ -316,9 +321,15 @@ transition in the <code><abbr>tz</abbr></code> database.</li>
<li>The <a href="https://howardhinnant.github.io/date/tz.html">Time Zone <li>The <a href="https://howardhinnant.github.io/date/tz.html">Time Zone
Database Parser</a> is a Database Parser</a> is a
<a href="https://en.wikipedia.org/wiki/C%2B%2B">C++</a> parser and <a href="https://en.wikipedia.org/wiki/C%2B%2B">C++</a> parser and
runtime library. It is freely available under the runtime library that is <a
<a href="https://creativecommons.org/licenses/by/4.0/">Creative Commons href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/p0355r4.html">moving
Attribution 4.0 International Public License</a>.</li> forward</a> for inclusion in the next iteration of <a
href="https://isocpp.org/std/the-standard"><em><abbr
title="International Organization for Standardization">ISO</abbr>
International Standard ISO/IEC 14882:2017(E) &ndash; Programming
Language C++</em></a>.
It is freely available under the
<abbr title="Massachusetts Institute of Technology">MIT</abbr> license.</li>
<li><a id="ICU" href="http://site.icu-project.org">International Components for <li><a id="ICU" href="http://site.icu-project.org">International Components for
Unicode (<abbr>ICU</abbr>)</a> contains C/C++ and <a Unicode (<abbr>ICU</abbr>)</a> contains C/C++ and <a
href="https://en.wikipedia.org/wiki/Java_%28programming_language%29">Java</a> href="https://en.wikipedia.org/wiki/Java_%28programming_language%29">Java</a>
@ -333,8 +344,7 @@ into an <abbr>ICU</abbr>-specific format.
the <a href="https://elixir-lang.org">Elixir</a> language downloads the <a href="https://elixir-lang.org">Elixir</a> language downloads
and compiles tz source and exposes <abbr and compiles tz source and exposes <abbr
title="Application Program Interface">API</abbr>s for use. It is title="Application Program Interface">API</abbr>s for use. It is
freely available under the <abbr freely available under the <abbr>MIT</abbr> license.</li>
title="Massachusetts Institute of Technology">MIT</abbr> license.</li>
<li>Java-based compilers and libraries include: <li>Java-based compilers and libraries include:
<ul> <ul>
<li>The <a <li>The <a
@ -364,7 +374,7 @@ License">LGPL</abbr>)</a>.</li>
<li><abbr>ICU</abbr> (mentioned <a href="#ICU">above</a>) contains compilers and <li><abbr>ICU</abbr> (mentioned <a href="#ICU">above</a>) contains compilers and
Java-based libraries.</li> Java-based libraries.</li>
</ul> </ul>
<li><a href="http://nodatime.org">Noda Time &ndash; Date and <li><a href="https://nodatime.org">Noda Time &ndash; Date and
time <abbr>API</abbr> for .NET</a> time <abbr>API</abbr> for .NET</a>
and <a href="http://www.babiej.demon.nl/Tz4Net/main.htm">TZ4Net</a> and <a href="http://www.babiej.demon.nl/Tz4Net/main.htm">TZ4Net</a>
are similar to Joda-Time and Time4J, but for the .NET framework instead of are similar to Joda-Time and Time4J, but for the .NET framework instead of
@ -374,6 +384,11 @@ and a <abbr>BSD</abbr>-style license, respectively.</li>
<li><a href="https://en.wikipedia.org/wiki/JavaScript">JavaScript</a>-based <li><a href="https://en.wikipedia.org/wiki/JavaScript">JavaScript</a>-based
compilers and libraries include: compilers and libraries include:
<ul> <ul>
<li><a
href="https://github.com/kshetline/compact-time-zone-generator">CompactTimeZoneGenerator</a>
compiles time zone data into a compact form designed for
JavaScript. It is freely available under a combination of
the <abbr>MIT</abbr> license and the Apache License.</li>
<li><a href="https://momentjs.com/timezone/">Moment Timezone</a> is a <li><a href="https://momentjs.com/timezone/">Moment Timezone</a> is a
plugin for the <a href="https://momentjs.com">Moment.js</a> date plugin for the <a href="https://momentjs.com">Moment.js</a> date
manipulation library. It is freely available under the <abbr>MIT</abbr> manipulation library. It is freely available under the <abbr>MIT</abbr>
@ -432,12 +447,20 @@ It is freely available under the <abbr>LGPL</abbr>.</li>
implementation of a binary file reader. It is freely available under implementation of a binary file reader. It is freely available under
the Apache License.</li> the Apache License.</li>
<li><a href="https://github.com/google/cctz">CCTZ</a> is a simple C++ <li><a href="https://github.com/google/cctz">CCTZ</a> is a simple C++
library that translates between <abbr>UTC</abbr> and civil time and library that translates between <abbr>UT</abbr> and civil time and
can read binary files. It is freely available under the Apache can read binary files. It is freely available under the Apache
License.</li> License.</li>
<li><a href="http://bmsi.com/java/#TZ">ZoneInfo.java</a> <li><a href="http://bmsi.com/java/#TZ">ZoneInfo.java</a>
is a <code><abbr>tz</abbr></code> binary file reader written in Java. is a <code><abbr>tz</abbr></code> binary file reader written in Java.
It is freely available under the <abbr>LGPL</abbr>.</li> It is freely available under the <abbr>LGPL</abbr>.</li>
<li><a href="https://github.com/derickr/timelib">Timelib</a> is a C
library that reads tz binary files and converts
time stamps from one time zone or format to another.
It is used by <a href="https://secure.php.net"><abbr
title="PHP: Hypertext Preprocessor">PHP</abbr></a>,
<a href="https://hhvm.com"><abbr title="HipHop Virtual Machine">HHVM</abbr></a>,
and <a href="https://www.mongodb.com">MongoDB</a>.
It is freely available under the <abbr>MIT</abbr> license.</li>
<li><a href="https://github.com/bigeasy/timezone">Timezone</a> is a <li><a href="https://github.com/bigeasy/timezone">Timezone</a> is a
JavaScript library that supports date arithmetic that is time zone JavaScript library that supports date arithmetic that is time zone
aware. It is freely available under the <abbr>MIT</abbr> license.</li> aware. It is freely available under the <abbr>MIT</abbr> license.</li>
@ -495,7 +518,7 @@ the older, proprietary method of Microsoft Windows 2000 and later,
which stores time zone data in the which stores time zone data in the
<a href="https://en.wikipedia.org/wiki/Windows_Registry">Windows Registry</a>. The <a href="https://en.wikipedia.org/wiki/Windows_Registry">Windows Registry</a>. The
<a <a
href="http://unicode.org/cldr/charts/latest/supplemental/zone_tzid.html">Zone &rarr; href="https://unicode.org/cldr/charts/latest/supplemental/zone_tzid.html">Zone &rarr;
Tzid table</a> or <a Tzid table</a> or <a
href="https://unicode.org/repos/cldr/trunk/common/supplemental/windowsZones.xml"><abbr>XML</abbr> href="https://unicode.org/repos/cldr/trunk/common/supplemental/windowsZones.xml"><abbr>XML</abbr>
file</a> of the <abbr>CLDR</abbr> data maps proprietary zone IDs file</a> of the <abbr>CLDR</abbr> data maps proprietary zone IDs
@ -505,7 +528,7 @@ href="https://www.oracle.com/java/index.html">Oracle
Java</a> contains a copy of a subset of a recent Java</a> contains a copy of a subset of a recent
<code><abbr>tz</abbr></code> database in a <code><abbr>tz</abbr></code> database in a
Java-specific format.</li> Java-specific format.</li>
<li><a href="http://www.relativedata.com/time-zone-master">Time Zone <li><a href="https://www.relativedata.com/time-zone-master">Time Zone
Master</a> is a Microsoft Windows clock program that can automatically Master</a> is a Microsoft Windows clock program that can automatically
download, compile and use <code>tz</code> releases. The Basic version download, compile and use <code>tz</code> releases. The Basic version
is free.</li> is free.</li>
@ -520,8 +543,8 @@ licenses</a> to <code><abbr>tz</abbr></code> contributors.</li>
<li><a href="https://www.astro.com/atlas">Time-zone Atlas</a> <li><a href="https://www.astro.com/atlas">Time-zone Atlas</a>
is Astrodienst's Web version of Shanks and Pottenger's is Astrodienst's Web version of Shanks and Pottenger's
time zone history atlases also published in <a time zone history atlases also published in <a
href="http://astrocom.com/astrology-products/software/acs-atlas-software">software</a> href="https://astrocom.com/astrology-products/software/acs-atlas-software">software</a>
form by <a href="http://astrocom.com">ACS-Starcrafts</a>. form by <a href="https://astrocom.com">ACS-Starcrafts</a>.
These atlases are extensive but unreliable, as Shanks appears to have These atlases are extensive but unreliable, as Shanks appears to have
guessed many <abbr>UT</abbr> offsets and transitions. The atlases cite no guessed many <abbr>UT</abbr> offsets and transitions. The atlases cite no
sources and do not indicate which entries are guesswork.</li> sources and do not indicate which entries are guesswork.</li>
@ -529,7 +552,7 @@ sources and do not indicate which entries are guesswork.</li>
its own <code>tztab</code>(4) format.</li> its own <code>tztab</code>(4) format.</li>
<li>Microsoft Windows has proprietary data mentioned <li>Microsoft Windows has proprietary data mentioned
<a href="#System.TimeZoneInfo">above</a>.</li> <a href="#System.TimeZoneInfo">above</a>.</li>
<li><a href="http://www.worldtimeserver.com">World Time Server</a> <li><a href="https://www.worldtimeserver.com">World Time Server</a>
is another time zone database.</li> is another time zone database.</li>
<li><a href="http://tycho.usno.navy.mil/tzones.html">World Time Zones</a> <li><a href="http://tycho.usno.navy.mil/tzones.html">World Time Zones</a>
contains data from the Time Service Department of the contains data from the Time Service Department of the
@ -553,16 +576,16 @@ Library Map Collection</a>
of the University of Texas at Austin has copies of of the University of Texas at Austin has copies of
recent editions. recent editions.
The pictorial quality is good, The pictorial quality is good,
but the maps do not indicate summer time, but the maps do not indicate daylight saving time,
and parts of the data are a few years out of date.</li> 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 <li><a href="https://www.worldtimezone.com">Current time around the world
and standard time zones map of the world</a> and standard time zones map of the world</a>
has several fancy time zone maps; it covers Russia particularly well. has several fancy time zone maps; it covers Russia particularly well.
The maps' pictorial quality is not quite as good as the The maps' pictorial quality is not quite as good as the
<abbr>CIA</abbr>'s <abbr>CIA</abbr>'s
but the maps are more up to date.</li> but the maps are more up to date.</li>
<li><a <li><a
href="http://blog.poormansmath.net/how-much-is-time-wrong-around-the-world/">How href="https://blog.poormansmath.net/how-much-is-time-wrong-around-the-world/">How
much is time wrong around the world?</a> maps the difference between much is time wrong around the world?</a> maps the difference between
mean solar and standard time, highlighting areas such as western China 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> where the two differ greatly. It's a bit out of date, unfortunately.</li>
@ -622,10 +645,10 @@ library for Python is freely available under the MIT license.
href="https://github.com/gunyarakun/timezone_finder">timezone_finder</a> href="https://github.com/gunyarakun/timezone_finder">timezone_finder</a>
library for Ruby is freely available under the MIT license.</li> library for Ruby is freely available under the MIT license.</li>
<li><a href="https://derickrethans.nl/what-time-is-it.html">What Time <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> is It Here?</a> applies MongoDB
geospatial query operators to shapefiles' data.</li> geospatial query operators to shapefiles' data.</li>
</ul></li> </ul></li>
<li>Free access via a network API, if you a key, is provided by <li>Free access via a network API, if you register a key, is provided by
the <a href="http://www.geonames.org/export/web-services.html#timezone">GeoNames Timezone web service</a>, the <a href="http://www.geonames.org/export/web-services.html#timezone">GeoNames Timezone web service</a>,
the <a href="https://developers.google.com/maps/documentation/timezone/intro">Google Maps Time Zone API</a>, and the <a href="https://developers.google.com/maps/documentation/timezone/intro">Google Maps Time Zone API</a>, and
the <a href="https://timezonedb.com">Time Zone Database &amp; API</a>. the <a href="https://timezonedb.com">Time Zone Database &amp; API</a>.
@ -643,16 +666,15 @@ political subdivision data related to time zones.</li>
<li><a href="http://home.kpn.nl/vanadovv/time/Multizones.html">Time <li><a href="http://home.kpn.nl/vanadovv/time/Multizones.html">Time
zone boundaries for multizone countries</a> summarizes legal zone boundaries for multizone countries</a> summarizes legal
boundaries between time zones within countries.</li> boundaries between time zones within countries.</li>
<li>Manifold.net's <a <li><a href="http://manifold.net/info/freestuff.shtml">Manifold Software
href="http://manifold.net/info/freestuff.shtml">Free Downloads for &ndash; GIS and Database Tools</a> includes a Manifold-format map of
Manifold System Users</a> includes a Manifold-format map of
world time zone boundaries distributed under the world time zone boundaries distributed under the
<abbr>GPL</abbr>.</li> <abbr>GPL</abbr>.</li>
<li>A ship within the <a <li>A ship within the <a
href="https://en.wikipedia.org/wiki/Territorial_waters">territorial href="https://en.wikipedia.org/wiki/Territorial_waters">territorial
waters</a> of any nation uses that nation's time. In international waters</a> of any nation uses that nation's time. In international
waters, time zone boundaries are meridians 15&deg; apart, except that waters, time zone boundaries are meridians 15&deg; apart, except that
<abbr>UTC</abbr>&minus;12 and <abbr>UTC</abbr>+12 are each 7.5&deg; <abbr>UT</abbr>&minus;12 and <abbr>UT</abbr>+12 are each 7.5&deg;
wide and are separated by wide and are separated by
the 180&deg; meridian (not by the International Date Line, which is the 180&deg; meridian (not by the International Date Line, which is
for land and territorial waters only). A captain can change ship's for land and territorial waters only). A captain can change ship's
@ -706,6 +728,10 @@ zones &amp; daylight saving time</a>.</dd>
<dd>The Hydrographic and Oceanographic Service of the Chilean Navy publishes a <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 <a href="http://www.horaoficial.cl/historia_hora.html" hreflang="es">history of
Chile's official time (in Spanish)</a>.</dd> Chile's official time (in Spanish)</a>.</dd>
<dt>Czech Republic</dt>
<dd><a href="https://kalendar.beda.cz/kdy-zacina-a-konci-letni-cas"
hreflang="cs">When daylight saving time starts and ends (in Czech)</a>
summarizes and cites historical DST regulations.</dd>
<dt>Germany</dt> <dt>Germany</dt>
<dd>The National Institute for Science and Technology maintains the <a <dd>The National Institute for Science and Technology maintains the <a
href="https://www.ptb.de/cms/en/fachabteilungen/abt4/fb-44/ag-441/realisation-of-legal-time-in-germany.html">Realisation href="https://www.ptb.de/cms/en/fachabteilungen/abt4/fb-44/ag-441/realisation-of-legal-time-in-germany.html">Realisation
@ -752,6 +778,11 @@ of Summer time dates</a>.</dd>
<dd>The Department of Transportation's <a <dd>The Department of Transportation's <a
href="https://www.transportation.gov/regulations/recent-time-zone-proceedings">Recent href="https://www.transportation.gov/regulations/recent-time-zone-proceedings">Recent
Time Zone Proceedings</a> lists changes to time zone boundaries.</dd> Time Zone Proceedings</a> lists changes to time zone boundaries.</dd>
<dt>Uruguay</dt>
<dd>The Oceanography, Hydrography, and Meteorology Service of the Uruguayan
Navy (SOHMA) publishes an annual <a
href="http://www.armada.mil.uy/Pagina/institucion/dimat/sohma/almanaque.html" hreflang="es">almanac
(in Spanish)</a>.</dd>
</dl> </dl>
<h2 id="precision">Precision timekeeping</h2> <h2 id="precision">Precision timekeeping</h2>
<ul> <ul>
@ -759,6 +790,8 @@ Time Zone Proceedings</a> lists changes to time zone boundaries.</dd>
href="http://leapsecond.com/hpan/an1289.pdf">The href="http://leapsecond.com/hpan/an1289.pdf">The
Science of Timekeeping</a> is a thorough introduction Science of Timekeeping</a> is a thorough introduction
to the theory and practice of precision timekeeping.</li> to the theory and practice of precision timekeeping.</li>
<li><a href="https://doi.org/10.1007/978-3-319-59909-0">The Science of
Time 2016</a> contains several freely-readable papers.</li>
<li><a href="http://www.ntp.org"><abbr <li><a href="http://www.ntp.org"><abbr
title="Network Time Protocol">NTP</abbr>: The Network title="Network Time Protocol">NTP</abbr>: The Network
Time Protocol</a> (Internet <abbr>RFC</abbr> 5905) Time Protocol</a> (Internet <abbr>RFC</abbr> 5905)
@ -778,12 +811,12 @@ href="https://en.wikipedia.org/wiki/Dynamic_Host_Configuration_Protocol"><abbr>D
option for a server to configure option for a server to configure
a client's time zone and daylight saving settings automatically.</li> a client's time zone and daylight saving settings automatically.</li>
<li><a <li><a
href="http://www.cv.nrao.edu/~rfisher/Ephemerides/times.html">Astronomical href="https://www.cv.nrao.edu/~rfisher/Ephemerides/times.html">Astronomical
Times</a> explains more abstruse astronomical time scales like Times</a> explains more abstruse astronomical time scales like
<abbr title="Terrestrial Dynamic Time">TDT</abbr>, <abbr title="Terrestrial Dynamic Time">TDT</abbr>,
<abbr title="Geocentric Coordinate Time">TCG</abbr>, and <abbr title="Geocentric Coordinate Time">TCG</abbr>, and
<abbr title="Barycentric Dynamic Time">TDB</abbr>. <abbr title="Barycentric Dynamic Time">TDB</abbr>.
<a href="http://www.ucolick.org/~sla/leapsecs/timescales.html">Time <a href="https://www.ucolick.org/~sla/leapsecs/timescales.html">Time
Scales</a> goes into more detail, particularly for historical variants.</li> Scales</a> goes into more detail, particularly for historical variants.</li>
<li>The <a href="https://www.iau.org"><abbr <li>The <a href="https://www.iau.org"><abbr
title="International Astronomical Union">IAU</abbr></a>'s <a title="International Astronomical Union">IAU</abbr></a>'s <a
@ -829,7 +862,7 @@ and Klepczynski's 1999 proposal to discontinue leap seconds</a>,
discussed further in discussed further in
<a href="https://www.cl.cam.ac.uk/~mgk25/time/metrologia-leapsecond.pdf">The <a href="https://www.cl.cam.ac.uk/~mgk25/time/metrologia-leapsecond.pdf">The
leap second: its history and possible future</a>. leap second: its history and possible future</a>.
<a href="http://www.ucolick.org/~sla/leapsecs/"><abbr>UTC</abbr> <a href="https://www.ucolick.org/~sla/leapsecs/"><abbr>UTC</abbr>
might be redefined might be redefined
without Leap Seconds</a> gives pointers on this without Leap Seconds</a> gives pointers on this
contentious issue, which was active until 2015 and could become active contentious issue, which was active until 2015 and could become active
@ -843,7 +876,7 @@ zone names, abbreviations, identifiers, and formats. For example, it
contains French translations for "Eastern European Summer Time", contains French translations for "Eastern European Summer Time",
"<abbr title="Eastern European Summer Time">EEST</abbr>", and "<abbr title="Eastern European Summer Time">EEST</abbr>", and
"Bucharest". Its "Bucharest". Its
<a href="http://unicode.org/cldr/charts/latest/by_type/">by-type <a href="https://unicode.org/cldr/charts/latest/by_type/">by-type
charts</a> show these values for many locales. Data values are available in charts</a> show these values for many locales. Data values are available in
both <abbr title="Locale Data Markup Language">LDML</abbr> both <abbr title="Locale Data Markup Language">LDML</abbr>
(an <abbr>XML</abbr> format) and <abbr>JSON</abbr>. (an <abbr>XML</abbr> format) and <abbr>JSON</abbr>.
@ -852,10 +885,9 @@ both <abbr title="Locale Data Markup Language">LDML</abbr>
the international standard date and time notation</a> is a good the international standard date and time notation</a> is a good
summary of summary of
<a <a
href="https://www.iso.org/standard/40874.html"><abbr href="https://www.iso.org/standard/40874.html"><em><abbr>ISO</abbr>
title="International Organization for Standardization">ISO</abbr>
8601:2004 &ndash; Data elements and interchange formats &ndash; Information 8601:2004 &ndash; Data elements and interchange formats &ndash; Information
interchange &ndash; Representation of dates and times</a>.</li> interchange &ndash; Representation of dates and times</em></a>.</li>
<li> <li>
<a href="https://www.w3.org/TR/xmlschema-2/#dateTime"><abbr>XML</abbr> <a href="https://www.w3.org/TR/xmlschema-2/#dateTime"><abbr>XML</abbr>
Schema: Datatypes &ndash; dateTime</a> specifies a format inspired by Schema: Datatypes &ndash; dateTime</a> specifies a format inspired by
@ -876,18 +908,18 @@ protocols.</li>
Formats on the Web</a> surveys web- and Internet-oriented date and time Formats on the Web</a> surveys web- and Internet-oriented date and time
formats.</li> formats.</li>
<li>Alphabetic time zone abbreviations should not be used as unique <li>Alphabetic time zone abbreviations should not be used as unique
identifiers for <abbr>UTC</abbr> offsets as they are ambiguous in identifiers for <abbr>UT</abbr> offsets as they are ambiguous in
practice. For example, in English-speaking North America practice. For example, in English-speaking North America
"<abbr>CST</abbr>" denotes 6 hours behind <abbr>UTC</abbr>, "<abbr>CST</abbr>" denotes 6 hours behind <abbr>UT</abbr>,
but in China it denotes 8 hours ahead of <abbr>UTC</abbr>, but in China it denotes 8 hours ahead of <abbr>UT</abbr>,
and French-speaking North Americans prefer and French-speaking North Americans prefer
"<abbr title="Heure Normale du Centre">HNC</abbr>" to "<abbr title="Heure Normale du Centre">HNC</abbr>" to
"<abbr>CST</abbr>". The <code><abbr>tz</abbr></code> "<abbr>CST</abbr>". The <code><abbr>tz</abbr></code>
database contains English abbreviations for many time stamps; database contains English abbreviations for many time stamps;
unfortunately some of these abbreviations were merely the database maintainers' unfortunately some of these abbreviations were merely the database maintainers'
inventions, and are gradually being removed.</li> inventions, and these have been removed when possible.</li>
<li>Numeric time zone abbreviations typically count hours east of <li>Numeric time zone abbreviations typically count hours east of
<abbr>UTC</abbr>, e.g., +09 for Japan and <abbr>UT</abbr>, e.g., +09 for Japan and
&minus;10 for Hawaii. However, the <abbr>POSIX</abbr> &minus;10 for Hawaii. However, the <abbr>POSIX</abbr>
<code><abbr>TZ</abbr></code> environment variable uses the opposite convention. <code><abbr>TZ</abbr></code> environment variable uses the opposite convention.
For example, one might use <code><abbr>TZ</abbr>="<abbr For example, one might use <code><abbr>TZ</abbr>="<abbr
@ -901,13 +933,13 @@ confusion, handle old time stamps better, and insulate you better from
any future changes to the rules. One should never set any future changes to the rules. One should never set
<abbr>POSIX</abbr> <code><abbr>TZ</abbr></code> to a value like <abbr>POSIX</abbr> <code><abbr>TZ</abbr></code> to a value like
<code>"GMT-9"</code>, though, since this would incorrectly imply that <code>"GMT-9"</code>, though, since this would incorrectly imply that
local time is nine hours ahead of <abbr>UTC</abbr> and the time zone local time is nine hours ahead of <abbr>UT</abbr> and the time zone
is called "<abbr>GMT</abbr>".</li> is called "<abbr>GMT</abbr>".</li>
</ul> </ul>
<h2 id="see-also">See also</h2> <h2 id="see-also">See also</h2>
<ul> <ul>
<li><a href="theory.html">Theory and pragmatics of the tz code and data</a></li> <li><a href="theory.html">Theory and pragmatics of the tz code and data</a></li>
<li><a href="tz-art.htm">Time and the Arts</a></li> <li><a href="tz-art.html">Time and the Arts</a></li>
</ul> </ul>
<hr> <hr>
<address> <address>

View File

@ -1,5 +1,5 @@
.\" $NetBSD: tzset.3,v 1.37 2018/01/25 22:48:42 christos Exp $ .\" $NetBSD: tzset.3,v 1.38 2018/05/04 15:51:00 christos Exp $
.Dd January 25, 2018 .Dd May 5, 2018
.Dt TZSET 3 .Dt TZSET 3
.Os .Os
.Sh NAME .Sh NAME
@ -175,14 +175,15 @@ where:
.It Cm std No and Cm dst .It Cm std No and Cm dst
Three or more bytes that are the designation for the standard Three or more bytes that are the designation for the standard
.Cm ( std ) .Cm ( std )
or summer or the alternative
.Cm ( dst ) .Cm ( dst
such as daylight saving time)
time zone. time zone.
Only Only
.Cm std .Cm std
is required; if is required; if
.Cm dst .Cm dst
is missing, then summer time does not apply in this locale. is missing, then daylight saving time does not apply in this locale.
Upper- and lowercase letters are explicitly allowed. Upper- and lowercase letters are explicitly allowed.
Any characters except a leading colon (:), digits, comma (,), minus (-), Any characters except a leading colon (:), digits, comma (,), minus (-),
plus (+), and NUL bytes are allowed. plus (+), and NUL bytes are allowed.
@ -225,7 +226,7 @@ If no
.Cm offset .Cm offset
follows follows
.Cm dst , .Cm dst ,
summer time is assumed to be one hour ahead of standard time. daylight saving 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 One or more digits may be used; the value is always interpreted as a
decimal number. decimal number.
The hour must be between zero and 24, and the minutes (and The hour must be between zero and 24, and the minutes (and
@ -236,7 +237,7 @@ the time zone shall be east of the Prime Meridian; otherwise it shall be
west (which may be indicated by an optional preceding west (which may be indicated by an optional preceding
.Dq + ) . .Dq + ) .
.It Cm rule .It Cm rule
Indicates when to change to and back from summer time. Indicates when to change to and back from daylight saving time.
The The
.Cm rule .Cm rule
has the form: has the form:
@ -253,7 +254,7 @@ has the form:
.Pp .Pp
where the first where the first
.Cm date .Cm date
describes when the change from standard to summer time occurs and the describes when the change from standard to daylight saving time occurs and the
second second
.Cm date .Cm date
describes when the change back happens. describes when the change back happens.
@ -337,30 +338,41 @@ extensions to POSIX.
stands for US Eastern Standard stands for US Eastern Standard
Time (EST), 5 hours behind UT, without daylight saving. Time (EST), 5 hours behind UT, without daylight saving.
.It FJT\-12FJST,M11.1.0,M1.3.4/75 .It FJT\-12FJST,M11.1.0,M1.3.4/75
stands for Fiji Time (FJT) and Fiji Summer Time (FJST), 12 hours ahead .It <+12>\-12<+13>,M11.1.0,M1.2.1/147
stands for Fiji time, 12 hours ahead
of UT, springing forward on November's first Sunday at 02:00, and of UT, 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 falling back on January's second Monday at 147:00 (i.e., 03:00 on the
first Sunday on or after January 18). first Sunday on or after January 14).
The abbreviations for standard and daylight saving time are
.Qq +12
and
.Qq +13 .
.It IST\-2IDT,M3.4.4/26,M10.5.0 .It IST\-2IDT,M3.4.4/26,M10.5.0
stands for Israel Standard Time (IST) and Israel Daylight Time (IDT), stands for Israel Standard Time (IST) and Israel Daylight Time (IDT),
2 hours ahead of UT, springing forward on March's fourth 2 hours ahead of UT, springing forward on March's fourth
Thursday at 26:00 (i.e., 02:00 on the first Friday on or after March 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. 23), and falling back on October's last Sunday at 02:00.
.It WART4WARST,J1/0,J365/25 .It <\-04>4<\-03>,J1/0,J365/25
stands for Western Argentina Summer Time (WARST), 3 hours behind UT. stands for permanent daylight saving time, 3 hours behind UT with
abbreviation
.Qq \-03 .
There is a dummy fall-back transition on December 31 at 25:00 daylight 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 saving time (i.e., 24:00 standard time, equivalent to January 1 at
00:00 standard time), and a simultaneous spring-forward transition on 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 January 1 at 00:00 standard time, so daylight saving time is in effect
all year and the initial all year and the initial
.Em WART .Em <\-04>
is a placeholder. is a placeholder.
.It WGT3WGST,M3.5.0/\-2,M10.5.0/\-1 .It <\-03>3<\-02>,M3.5.0/\-2,M10.5.0/\-1
stands for Western Greenland Time (WGT) and Western Greenland Summer stands for time in western Greenland, 3 hours behind UT, where clocks
Time (WGST), 3 hours behind UT, where clocks follow the EU rules of follow the EU rules of
springing forward on March's last Sunday at 01:00 UT (\-02:00 local springing forward on March's last Sunday at 01:00 UT (\-02:00 local
time) and falling back on October's last Sunday at 01:00 UT time, i.e., 22:00 the previous day) and falling back on October's last
(\-01:00 local time). Sunday at 01:00 UT (\-01:00 local time, i.e., 23:00 the previous day).
The abbreviations for standard and daylight saving time are
.Qq \-03
and
.Qq \-02 .
.El .El
.Pp .Pp
If no If no
@ -373,7 +385,7 @@ format file
.Pa posixrules .Pa posixrules
in in
.Pa /usr/share/zoneinfo .Pa /usr/share/zoneinfo
are used, with the standard and summer time offsets from UT replaced are used, with the standard and daylight saving time offsets from UT replaced
by those specified by the by those specified by the
.Cm offset .Cm offset
values in values in

View File

@ -1 +1 @@
2018c 2018e

View File

@ -1,4 +1,4 @@
/* $NetBSD: zdump.c,v 1.48 2018/01/25 22:48:42 christos Exp $ */ /* $NetBSD: zdump.c,v 1.49 2018/05/04 15:51:00 christos Exp $ */
/* /*
** This file is in the public domain, so clarified as of ** This file is in the public domain, so clarified as of
** 2009-05-17 by Arthur David Olson. ** 2009-05-17 by Arthur David Olson.
@ -6,22 +6,12 @@
#include <sys/cdefs.h> #include <sys/cdefs.h>
#ifndef lint #ifndef lint
__RCSID("$NetBSD: zdump.c,v 1.48 2018/01/25 22:48:42 christos Exp $"); __RCSID("$NetBSD: zdump.c,v 1.49 2018/05/04 15:51:00 christos Exp $");
#endif /* !defined lint */ #endif /* !defined lint */
/*
** 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 #ifndef NETBSD_INSPIRED
# define NETBSD_INSPIRED 1 # define NETBSD_INSPIRED 1
#endif #endif
#ifndef USE_LTZ
# define USE_LTZ 1
#endif
#include <err.h> #include <err.h>
#include "private.h" #include "private.h"
@ -149,7 +139,7 @@ sumsize(size_t a, size_t b)
/* Return a pointer to a newly allocated buffer of size SIZE, exiting /* Return a pointer to a newly allocated buffer of size SIZE, exiting
on failure. SIZE should be nonzero. */ on failure. SIZE should be nonzero. */
static void * static void * ATTRIBUTE_MALLOC
xmalloc(size_t size) xmalloc(size_t size)
{ {
void *p = malloc(size); void *p = malloc(size);

View File

@ -1,5 +1,5 @@
.\" $NetBSD: zic.8,v 1.28 2018/01/25 22:48:42 christos Exp $ .\" $NetBSD: zic.8,v 1.29 2018/05/04 15:51:00 christos Exp $
.Dd January 25, 2018 .Dd May 5, 2018
.Dt ZIC 8 .Dt ZIC 8
.Os .Os
.Sh NAME .Sh NAME
@ -156,11 +156,11 @@ abbreviation must be unambiguous in context.
.Pp .Pp
A rule line has the form A rule line has the form
.Pp .Pp
.Dl Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S .Dl Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
.Pp .Pp
For example: For example:
.Pp .Pp
.Dl Rule US 1967 1973 \- Apr lastSun 2:00 1:00 D .Dl Rule US 1967 1973 \- Apr lastSun 2:00s 1:00d D
.Pp .Pp
The fields that make up a rule line are: The fields that make up a rule line are:
.Bl -tag -width "LETTER/S" .Bl -tag -width "LETTER/S"
@ -233,13 +233,15 @@ field.
Gives the time of day at which the rule takes effect. Gives the time of day at which the rule takes effect.
Recognized forms include: Recognized forms include:
.Pp .Pp
.Bl -tag -width "01X28X14" -compact -offset indent .Bl -tag -width "00X19X32X13" -compact -offset indent
.It 2 .It 2
time in hours time in hours
.It 2:00 .It 2:00
time in hours and minutes time in hours and minutes
.It 01:28:14 .It 01:28:14
time in hours, minutes, and seconds time in hours, minutes, and seconds
.It 00:19:32.13
time with fractional seconds
.It 15:00 .It 15:00
24-hour format time (for times after noon) 24-hour format time (for times after noon)
.It 260:00 .It 260:00
@ -252,6 +254,12 @@ equivalent to 0
.Pp .Pp
where hour 0 is midnight at the start of the day, where hour 0 is midnight at the start of the day,
and hour 24 is midnight at the end of the day. and hour 24 is midnight at the end of the day.
Although
.I zic
rounds times to the nearest integer second
(breaking ties to the even integer), the fractions may be useful
to other applications requiring greater precision.
The source format does not specify any maximum precision.
Any of these forms may be followed by the letter Any of these forms may be followed by the letter
.Em w .Em w
if the given time is local if the given time is local
@ -275,16 +283,23 @@ clock/calendar set to the type of time specified in the
field would show the specified date and time of day. field would show the specified date and time of day.
.It SAVE .It SAVE
Gives the amount of time to be added to local standard time when the rule is in Gives the amount of time to be added to local standard time when the rule is in
effect. effect, and whether the resulting time is standard or daylight saving.
This field has the same format as the This field has the same format as the
.Em AT .Em AT
field field
(although, of course, the .Em s
suffixes are not used). for standard time and
.Em d
for daylight saving time.
The suffix letter is typically omitted, and defaults to
.Em s
if the offset is zero and to
.Em d
otherwise.
Negative offsets are allowed; in Ireland, for example, daylight saving Negative offsets are allowed; in Ireland, for example, daylight saving
time is observed in winter and has a negative offset relative to time is observed in winter and has a negative offset relative to
Irish Standard Time. Irish Standard Time.
Only the sum of standard time and this amount matters; for example, The offset is merely added to standard time; for example,
.Nm .Nm
does not distinguish a 10:30 standard time plus an 0:30 does not distinguish a 10:30 standard time plus an 0:30
.Em SAVE .Em SAVE
@ -337,7 +352,9 @@ fields of rule lines;
begin the field with a minus sign if time must be subtracted from UT. begin the field with a minus sign if time must be subtracted from UT.
.It RULES .It RULES
The name of the rules that apply in the time zone or, The name of the rules that apply in the time zone or,
alternatively, an amount of time to add to local standard time. alternatively, a field in the same format as a rule-line SAVE column,
giving of the amount of time to be added to local standard time
effect, and whether the resulting time is standard or daylight saving.
If this field is If this field is
.Em \&- .Em \&-
then standard time always applies in the time zone. then standard time always applies in the time zone.
@ -350,7 +367,7 @@ The pair of characters
is used to show where the is used to show where the
.Dq variable part .Dq variable part
of the time zone abbreviation goes. of the time zone abbreviation goes.
Alternately, a format can use the pair of characters Alternatively, a format can use the pair of characters
.Em %z .Em %z
+to stand for the UT offset in the form +to stand for the UT offset in the form
.Em \(+- hh , .Em \(+- hh ,

View File

@ -1,4 +1,4 @@
/* $NetBSD: zic.c,v 1.70 2018/01/25 22:48:42 christos Exp $ */ /* $NetBSD: zic.c,v 1.71 2018/05/04 15:51:00 christos Exp $ */
/* /*
** This file is in the public domain, so clarified as of ** This file is in the public domain, so clarified as of
** 2006-07-17 by Arthur David Olson. ** 2006-07-17 by Arthur David Olson.
@ -10,7 +10,7 @@
#include <sys/cdefs.h> #include <sys/cdefs.h>
#ifndef lint #ifndef lint
__RCSID("$NetBSD: zic.c,v 1.70 2018/01/25 22:48:42 christos Exp $"); __RCSID("$NetBSD: zic.c,v 1.71 2018/05/04 15:51:00 christos Exp $");
#endif /* !defined lint */ #endif /* !defined lint */
#include "private.h" #include "private.h"
@ -52,6 +52,10 @@ typedef int_fast64_t zic_t;
#else #else
#define MKDIR_UMASK 0755 #define MKDIR_UMASK 0755
#endif #endif
/* Port to native MS-Windows and to ancient UNIX. */
#if !defined S_ISDIR && defined S_IFDIR && defined S_IFMT
# define S_ISDIR(mode) (((mode) & S_IFMT) == S_IFDIR)
#endif
#if HAVE_SYS_WAIT_H #if HAVE_SYS_WAIT_H
#include <sys/wait.h> /* for WIFEXITED and WEXITSTATUS */ #include <sys/wait.h> /* for WIFEXITED and WEXITSTATUS */
@ -96,7 +100,9 @@ struct rule {
/* or wall clock time if 0 */ /* or wall clock time if 0 */
bool r_todisgmt; /* above is GMT if 1 */ bool r_todisgmt; /* above is GMT if 1 */
/* or local time if 0 */ /* or local time if 0 */
zic_t r_stdoff; /* offset from standard time */ bool r_isdst; /* is this daylight saving time? */
zic_t r_stdoff; /* offset from default time (which is
usually standard time) */
const char * r_abbrvar; /* variable part of abbreviation */ const char * r_abbrvar; /* variable part of abbreviation */
bool r_todo; /* a rule to do (used in outzone) */ bool r_todo; /* a rule to do (used in outzone) */
@ -117,10 +123,11 @@ struct zone {
const char * z_name; const char * z_name;
zic_t z_gmtoff; zic_t z_gmtoff;
const char * z_rule; char * z_rule;
const char * z_format; const char * z_format;
char z_format_specifier; char z_format_specifier;
bool z_isdst;
zic_t z_stdoff; zic_t z_stdoff;
struct rule * z_rules; struct rule * z_rules;
@ -160,6 +167,7 @@ static void dolink(const char *, const char *, bool);
static char ** getfields(char * buf); static char ** getfields(char * buf);
static zic_t gethms(const char * string, const char * errstring, static zic_t gethms(const char * string, const char * errstring,
bool); bool);
static zic_t getstdoff(char *, bool *);
static void infile(const char * filename); static void infile(const char * filename);
static void inleap(char ** fields, int nfields); static void inleap(char ** fields, int nfields);
static void inlink(char ** fields, int nfields); static void inlink(char ** fields, int nfields);
@ -450,7 +458,7 @@ memcheck(void *ptr)
return ptr; return ptr;
} }
static void * static void * ATTRIBUTE_MALLOC
zic_malloc(size_t size) zic_malloc(size_t size)
{ {
return memcheck(malloc(size)); return memcheck(malloc(size));
@ -462,7 +470,7 @@ zic_realloc(void *ptr, size_t size)
return memcheck(realloc(ptr, size)); return memcheck(realloc(ptr, size));
} }
static char * static char * ATTRIBUTE_MALLOC
ecpyalloc(char const *str) ecpyalloc(char const *str)
{ {
return memcheck(strdup(str)); return memcheck(strdup(str));
@ -905,9 +913,11 @@ dolink(char const *fromfield, char const *tofield, bool staysymlink)
char *linkalloc = absolute ? NULL : relname(fromfield, tofield); char *linkalloc = absolute ? NULL : relname(fromfield, tofield);
char const *contents = absolute ? fromfield : linkalloc; char const *contents = absolute ? fromfield : linkalloc;
int symlink_errno = symlink(contents, tofield) == 0 ? 0 : errno; int symlink_errno = symlink(contents, tofield) == 0 ? 0 : errno;
if (symlink_errno == ENOENT && !todirs_made) { if (!todirs_made
&& (symlink_errno == ENOENT || symlink_errno == ENOTSUP)) {
mkdirs(tofield, true); mkdirs(tofield, true);
symlink_errno = symlink(contents, tofield) == 0 ? 0 : errno; if (symlink_errno == ENOENT)
symlink_errno = symlink(contents, tofield) == 0 ? 0 : errno;
} }
free(linkalloc); free(linkalloc);
if (symlink_errno == 0) { if (symlink_errno == 0) {
@ -1095,8 +1105,7 @@ associate(void)
** Maybe we have a local standard time offset. ** Maybe we have a local standard time offset.
*/ */
eat(zp->z_filename, zp->z_linenum); eat(zp->z_filename, zp->z_linenum);
zp->z_stdoff = gethms(zp->z_rule, _("unruly zone"), zp->z_stdoff = getstdoff(zp->z_rule, &zp->z_isdst);
true);
/* /*
** Note, though, that if there's no rule, ** Note, though, that if there's no rule,
** a '%s' in the format is a bad thing. ** a '%s' in the format is a bad thing.
@ -1203,8 +1212,10 @@ static zic_t
gethms(char const *string, char const *errstring, bool signable) gethms(char const *string, char const *errstring, bool signable)
{ {
zic_t hh; zic_t hh;
int mm, ss, sign; int sign, mm = 0, ss = 0;
char xs; char hhx, mmx, ssx, xr = '0', xs;
int tenths = 0;
bool ok = true;
if (string == NULL || *string == '\0') if (string == NULL || *string == '\0')
return 0; return 0;
@ -1214,12 +1225,24 @@ gethms(char const *string, char const *errstring, bool signable)
sign = -1; sign = -1;
++string; ++string;
} else sign = 1; } else sign = 1;
if (sscanf(string, "%"SCNdZIC"%c", &hh, &xs) == 1) switch (sscanf(string,
mm = ss = 0; "%"SCNdZIC"%c%d%c%d%c%1d%*[0]%c%*[0123456789]%c",
else if (sscanf(string, "%"SCNdZIC":%d%c", &hh, &mm, &xs) == 2) &hh, &hhx, &mm, &mmx, &ss, &ssx, &tenths, &xr, &xs)) {
ss = 0; default: ok = false; break;
else if (sscanf(string, "%"SCNdZIC":%d:%d%c", &hh, &mm, &ss, &xs) case 8:
!= 3) { ok = '0' <= xr && xr <= '9';
/* fallthrough */
case 7:
ok &= ssx == '.';
if (ok && noise)
warning(_("fractional seconds rejected by"
" pre-2018 versions of zic"));
/* fallthrough */
case 5: ok &= mmx == ':'; /* fallthrough */
case 3: ok &= hhx == ':'; /* fallthrough */
case 1: break;
}
if (!ok) {
error("%s", errstring); error("%s", errstring);
return 0; return 0;
} }
@ -1233,6 +1256,7 @@ gethms(char const *string, char const *errstring, bool signable)
error(_("time overflow")); error(_("time overflow"));
return 0; return 0;
} }
ss += 5 + ((ss ^ 1) & (xr == '0')) <= tenths; /* Round to even. */
if (noise && (hh > HOURSPERDAY || if (noise && (hh > HOURSPERDAY ||
(hh == HOURSPERDAY && (mm != 0 || ss != 0)))) (hh == HOURSPERDAY && (mm != 0 || ss != 0))))
warning(_("values over 24 hours not handled by pre-2007 versions of zic")); warning(_("values over 24 hours not handled by pre-2007 versions of zic"));
@ -1240,6 +1264,24 @@ warning(_("values over 24 hours not handled by pre-2007 versions of zic"));
sign * (mm * SECSPERMIN + ss)); sign * (mm * SECSPERMIN + ss));
} }
static zic_t
getstdoff(char *field, bool *isdst)
{
int dst = -1;
zic_t stdoff;
size_t fieldlen = strlen(field);
if (fieldlen != 0) {
char *ep = field + fieldlen - 1;
switch (*ep) {
case 'd': dst = 1; *ep = '\0'; break;
case 's': dst = 0; *ep = '\0'; break;
}
}
stdoff = gethms(field, _("invalid saved time"), true);
*isdst = dst < 0 ? stdoff != 0 : dst;
return stdoff;
}
static void static void
inrule(char **fields, int nfields) inrule(char **fields, int nfields)
{ {
@ -1255,7 +1297,7 @@ inrule(char **fields, int nfields)
} }
r.r_filename = filename; r.r_filename = filename;
r.r_linenum = linenum; r.r_linenum = linenum;
r.r_stdoff = gethms(fields[RF_STDOFF], _("invalid saved time"), true); r.r_stdoff = getstdoff(fields[RF_STDOFF], &r.r_isdst);
rulesub(&r, fields[RF_LOYEAR], fields[RF_HIYEAR], fields[RF_COMMAND], rulesub(&r, fields[RF_LOYEAR], fields[RF_HIYEAR], fields[RF_COMMAND],
fields[RF_MONTH], fields[RF_DAY], fields[RF_TOD]); fields[RF_MONTH], fields[RF_DAY], fields[RF_TOD]);
r.r_name = ecpyalloc(fields[RF_NAME]); r.r_name = ecpyalloc(fields[RF_NAME]);
@ -2106,7 +2148,7 @@ abbroffset(char *buf, zic_t offset)
static size_t static size_t
doabbr(char *abbr, int abbrlen, struct zone const *zp, const char *letters, doabbr(char *abbr, int abbrlen, struct zone const *zp, const char *letters,
zic_t stdoff, bool doquotes) bool isdst, zic_t stdoff, bool doquotes)
{ {
char * cp; char * cp;
char * slashp; char * slashp;
@ -2121,7 +2163,7 @@ doabbr(char *abbr, int abbrlen, struct zone const *zp, const char *letters,
else if (!letters) else if (!letters)
letters = "%s"; letters = "%s";
snprintf(abbr, abbrlen, format, letters); snprintf(abbr, abbrlen, format, letters);
} else if (stdoff != 0) { } else if (isdst) {
strlcpy(abbr, slashp + 1, abbrlen); strlcpy(abbr, slashp + 1, abbrlen);
} else { } else {
memcpy(abbr, format, slashp - format); memcpy(abbr, format, slashp - format);
@ -2232,7 +2274,7 @@ stringrule(char *result, const struct rule *const rp, const zic_t dstoff,
} }
if (rp->r_todisgmt) if (rp->r_todisgmt)
tod += gmtoff; tod += gmtoff;
if (rp->r_todisstd && rp->r_stdoff == 0) if (rp->r_todisstd && !rp->r_isdst)
tod += dstoff; tod += dstoff;
if (tod != 2 * SECSPERMIN * MINSPERHOUR) { if (tod != 2 * SECSPERMIN * MINSPERHOUR) {
*result++ = '/'; *result++ = '/';
@ -2290,7 +2332,7 @@ stringzone(char *result, const int resultlen, const struct zone *const zpfirst,
continue; continue;
if (rp->r_yrtype != NULL) if (rp->r_yrtype != NULL)
continue; continue;
if (rp->r_stdoff == 0) { if (!rp->r_isdst) {
if (stdrp == NULL) if (stdrp == NULL)
stdrp = rp; stdrp = rp;
else return -1; else return -1;
@ -2309,7 +2351,7 @@ stringzone(char *result, const int resultlen, const struct zone *const zpfirst,
struct rule *stdabbrrp = NULL; struct rule *stdabbrrp = NULL;
for (i = 0; i < zp->z_nrules; ++i) { for (i = 0; i < zp->z_nrules; ++i) {
rp = &zp->z_rules[i]; rp = &zp->z_rules[i];
if (rp->r_stdoff == 0 && rule_cmp(stdabbrrp, rp) < 0) if (!rp->r_isdst && rule_cmp(stdabbrrp, rp) < 0)
stdabbrrp = rp; stdabbrrp = rp;
if (rule_cmp(stdrp, rp) < 0) if (rule_cmp(stdrp, rp) < 0)
stdrp = rp; stdrp = rp;
@ -2322,13 +2364,14 @@ stringzone(char *result, const int resultlen, const struct zone *const zpfirst,
if (stdrp != NULL && stdrp->r_hiyear == 2037) if (stdrp != NULL && stdrp->r_hiyear == 2037)
return YEAR_BY_YEAR_ZONE; return YEAR_BY_YEAR_ZONE;
if (stdrp != NULL && stdrp->r_stdoff != 0) { if (stdrp != NULL && stdrp->r_isdst) {
/* Perpetual DST. */ /* Perpetual DST. */
dstr.r_month = TM_JANUARY; dstr.r_month = TM_JANUARY;
dstr.r_dycode = DC_DOM; dstr.r_dycode = DC_DOM;
dstr.r_dayofmonth = 1; dstr.r_dayofmonth = 1;
dstr.r_tod = 0; dstr.r_tod = 0;
dstr.r_todisstd = dstr.r_todisgmt = false; dstr.r_todisstd = dstr.r_todisgmt = false;
dstr.r_isdst = stdrp->r_isdst;
dstr.r_stdoff = stdrp->r_stdoff; dstr.r_stdoff = stdrp->r_stdoff;
dstr.r_abbrvar = stdrp->r_abbrvar; dstr.r_abbrvar = stdrp->r_abbrvar;
stdr.r_month = TM_DECEMBER; stdr.r_month = TM_DECEMBER;
@ -2336,6 +2379,7 @@ stringzone(char *result, const int resultlen, const struct zone *const zpfirst,
stdr.r_dayofmonth = 31; stdr.r_dayofmonth = 31;
stdr.r_tod = SECSPERDAY + stdrp->r_stdoff; stdr.r_tod = SECSPERDAY + stdrp->r_stdoff;
stdr.r_todisstd = stdr.r_todisgmt = false; stdr.r_todisstd = stdr.r_todisgmt = false;
stdr.r_isdst = false;
stdr.r_stdoff = 0; stdr.r_stdoff = 0;
stdr.r_abbrvar stdr.r_abbrvar
= (stdabbrrp ? stdabbrrp->r_abbrvar : ""); = (stdabbrrp ? stdabbrrp->r_abbrvar : "");
@ -2343,10 +2387,10 @@ stringzone(char *result, const int resultlen, const struct zone *const zpfirst,
stdrp = &stdr; stdrp = &stdr;
} }
} }
if (stdrp == NULL && (zp->z_nrules != 0 || zp->z_stdoff != 0)) if (stdrp == NULL && (zp->z_nrules != 0 || zp->z_isdst))
return -1; return -1;
abbrvar = (stdrp == NULL) ? "" : stdrp->r_abbrvar; abbrvar = (stdrp == NULL) ? "" : stdrp->r_abbrvar;
len = doabbr(result, resultlen, zp, abbrvar, 0, true); len = doabbr(result, resultlen, zp, abbrvar, false, 0, true);
offsetlen = stringoffset(result + len, -zp->z_gmtoff); offsetlen = stringoffset(result + len, -zp->z_gmtoff);
if (! offsetlen) { if (! offsetlen) {
result[0] = '\0'; result[0] = '\0';
@ -2355,7 +2399,8 @@ stringzone(char *result, const int resultlen, const struct zone *const zpfirst,
len += offsetlen; len += offsetlen;
if (dstrp == NULL) if (dstrp == NULL)
return compat; return compat;
len += doabbr(result + len, resultlen - len, zp, dstrp->r_abbrvar, dstrp->r_stdoff, true); len += doabbr(result + len, resultlen - len, zp, dstrp->r_abbrvar,
dstrp->r_isdst, dstrp->r_stdoff, true);
if (dstrp->r_stdoff != SECSPERMIN * MINSPERHOUR) { if (dstrp->r_stdoff != SECSPERMIN * MINSPERHOUR) {
offsetlen = stringoffset(result + len, offsetlen = stringoffset(result + len,
-(zp->z_gmtoff + dstrp->r_stdoff)); -(zp->z_gmtoff + dstrp->r_stdoff));
@ -2532,7 +2577,7 @@ outzone(const struct zone *zpfirst, ptrdiff_t zonecount)
if (zp->z_nrules == 0) { if (zp->z_nrules == 0) {
stdoff = zp->z_stdoff; stdoff = zp->z_stdoff;
doabbr(startbuf, max_abbr_len + 1, zp, doabbr(startbuf, max_abbr_len + 1, zp,
NULL, stdoff, false); NULL, zp->z_isdst, stdoff, false);
type = addtype(oadd(zp->z_gmtoff, stdoff), type = addtype(oadd(zp->z_gmtoff, stdoff),
startbuf, stdoff != 0, startttisstd, startbuf, stdoff != 0, startttisstd,
startttisgmt); startttisgmt);
@ -2632,6 +2677,7 @@ outzone(const struct zone *zpfirst, ptrdiff_t zonecount)
max_abbr_len + 1, max_abbr_len + 1,
zp, zp,
rp->r_abbrvar, rp->r_abbrvar,
rp->r_isdst,
rp->r_stdoff, rp->r_stdoff,
false); false);
continue; continue;
@ -2643,6 +2689,7 @@ outzone(const struct zone *zpfirst, ptrdiff_t zonecount)
max_abbr_len + 1, max_abbr_len + 1,
zp, zp,
rp->r_abbrvar, rp->r_abbrvar,
rp->r_isdst,
rp->r_stdoff, rp->r_stdoff,
false); false);
} }
@ -2650,9 +2697,9 @@ outzone(const struct zone *zpfirst, ptrdiff_t zonecount)
eats(zp->z_filename, zp->z_linenum, eats(zp->z_filename, zp->z_linenum,
rp->r_filename, rp->r_linenum); rp->r_filename, rp->r_linenum);
doabbr(ab, max_abbr_len + 1, zp, rp->r_abbrvar, doabbr(ab, max_abbr_len + 1, zp, rp->r_abbrvar,
rp->r_stdoff, false); rp->r_isdst, rp->r_stdoff, false);
offset = oadd(zp->z_gmtoff, rp->r_stdoff); offset = oadd(zp->z_gmtoff, rp->r_stdoff);
type = addtype(offset, ab, rp->r_stdoff != 0, type = addtype(offset, ab, rp->r_isdst,
rp->r_todisstd, rp->r_todisgmt); rp->r_todisstd, rp->r_todisgmt);
if (rp->r_hiyear == ZIC_MAX if (rp->r_hiyear == ZIC_MAX
&& ! (0 <= lastatmax && ! (0 <= lastatmax