tzcode: Update to 2026a
Many thanks to Paul Eggert for adopting most of our adaptations as optional features upstream in the previous release (2025c). MFC after: 1 week Reviewed by: philip Differential Revision: https://reviews.freebsd.org/D55741
This commit is contained in:
+20
-16
@@ -10,26 +10,27 @@ warning, the data entries do not cover all of civil time before
|
||||
1970, and undoubtedly errors remain in the code and data. Feel
|
||||
free to fill gaps or fix mistakes, and please email improvements
|
||||
to <tz@iana.org> for use in the future. In your email, please give
|
||||
reliable sources that reviewers can check.
|
||||
reliable sources that reviewers can check. The mailing list and its
|
||||
archives are public, so please do not send confidential information.
|
||||
|
||||
## Contributing technical changes
|
||||
|
||||
To email small changes, please run a POSIX shell command like
|
||||
'diff -u old/europe new/europe >myfix.patch', and attach
|
||||
'myfix.patch' to the email.
|
||||
‘diff -u old/europe new/europe >myfix.patch’, and attach
|
||||
‘myfix.patch’ to the email.
|
||||
|
||||
For more-elaborate or possibly controversial changes,
|
||||
such as renaming, adding or removing zones, please read
|
||||
"Theory and pragmatics of the tz code and data"
|
||||
“Theory and pragmatics of the tz code and data”
|
||||
<https://www.iana.org/time-zones/repository/theory.html>.
|
||||
It is also good to browse the mailing list archives
|
||||
<https://lists.iana.org/hyperkitty/list/tz@iana.org/>
|
||||
for examples of patches that tend to work well.
|
||||
Changes should contain commentary citing reliable sources.
|
||||
Citations should use "https:" URLs if available.
|
||||
Citations should use ‘https:’ URLs if available.
|
||||
|
||||
For changes that fix sensitive security-related bugs, please see the
|
||||
distribution's 'SECURITY' file.
|
||||
distribution’s SECURITY file.
|
||||
|
||||
Please submit changes against either the latest release
|
||||
<https://www.iana.org/time-zones> or the main branch of the development
|
||||
@@ -54,11 +55,11 @@ If you use Git the following workflow may be helpful:
|
||||
|
||||
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.
|
||||
* 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
|
||||
changes by citing reliable sources.
|
||||
@@ -69,28 +70,31 @@ If you use Git the following workflow may be helpful:
|
||||
./zdump -v America/Los_Angeles
|
||||
|
||||
Although builds assume only basic POSIX, they use extra features
|
||||
if available. 'make check' accesses validator.w3.org unless you
|
||||
lack 'curl' or use 'make CURL=:'. If you have the latest GCC,
|
||||
"make CFLAGS='$(GCC_DEBUG_FLAGS)'" does extra checking.
|
||||
if available. ‘make check’ accesses validator.w3.org unless you
|
||||
lack ‘curl’ or use ‘make CURL=:’. If you have the latest GCC,
|
||||
‘make CFLAGS='$(GCC_DEBUG_FLAGS)'’ does extra checking.
|
||||
|
||||
* For each separable change, commit it in the new branch, e.g.:
|
||||
|
||||
git add northamerica
|
||||
git commit
|
||||
|
||||
See recent 'git log' output for the commit-message style.
|
||||
See recent ‘git log’ output for the commit-message style.
|
||||
|
||||
* Create patch files 0001-..., 0002-..., ...
|
||||
|
||||
git format-patch main
|
||||
|
||||
* Check that the patch files and your email setup contain only
|
||||
information that you want to make public.
|
||||
|
||||
* After reviewing the patch files, send the patches to <tz@iana.org>
|
||||
for others to review.
|
||||
|
||||
git send-email main
|
||||
|
||||
For an archived example of such an email, see
|
||||
"[PROPOSED] Fix off-by-1 error for Jamaica and T&C before 1913"
|
||||
“[PROPOSED] Fix off-by-1 error for Jamaica and T&C before 1913”
|
||||
<https://mm.icann.org/pipermail/tz/2018-February/026122.html>.
|
||||
|
||||
* Start anew by getting current with the main branch again
|
||||
|
||||
+150
-86
@@ -3,17 +3,30 @@
|
||||
# 2009-05-17 by Arthur David Olson.
|
||||
# Request POSIX conformance; this must be the first non-comment line.
|
||||
.POSIX:
|
||||
# By default, builds of code and data assume POSIX.1-2001 or later;
|
||||
# this assumption can be relaxed by tailoring the build as described below.
|
||||
# On older platforms you may need to scrounge for POSIX conformance.
|
||||
# For example, on Solaris 10 (2005) with Sun Studio 12 aka Sun C 5.9 (2007),
|
||||
# use 'PATH=/usr/xpg4/bin:$PATH make CC=c99'.
|
||||
# Reproducible builds of distribution tarballs also need a copy of the
|
||||
# Git repository, and assume the behavior of the following programs
|
||||
# (or later versions):
|
||||
# Git 2.7.0 (2016)
|
||||
# GNU Coreutils 6.3 (2006)
|
||||
# GNU Tar 1.14 (2004)
|
||||
# GnuPG 1.4 (2004)
|
||||
# Although tzdb does not come with a software bill of materials,
|
||||
# you should be able to construct one based on the above information,
|
||||
# your platform, and the way you use this Makefile.
|
||||
|
||||
# To affect how this Makefile works, you can run a shell script like this:
|
||||
#
|
||||
# #!/bin/sh
|
||||
# make CC='gcc -std=gnu23' "$@"
|
||||
# make CFLAGS='-O2 -DHAVE_GETTEXT=0' "$@"
|
||||
#
|
||||
# This example script is appropriate for a circa 2024 GNU/Linux system
|
||||
# where a non-default setting enables this package's optional use of C23.
|
||||
# This example script is appropriate for a GNU/Linux system
|
||||
# which needs more optimization than default, and which does not want
|
||||
# gettext's internationalization of diagnostics.
|
||||
#
|
||||
# Alternatively, you can simply edit this Makefile to tailor the following
|
||||
# macro definitions.
|
||||
@@ -53,28 +66,6 @@ DATAFORM= main
|
||||
|
||||
LOCALTIME= Factory
|
||||
|
||||
# The POSIXRULES macro controls interpretation of POSIX-like TZ
|
||||
# settings like TZ='EET-2EEST' that lack DST transition rules.
|
||||
# If POSIXRULES is '-', no template is installed; this is the default.
|
||||
# Any other value for POSIXRULES is obsolete and should not be relied on, as:
|
||||
# * It does not work correctly in popular implementations such as GNU/Linux.
|
||||
# * It does not work even in tzcode, except for historical timestamps
|
||||
# that precede the last explicit transition in the POSIXRULES file.
|
||||
# Hence it typically does not work for current and future timestamps.
|
||||
# If, despite the above, you want a template for handling these settings,
|
||||
# you can change the line below (after finding the timezone you want in the
|
||||
# one of the $(TDATA) source files, or adding it to a source file).
|
||||
# Alternatively, if you discover you've got the wrong timezone, you can just
|
||||
# 'zic -p -' to remove it, or 'zic -p rightzone' to change it.
|
||||
# Use the command
|
||||
# make zonenames
|
||||
# to get a list of the values you can use for POSIXRULES.
|
||||
|
||||
POSIXRULES= -
|
||||
|
||||
# Also see TZDEFRULESTRING below, which takes effect only
|
||||
# if POSIXRULES is '-' or if the template file cannot be accessed.
|
||||
|
||||
|
||||
# Installation locations.
|
||||
#
|
||||
@@ -150,13 +141,14 @@ TIME_T_ALTERNATIVES_TAIL = int_least32_t.ck uint_least32_t.ck \
|
||||
# below. If you want both sets of data available, with leap seconds counted
|
||||
# normally, use
|
||||
# REDO= right_posix
|
||||
# below. POSIX mandates that leap seconds not be counted; for compatibility
|
||||
# with it, use "posix_only" or "posix_right". Use POSIX time on systems with
|
||||
# below. POSIX mandates that leap seconds not be counted, and a
|
||||
# nonnegative TZ_CHANGE_INTERVAL also assumes this, so to be compatible with
|
||||
# these, use "posix_only" or "posix_right". Use POSIX time on systems with
|
||||
# leap smearing; this can work better than unsmeared "right" time with
|
||||
# applications that are not leap second aware, and is closer to unsmeared
|
||||
# "right" time than unsmeared POSIX time is (e.g., 0.5 vs 1.0 s max error).
|
||||
|
||||
REDO= posix_right
|
||||
REDO= posix_only
|
||||
|
||||
# Whether to put an "Expires" line in the leapseconds file.
|
||||
# Use EXPIRES_LINE=1 to put the line in, 0 to omit it.
|
||||
@@ -206,6 +198,12 @@ PACKRATLIST=
|
||||
|
||||
UTF8_LOCALE= en_US.utf8
|
||||
|
||||
# Extra flags for producing man page files like tzfile.5.txt.
|
||||
# These flags are used only if groff (or mandoc) is present.
|
||||
# Each option should begin with "-" and should lack shell metacharacters.
|
||||
# Plausible options include -Tascii and -Tutf8.
|
||||
MANFLAGS= -Tutf8
|
||||
|
||||
# Non-default libraries needed to link.
|
||||
# On some hosts, this should have -lintl unless CFLAGS has -DHAVE_GETTEXT=0.
|
||||
LDLIBS=
|
||||
@@ -219,14 +217,19 @@ LDLIBS=
|
||||
# -DEPOCH_OFFSET=N if the 'time' function returns a value N greater
|
||||
# than what POSIX specifies, assuming local time is UT.
|
||||
# For example, N is 252460800 on AmigaOS.
|
||||
# -DFREE_PRESERVES_ERRNO=[01] if the 'free' function munges or preserves errno
|
||||
# (default is guessed)
|
||||
# -DHAVE_DECL_ASCTIME_R=0 if <time.h> does not declare asctime_r
|
||||
# on POSIX platforms predating POSIX.1-2024
|
||||
# -DHAVE_DECL_ENVIRON if <unistd.h> declares 'environ'
|
||||
# -DHAVE_DECL_TIMEGM=0 if <time.h> does not declare timegm
|
||||
# -DHAVE_DIRECT_H if mkdir needs <direct.h> (MS-Windows)
|
||||
# -DHAVE_FCHMOD=0 if your system lacks the fchmod function
|
||||
# -DHAVE__GENERIC=0 if _Generic does not work*
|
||||
# -DHAVE_GETEUID=0 if gete?[ug]id do not work
|
||||
# -DHAVE_GETRANDOM if getrandom works (e.g., GNU/Linux),
|
||||
# -DHAVE_GETRANDOM=0 to avoid using getrandom
|
||||
# -DHAVE_GETRESUID=0 if getres[ug]id do not work
|
||||
# -DHAVE_GETTEXT if gettext works (e.g., GNU/Linux, FreeBSD, Solaris),
|
||||
# where LDLIBS also needs to contain -lintl on some hosts;
|
||||
# -DHAVE_GETTEXT=0 to avoid using gettext
|
||||
@@ -234,28 +237,46 @@ LDLIBS=
|
||||
# ctime_r and asctime_r incompatibly with POSIX.1-2017 and earlier
|
||||
# (Solaris when _POSIX_PTHREAD_SEMANTICS is not defined).
|
||||
# -DHAVE_INTTYPES_H=0 if <inttypes.h> does not work*+
|
||||
# -DHAVE_ISSETUGID=1 if issetugid works, 0 otherwise (default is guessed)
|
||||
# If 0, you may also use -DHAVE_SYS_AUXV_H=1 if <sys/auxv.h> works,
|
||||
# 0 otherwise (default is guessed).
|
||||
# -DHAVE_LINK=0 if your system lacks a link function
|
||||
# -DHAVE_LOCALTIME_R=0 if your system lacks a localtime_r function
|
||||
# -DHAVE_LOCALTIME_RZ=0 if you do not want zdump to use localtime_rz
|
||||
# localtime_rz can make zdump significantly faster, but is nonstandard.
|
||||
# -DHAVE_MALLOC_ERRNO=0 if malloc etc. do not set errno on failure.
|
||||
# -DHAVE_MEMPCPY=1 if your system has mempcpy, 0 if not (default is guessed)
|
||||
# -DHAVE_POSIX_DECLS=0 if your system's include files do not declare
|
||||
# functions like 'link' or variables like 'tzname' required by POSIX
|
||||
# variables like 'tzname' required by POSIX
|
||||
# -DHAVE_PWD_H=0 if your system lacks pwd.h, grp.h and corresponding functions
|
||||
# If 0, you may also need -Dgid_t=G -Duid_t=U
|
||||
# to define gid_t and uid_t to be types G and U.
|
||||
# -DHAVE_SETENV=0 if your system lacks the setenv function
|
||||
# -DHAVE_SETMODE=[01] if your system lacks or has the setmode and getmode
|
||||
# functions (default is guessed)
|
||||
# -DHAVE_SNPRINTF=0 if your system lacks the snprintf function+
|
||||
# -DHAVE_STDCKDINT_H=0 if neither <stdckdint.h> nor substitutes like
|
||||
# __builtin_add_overflow work*
|
||||
# -DHAVE_STDINT_H=0 if <stdint.h> does not work*+
|
||||
# -DHAVE_STRFTIME_L if <time.h> declares locale_t and strftime_l
|
||||
# -DHAVE_STRDUP=0 if your system lacks the strdup function
|
||||
# -DHAVE_STRNLEN=0 if your system lacks the strnlen function+
|
||||
# -DHAVE_STRTOLL=0 if your system lacks the strtoll function+
|
||||
# -DHAVE_STRUCT_STAT_ST_CTIM=0 if struct stat lacks a status-change member
|
||||
# of type struct timespec, so code should use st_ctime instead;
|
||||
# but if the status-change member name is st_ctimespec,
|
||||
# use -Dst_ctim=st_ctimespec instead (default is guessed)+
|
||||
# -DHAVE_STRUCT_TIMESPEC=0 if your system lacks struct timespec+
|
||||
# -DHAVE_SYMLINK=0 if your system lacks the symlink function
|
||||
# -DHAVE_SYS_STAT_H=0 if <sys/stat.h> does not work*
|
||||
# If 0, you may also need -Dmode_t=M to define mode_t to be type M.
|
||||
# -DHAVE_TZSET=0 if your system lacks a tzset function
|
||||
# -DHAVE_UNISTD_H=0 if <unistd.h> does not work*
|
||||
# -DHAVE_UTMPX_H=0 if <utmpx.h> does not work*
|
||||
# -Dlocale_t=XXX if your system uses XXX instead of locale_t
|
||||
# -DMKTIME_MIGHT_OVERFLOW if mktime might fail due to time_t overflow
|
||||
# -DOPENAT_TZDIR if tzset should use openat on TZDIR then a relative open.
|
||||
# See localtime.c for details.
|
||||
# -DPORT_TO_C89 if tzcode should also run on mostly-C89 platforms+
|
||||
# Typically it is better to use a later standard. For example,
|
||||
# with GCC 4.9.4 (2016), prefer '-std=gnu11' to '-DPORT_TO_C89'.
|
||||
@@ -274,15 +295,46 @@ LDLIBS=
|
||||
# -DTHREAD_SAFE to make localtime.c thread-safe, as POSIX requires;
|
||||
# not needed by the main-program tz code, which is single-threaded.
|
||||
# Append other compiler flags as needed, e.g., -pthread on GNU/Linux.
|
||||
# The following options can also be used:
|
||||
# -DTHREAD_PREFER_SINGLE to prefer speed in single-threaded apps,
|
||||
# at some cost in CPU time and energy in multi-threaded apps.
|
||||
# The following options can also be used:
|
||||
# -DHAVE___ISTHREADED=1 if there is an extern int __isthreaded
|
||||
# variable, 0 otherwise (default is guessed)
|
||||
# -DHAVE_SYS_SINGLE_THREADED_H=0 if <sys/single_threaded.h> works,
|
||||
# 0 otherwise (default is guessed)
|
||||
# -DTHREAD_RWLOCK to use read-write locks instead of mutexes.
|
||||
# This can improve parallelism and thus save real time
|
||||
# if many threads call tzcode functions simultaneously.
|
||||
# It also costs CPU time and thus energy.
|
||||
# -DTHREAD_TM_MULTI to have gmtime, localtime, and offtime
|
||||
# return different struct tm * addresses in different threads.
|
||||
# This supports nonportable programs that call
|
||||
# gmtime/localtime/offtime when they should call
|
||||
# gmtime_r/localtime_r/offtime_r to avoid races.
|
||||
# Because the corresponding storage is freed on thread exit,
|
||||
# this option is incompatible with POSIX.1-2024 and earlier.
|
||||
# It also costs CPU time and memory.
|
||||
# -Dtime_tz=\"T\" to use T as the time_t type, rather than the system time_t
|
||||
# This is intended for internal use only; it mangles external names.
|
||||
# -DTZ_CHANGE_INTERVAL=N if functions depending on TZ should check
|
||||
# no more often than every N seconds for TZif file changes.
|
||||
# If N is negative (the default), no such checking is done.
|
||||
# This option is intended for platforms that want localtime etc.
|
||||
# to respond to changes to a file selected by TZ, including to
|
||||
# TZDEFAULT (normally /etc/localtime) if TZ is unset.
|
||||
# On these platforms, REDO should be "posix_only" or "posix_right".
|
||||
# This option does not affect tzalloc-allocated objects.
|
||||
# -DTZ_DOMAIN=\"foo\" to use "foo" for gettext domain name; default is "tz"
|
||||
# -DTZ_DOMAINDIR=\"/path\" to use "/path" for gettext directory;
|
||||
# the default is system-supplied, typically "/usr/lib/locale"
|
||||
# -DTZ_RUNTIME_LEAPS=0 to disable runtime support for leap seconds.
|
||||
# This conforms to POSIX, shrinks tzcode's attack surface,
|
||||
# and is more efficient. However, it fails to support Internet
|
||||
# RFC 9636's leap seconds.
|
||||
# -DTZDEFRULESTRING=\",date/time,date/time\" to default to the specified
|
||||
# DST transitions for proleptic format TZ strings lacking them,
|
||||
# in the usual case where POSIXRULES is '-'. If not specified,
|
||||
# TZDEFRULESTRING defaults to US rules for future DST transitions.
|
||||
# DST transitions for proleptic format TZ strings lacking them.
|
||||
# If not specified, it defaults to US rules for future DST transitions.
|
||||
# This mishandles some past timestamps, as US DST rules have changed.
|
||||
# It also mishandles settings like TZ='EET-2EEST' for eastern Europe,
|
||||
# as Europe and US DST rules differ.
|
||||
@@ -314,7 +366,7 @@ LDLIBS=
|
||||
# Select instrumentation via "make GCC_INSTRUMENT='whatever'".
|
||||
GCC_INSTRUMENT = \
|
||||
-fsanitize=undefined -fsanitize-address-use-after-scope \
|
||||
-fsanitize-undefined-trap-on-error -fstack-protector
|
||||
-fsanitize-trap=all -fstack-protector
|
||||
# Omit -fanalyzer from GCC_DEBUG_FLAGS, as it makes GCC too slow.
|
||||
GCC_DEBUG_FLAGS = -DGCC_LINT -g3 -O3 \
|
||||
$(GCC_INSTRUMENT) \
|
||||
@@ -332,12 +384,13 @@ GCC_DEBUG_FLAGS = -DGCC_LINT -g3 -O3 \
|
||||
-Wold-style-definition -Woverlength-strings -Wpointer-arith \
|
||||
-Wshadow -Wshift-overflow=2 -Wstrict-overflow \
|
||||
-Wstrict-prototypes -Wstringop-overflow=4 \
|
||||
-Wstringop-truncation -Wsuggest-attribute=cold \
|
||||
-Wsuggest-attribute=cold \
|
||||
-Wsuggest-attribute=const -Wsuggest-attribute=format \
|
||||
-Wsuggest-attribute=malloc \
|
||||
-Wsuggest-attribute=noreturn -Wsuggest-attribute=pure \
|
||||
-Wtrampolines -Wundef -Wunused-macros -Wuse-after-free=3 \
|
||||
-Wvariadic-macros -Wvla -Wwrite-strings \
|
||||
-Wzero-as-null-pointer-constant \
|
||||
-Wno-format-nonliteral -Wno-sign-compare -Wno-type-limits
|
||||
#
|
||||
# If your system has a "GMT offset" field in its "struct tm"s
|
||||
@@ -393,7 +446,9 @@ GCC_DEBUG_FLAGS = -DGCC_LINT -g3 -O3 \
|
||||
# functions to be added to the time conversion library.
|
||||
# "offtime" is like "gmtime" except that it accepts a second (long) argument
|
||||
# that gives an offset to add to the time_t when converting it.
|
||||
# I.e., "offtime" is like calling "localtime_rz" with a fixed-offset zone.
|
||||
# "offtime_r" is to "offtime" what "gmtime_r" is to "gmtime".
|
||||
# I.e., "offtime" and "offtime_r" are like calling "localtime_rz"
|
||||
# with a fixed-offset zone.
|
||||
# "timelocal" is nearly equivalent to "mktime".
|
||||
# "timeoff" is like "timegm" except that it accepts a second (long) argument
|
||||
# that gives an offset to use when converting to a time_t.
|
||||
@@ -451,6 +506,11 @@ leaplist_URI = \
|
||||
https://hpiers.obspm.fr/iers/bul/bulc/ntp/leap-seconds.list
|
||||
# The file is generated by the IERS Earth Orientation Centre, in Paris.
|
||||
leaplist_TZ = Europe/Paris
|
||||
#
|
||||
# To fetch leap-seconds.list from NIST via a less-secure protocol
|
||||
# and with less-volatile metadata, use these settings:
|
||||
#leaplist_URI = ftp://ftp.boulder.nist.gov/pub/time/leap-seconds.list
|
||||
#leaplist_TZ = America/Denver
|
||||
|
||||
# The zic command and its arguments.
|
||||
|
||||
@@ -510,13 +570,10 @@ SAFE_CHARSET3= 'abcdefghijklmnopqrstuvwxyz{|}~'
|
||||
SAFE_CHARSET= $(SAFE_CHARSET1)$(SAFE_CHARSET2)$(SAFE_CHARSET3)
|
||||
SAFE_CHAR= '[]'$(SAFE_CHARSET)'-]'
|
||||
|
||||
# These non-alphabetic, non-ASCII printable characters are Latin-1,
|
||||
# and so are likely displayable even in editors like XEmacs 21
|
||||
# that have limited display capabilities.
|
||||
UNUSUAL_OK_LATIN_1 = ¡¢£¤¥¦§¨©«¬®¯°±²³´¶·¸¹»¼½¾¿×÷
|
||||
# Non-ASCII non-letters that OK_CHAR allows, as these characters are
|
||||
# useful in commentary.
|
||||
UNUSUAL_OK_CHARSET= $(UNUSUAL_OK_LATIN_1)
|
||||
# These non-alphabetic, non-ASCII printable characters are
|
||||
# used in commentary or in generated *.txt files
|
||||
# and are not likely to cause confusion.
|
||||
UNUSUAL_OK_CHARSET= §«°±»½¾×–‘’“”•→−≤★⟨⟩⯪
|
||||
|
||||
# Put this in a bracket expression to match spaces.
|
||||
s = [:space:]
|
||||
@@ -525,9 +582,6 @@ s = [:space:]
|
||||
# This is the same as SAFE_CHAR, except that UNUSUAL_OK_CHARSET and
|
||||
# multibyte letters are also allowed so that commentary can contain a
|
||||
# few safe symbols and people's names and can quote non-English sources.
|
||||
# Other non-letters are limited to ASCII renderings for the
|
||||
# convenience of maintainers using XEmacs 21.5.34, which by default
|
||||
# mishandles Unicode characters U+0100 and greater.
|
||||
OK_CHAR= '[][:alpha:]$(UNUSUAL_OK_CHARSET)'$(SAFE_CHARSET)'-]'
|
||||
|
||||
# SAFE_LINE matches a line of safe characters.
|
||||
@@ -654,7 +708,6 @@ install: all $(DATA) $(REDO) $(MANS)
|
||||
'$(DESTDIR)$(MANDIR)/man3' '$(DESTDIR)$(MANDIR)/man5' \
|
||||
'$(DESTDIR)$(MANDIR)/man8'
|
||||
$(ZIC_INSTALL) -l $(LOCALTIME) \
|
||||
-p $(POSIXRULES) \
|
||||
-t '$(DESTDIR)$(TZDEFAULT)'
|
||||
cp -f $(TABDATA) '$(DESTDIR)$(TZDIR)/.'
|
||||
cp tzselect '$(DESTDIR)$(BINDIR)/.'
|
||||
@@ -874,9 +927,9 @@ UTF8_LOCALE_MISSING = \
|
||||
character-set.ck: $(ENCHILADA)
|
||||
$(UTF8_LOCALE_MISSING) || { \
|
||||
sharp='#' && \
|
||||
! grep -Env $(SAFE_LINE) $(MANS) date.1 $(MANTXTS) \
|
||||
$(MISC) $(SOURCES) $(WEB_PAGES) \
|
||||
CONTRIBUTING LICENSE README SECURITY \
|
||||
! grep -Env $(SAFE_LINE) $(MANS) date.1 \
|
||||
$(MISC) $(SOURCES) \
|
||||
LICENSE \
|
||||
version tzdata.zi && \
|
||||
! grep -Env $(SAFE_LINE)'|^UNUSUAL_OK_'$(OK_CHAR)'*$$' \
|
||||
Makefile && \
|
||||
@@ -888,11 +941,9 @@ character-set.ck: $(ENCHILADA)
|
||||
|
||||
white-space.ck: $(ENCHILADA)
|
||||
$(UTF8_LOCALE_MISSING) || { \
|
||||
enchilada='$(ENCHILADA)' && \
|
||||
patfmt=' \t|[\f\r\v]' && pat=$$(printf "$$patfmt\\n") && \
|
||||
! grep -En "$$pat|[$s]\$$" \
|
||||
$${enchilada%leap-seconds.list*} \
|
||||
$${enchilada#*leap-seconds.list}; \
|
||||
$(ENCHILADA:leap-seconds.list=); \
|
||||
}
|
||||
touch $@
|
||||
|
||||
@@ -959,8 +1010,10 @@ now.ck: checknow.awk date tzdata.zi zdump zic zone1970.tab zonenow.tab
|
||||
./zdump -i -t 0,$$future \
|
||||
$$(find "$$PWD/$@d" -name Etc -prune \
|
||||
-o -type f ! -name '*.tab' -print) \
|
||||
>$@d/zdump-1970.tab
|
||||
>$@d/zdump-1970.tab && \
|
||||
$(AWK) \
|
||||
-v now=$$now \
|
||||
-v now_out=$@.out \
|
||||
-v zdump_table=$@d/zdump-now.tab \
|
||||
-f checknow.awk zonenow.tab
|
||||
$(AWK) \
|
||||
@@ -970,7 +1023,8 @@ now.ck: checknow.awk date tzdata.zi zdump zic zone1970.tab zonenow.tab
|
||||
-v zdump_table=$@d/zdump-1970.tab \
|
||||
-f checknow.awk
|
||||
rm -fr $@d
|
||||
touch $@
|
||||
touch $@.out
|
||||
mv $@.out $@
|
||||
|
||||
tables.ck: checktab.awk $(YDATA) backward zone.tab zone1970.tab
|
||||
for tab in $(ZONETABLES); do \
|
||||
@@ -1031,7 +1085,7 @@ zishrink-posix.ck zishrink-right.ck: \
|
||||
|
||||
clean_misc:
|
||||
rm -fr *.ckd *.dir
|
||||
rm -f *.ck *.core *.o *.out core core.* \
|
||||
rm -f *.ck *.core *.o *.out *.t core core.* \
|
||||
date tzdir.h tzselect version.h zdump zic libtz.a
|
||||
clean: clean_misc
|
||||
rm -fr tzdb-*/
|
||||
@@ -1059,7 +1113,7 @@ zdump.8.txt: zdump.8
|
||||
zic.8.txt: zic.8
|
||||
|
||||
$(MANTXTS): workman.sh
|
||||
LC_ALL=C sh workman.sh $(@:.txt=) >$@.out
|
||||
LC_ALL=C sh workman.sh $(MANFLAGS) $(@:.txt=) >$@.out
|
||||
mv $@.out $@
|
||||
|
||||
# Set file timestamps deterministically if possible,
|
||||
@@ -1108,7 +1162,7 @@ set-timestamps.out: $(EIGHT_YARDS)
|
||||
if git diff --quiet HEAD $$file; then \
|
||||
time=$$(TZ=UTC0 git log -1 \
|
||||
--format='tformat:%cd' \
|
||||
--date='format:%Y-%m-%dT%H:%M:%SZ' \
|
||||
--date='format-local:%Y-%m-%dT%H:%M:%SZ' \
|
||||
$$file) && \
|
||||
echo "+ touch -md $$time $$file" && \
|
||||
touch -md $$time $$file; \
|
||||
@@ -1207,12 +1261,12 @@ $(TIME_T_ALTERNATIVES): $(VERSION_DEPS)
|
||||
touch $@
|
||||
|
||||
TRADITIONAL_ASC = \
|
||||
tzcode$(VERSION).tar.gz.asc \
|
||||
tzdata$(VERSION).tar.gz.asc
|
||||
tzcode$(VERSION).tar.gz.asc.t \
|
||||
tzdata$(VERSION).tar.gz.asc.t
|
||||
REARGUARD_ASC = \
|
||||
tzdata$(VERSION)-rearguard.tar.gz.asc
|
||||
tzdata$(VERSION)-rearguard.tar.gz.asc.t
|
||||
ALL_ASC = $(TRADITIONAL_ASC) $(REARGUARD_ASC) \
|
||||
tzdb-$(VERSION).tar.lz.asc
|
||||
tzdb-$(VERSION).tar.lz.asc.t
|
||||
|
||||
tarballs rearguard_tarballs tailored_tarballs traditional_tarballs \
|
||||
signatures rearguard_signatures traditional_signatures: \
|
||||
@@ -1224,29 +1278,31 @@ signatures rearguard_signatures traditional_signatures: \
|
||||
# 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 rearguard_tarballs_version \
|
||||
tzdb-$(VERSION).tar.lz
|
||||
tzdb-$(VERSION).tar.lz.t
|
||||
rearguard_tarballs_version: \
|
||||
tzdata$(VERSION)-rearguard.tar.gz
|
||||
tzdata$(VERSION)-rearguard.tar.gz.t
|
||||
traditional_tarballs_version: \
|
||||
tzcode$(VERSION).tar.gz tzdata$(VERSION).tar.gz
|
||||
tzcode$(VERSION).tar.gz.t tzdata$(VERSION).tar.gz.t
|
||||
tailored_tarballs_version: \
|
||||
tzdata$(VERSION)-tailored.tar.gz
|
||||
tzdata$(VERSION)-tailored.tar.gz.t
|
||||
signatures_version: $(ALL_ASC)
|
||||
rearguard_signatures_version: $(REARGUARD_ASC)
|
||||
traditional_signatures_version: $(TRADITIONAL_ASC)
|
||||
|
||||
tzcode$(VERSION).tar.gz: set-timestamps.out
|
||||
tzcode$(VERSION).tar.gz.t: set-timestamps.out
|
||||
$(SETUP_TAR) && \
|
||||
$$TAR -cf - \
|
||||
$(COMMON) $(DOCS) $(SOURCES) | \
|
||||
gzip $(GZIPFLAGS) >$@.out
|
||||
mv $@.out $@
|
||||
gzip $(GZIPFLAGS) >$(@:.t=)
|
||||
$(SET_TIMESTAMP) $(@:.t=) $(COMMON) $(DOCS) $(SOURCES)
|
||||
touch $@
|
||||
|
||||
tzdata$(VERSION).tar.gz: set-timestamps.out
|
||||
tzdata$(VERSION).tar.gz.t: set-timestamps.out
|
||||
$(SETUP_TAR) && \
|
||||
$$TAR -cf - $(TZDATA_DIST) | \
|
||||
gzip $(GZIPFLAGS) >$@.out
|
||||
mv $@.out $@
|
||||
gzip $(GZIPFLAGS) >$(@:.t=)
|
||||
$(SET_TIMESTAMP) $(@:.t=) $(TZDATA_DIST)
|
||||
touch $@
|
||||
|
||||
# Create empty files with a reproducible timestamp.
|
||||
CREATE_EMPTY = TZ=UTC0 touch -mt 202010122253.00
|
||||
@@ -1255,7 +1311,7 @@ CREATE_EMPTY = TZ=UTC0 touch -mt 202010122253.00
|
||||
# for backwards compatibility with tz releases 2018e through 2022a.
|
||||
# They should go away eventually. To build rearguard tarballs you
|
||||
# can instead use 'make DATAFORM=rearguard tailored_tarballs'.
|
||||
tzdata$(VERSION)-rearguard.tar.gz: rearguard.zi set-timestamps.out
|
||||
tzdata$(VERSION)-rearguard.tar.gz.t: rearguard.zi set-timestamps.out
|
||||
rm -fr $@.dir
|
||||
mkdir $@.dir
|
||||
ln $(TZDATA_DIST) $@.dir
|
||||
@@ -1273,8 +1329,11 @@ tzdata$(VERSION)-rearguard.tar.gz: rearguard.zi set-timestamps.out
|
||||
(cd $@.dir && \
|
||||
$$TAR -cf - \
|
||||
$(TZDATA_DIST) pacificnew | \
|
||||
gzip $(GZIPFLAGS)) >$@.out
|
||||
mv $@.out $@
|
||||
gzip $(GZIPFLAGS)) >$(@:.t=)
|
||||
$(SET_TIMESTAMP) $(@:.t=) \
|
||||
$$(cd $@.dir && \
|
||||
ls $(TZDATA_DIST) pacificnew | sed 's,^,$@.dir/,')
|
||||
touch $@
|
||||
|
||||
# Create a tailored tarball suitable for TZUpdater and compatible tools.
|
||||
# For example, 'make DATAFORM=vanguard tailored_tarballs' makes a tarball
|
||||
@@ -1283,7 +1342,7 @@ tzdata$(VERSION)-rearguard.tar.gz: rearguard.zi set-timestamps.out
|
||||
# traditional tarball, as data entries are put into 'etcetera' even if they
|
||||
# came from some other source file. However, the effect should be the same
|
||||
# for ordinary use, which reads all the source files.
|
||||
tzdata$(VERSION)-tailored.tar.gz: set-timestamps.out
|
||||
tzdata$(VERSION)-tailored.tar.gz.t: set-timestamps.out
|
||||
rm -fr $@.dir
|
||||
mkdir $@.dir
|
||||
: The dummy pacificnew pacifies TZUpdater 2.3.1 and earlier.
|
||||
@@ -1295,7 +1354,7 @@ tzdata$(VERSION)-tailored.tar.gz: set-timestamps.out
|
||||
cd $@.dir && \
|
||||
$(CREATE_EMPTY) $(PRIMARY_YDATA) $(NDATA) backward \
|
||||
$$pacificnew
|
||||
(grep '^#' tzdata.zi && echo && cat $(DATAFORM).zi) \
|
||||
(sed '/^#/!d' tzdata.zi && echo && cat $(DATAFORM).zi) \
|
||||
>$@.dir/etcetera
|
||||
touch -mr tzdata.zi $@.dir/etcetera
|
||||
sed -n \
|
||||
@@ -1316,24 +1375,29 @@ tzdata$(VERSION)-tailored.tar.gz: set-timestamps.out
|
||||
ln $$links $@.dir
|
||||
$(SETUP_TAR) && \
|
||||
(cd $@.dir && \
|
||||
$$TAR -cf - * | gzip $(GZIPFLAGS)) >$@.out
|
||||
mv $@.out $@
|
||||
$$TAR -cf - *) | gzip $(GZIPFLAGS) >$(@:.t=)
|
||||
$(SET_TIMESTAMP) $(@:.t=) \
|
||||
$$(cd $@.dir && ls * | sed 's,^,$@.dir/,')
|
||||
touch $@
|
||||
|
||||
tzdb-$(VERSION).tar.lz: set-timestamps.out set-tzs-timestamp.out
|
||||
tzdb-$(VERSION).tar.lz.t: set-timestamps.out set-tzs-timestamp.out
|
||||
rm -fr tzdb-$(VERSION)
|
||||
mkdir tzdb-$(VERSION)
|
||||
ln $(ENCHILADA) tzdb-$(VERSION)
|
||||
$(SET_TIMESTAMP) tzdb-$(VERSION) tzdb-$(VERSION)/*
|
||||
$(SETUP_TAR) && \
|
||||
$$TAR -cf - tzdb-$(VERSION) | lzip -9 >$@.out
|
||||
mv $@.out $@
|
||||
$$TAR -cf - tzdb-$(VERSION) | lzip -9 >$(@:.t=)
|
||||
$(SET_TIMESTAMP) $(@:.t=) tzdb-$(VERSION)
|
||||
touch $@
|
||||
|
||||
tzcode$(VERSION).tar.gz.asc: tzcode$(VERSION).tar.gz
|
||||
tzdata$(VERSION).tar.gz.asc: tzdata$(VERSION).tar.gz
|
||||
tzdata$(VERSION)-rearguard.tar.gz.asc: tzdata$(VERSION)-rearguard.tar.gz
|
||||
tzdb-$(VERSION).tar.lz.asc: tzdb-$(VERSION).tar.lz
|
||||
tzcode$(VERSION).tar.gz.asc.t: tzcode$(VERSION).tar.gz.t
|
||||
tzdata$(VERSION).tar.gz.asc.t: tzdata$(VERSION).tar.gz.t
|
||||
tzdata$(VERSION)-rearguard.tar.gz.asc.t: tzdata$(VERSION)-rearguard.tar.gz.t
|
||||
tzdb-$(VERSION).tar.lz.asc.t: tzdb-$(VERSION).tar.lz.t
|
||||
$(ALL_ASC):
|
||||
$(GPG) --armor --detach-sign $?
|
||||
$(GPG) --armor --detach-sign $(?:.t=)
|
||||
$(SET_TIMESTAMP) $(@:.t=) $(?:.t=)
|
||||
touch $@
|
||||
|
||||
TYPECHECK_CFLAGS = $(CFLAGS) -DTYPECHECK -D__time_t_defined -D_TIME_T
|
||||
typecheck: long-long.ck unsigned.ck
|
||||
|
||||
@@ -1,5 +1,237 @@
|
||||
News for the tz database
|
||||
|
||||
Release 2026a - 2026-03-01 22:59:49 -0800
|
||||
|
||||
Briefly:
|
||||
Moldova has used EU transition times since 2022.
|
||||
The "right" TZif files are no longer installed by default.
|
||||
-DTZ_RUNTIME_LEAPS=0 disables runtime support for leap seconds.
|
||||
TZif files are no longer limited to 50 bytes of abbreviations.
|
||||
zic is no longer limited to 50 leap seconds.
|
||||
Several integer overflow bugs have been fixed.
|
||||
|
||||
Changes to past and future timestamps
|
||||
|
||||
Since 2022 Moldova has observed EU transition times, that is, it
|
||||
has sprung forward at 03:00, not 02:00, and has fallen back at
|
||||
04:00, not 03:00. (Thanks to Heitor David Pinto.)
|
||||
|
||||
Changes to data
|
||||
|
||||
Remove Europe/Chisinau from zonenow.tab, as it now agrees with
|
||||
Europe/Athens for future timestamps.
|
||||
|
||||
Changes to build procedure
|
||||
|
||||
The Makefile no longer by default installs an alternate set
|
||||
of TZif files for system clocks that count leap seconds.
|
||||
Install with 'make REDO=posix_right' to get the old default,
|
||||
which is rarely used in major downstream distributions.
|
||||
If your system clock counts leap seconds (contrary to POSIX),
|
||||
it is better to install with 'make REDO=right_only'.
|
||||
This change does not affect the leapseconds file, which is still
|
||||
installed as before.
|
||||
|
||||
The Makefile's POSIXRULES option, which was declared obsolete in
|
||||
release 2019b, has been removed. The Makefile's build procedure
|
||||
thus no longer optionally installs the obsolete posixrules file.
|
||||
|
||||
Changes to code
|
||||
|
||||
Compiling with the new option -DTZ_RUNTIME_LEAPS=0 disables
|
||||
runtime support for leap seconds. Although this conforms to
|
||||
POSIX, shrinks tzcode's attack surface, and is more efficient,
|
||||
it fails to support Internet RFC 9636's leap seconds.
|
||||
|
||||
zic now can generate, and localtime.c can now use, TZif files that
|
||||
hold up to 256 bytes of abbreviations, counting trailing NULs.
|
||||
The previous limit was 50 bytes, and some tzdata TZif files were
|
||||
already consuming 40 bytes. zic -v warns if it generates a file
|
||||
that exceeds the old 50-byte limit.
|
||||
|
||||
zic -L can now generate TZif files with more than 50 leap seconds.
|
||||
This helps test TZif readers not limited to 50 leap seconds, as
|
||||
tzcode's localtime.c is; it has little immediate need for
|
||||
practical timekeeping as there have been only 27 leap seconds and
|
||||
possibly there will be no more, due to planned changes to UTC.
|
||||
zic -v warns if its output exceeds the old 50-second limit.
|
||||
|
||||
localtime.c no longer accesses the posixrules file generated by
|
||||
zic -p. Hence for obsolete and nonconforming settings like
|
||||
TZ="AST4ADT" it now typically falls back on US DST rules, rather
|
||||
than attempting to override this fallback with the contents of the
|
||||
posixrules file. This removes library support that was declared
|
||||
obsolete in release 2019b, and fixes some undefined behavior.
|
||||
(Undefined behavior reported by GitHub user Naveed8951.)
|
||||
|
||||
The posix2time, posix2time_z, time2posix, and time2posix_z
|
||||
functions now set errno=EOVERFLOW and return ((time_t) -1) if the
|
||||
result is not representable. Formerly they had undefined behavior
|
||||
that could in practice result in crashing, looping indefinitely,
|
||||
or returning an incorrect result. As before, these functions are
|
||||
defined only when localtime.c is compiled with the -DSTD_INSPIRED
|
||||
option.
|
||||
|
||||
Some other undefined behavior, triggered by TZif files containing
|
||||
outlandish but conforming UT offsets or leap second corrections,
|
||||
has also been fixed. (Some of these bugs reported by Naveed8951.)
|
||||
|
||||
localtime.c no longer rejects TZif files that exactly fit in its
|
||||
internal structures, fixing off-by-one typos introduced in 2014g.
|
||||
|
||||
zic no longer generates a no-op transition when
|
||||
simultaneous Rule and Zone changes cancel each other out.
|
||||
This occurs in tzdata only in Asia/Tbilisi on 1997-03-30.
|
||||
(Thanks to Renchunhui for a test case showing the bug.)
|
||||
|
||||
zic no longer assumes you can fflush a read-only stream.
|
||||
(Problem reported by Christos Zoulas.)
|
||||
|
||||
zic no longer generates UT offsets equal to -2**31 and localtime.c
|
||||
no longer accepts them, as they can cause trouble in both
|
||||
localtime.c and its callers. RFC 9636 prohibits such offsets.
|
||||
|
||||
zic -p now warns that the -p option is obsolete and likely
|
||||
ineffective.
|
||||
|
||||
|
||||
Release 2025c - 2025-12-10 14:42:37 -0800
|
||||
|
||||
Briefly:
|
||||
Several code changes for compatibility with FreeBSD.
|
||||
|
||||
Changes to past timestamps
|
||||
|
||||
Baja California agreed with California’s DST rules in 1953 and in
|
||||
1961 through 1975, instead of observing standard time all year.
|
||||
(Thanks to Alois Treindl.)
|
||||
|
||||
Changes to build procedure
|
||||
|
||||
Files in distributed tarballs now have correct commit times.
|
||||
Formerly, the committer’s time zone was incorrectly ignored.
|
||||
|
||||
Distribution products (*.asc, *.gz, and *.lz) now have
|
||||
reproducible timestamps. Formerly, only the contents of the
|
||||
compressed tarballs had reproducible timestamps.
|
||||
|
||||
By default, distributed formatted man pages (*.txt) now use UTF-8
|
||||
and are left-adjusted more consistently. A new Makefile macro
|
||||
MANFLAGS can override these defaults. (Thanks to G. Branden
|
||||
Robinson for inspiring these changes.)
|
||||
|
||||
Changes to code
|
||||
|
||||
An unset TZ is no longer invalid when /etc/localtime is missing,
|
||||
and is abbreviated "UTC" not "-00". This reverts to 2024b behavior.
|
||||
(Problem and patch reported by Dag-Erling Smørgrav.)
|
||||
|
||||
New function offtime_r, short for fixed-offset localtime_rz.
|
||||
It is defined if STD_INSPIRED is defined.
|
||||
(Patch from Dag-Erling Smørgrav.)
|
||||
|
||||
tzset etc. are now more cautious about questionable TZ settings.
|
||||
Privileged programs now reject TZ settings that start with '/',
|
||||
unless they are TZDEFAULT (default "/etc/localtime") or
|
||||
start with TZDIR then '/' (default "/usr/share/zoneinfo/").
|
||||
Unprivileged programs now require files to be regular files
|
||||
and reject relative names containing ".." directory components;
|
||||
formerly, only privileged programs did those two things.
|
||||
These changes were inspired by similar behavior in FreeBSD.
|
||||
On NetBSD, unprivileged programs now use O_REGULAR to check
|
||||
whether a TZ setting starting with '/' names a regular file,
|
||||
avoiding a minor security race still present elsewhere.
|
||||
TZ strings taken from tzalloc arguments are now treated with
|
||||
no less caution than TZ strings taken from the environment, as
|
||||
the old undocumented behavior would have been hard to explain.
|
||||
tzset etc. no longer use the ‘access’ system call to check access;
|
||||
instead they now use the system calls issetugid, getauxval,
|
||||
getresuid/getresgid, and geteuid/getegid/getuid/getgid (whichever
|
||||
first works) to test whether a program is privileged.
|
||||
Compile with -DHAVE_SYS_AUXV_H=[01] to enable or disable
|
||||
<sys/auxv.h> which (if it defines AT_SECURE) enables getauxval,
|
||||
and compile with -DHAVE_ISSETUGID=[01], -DHAVE_GETRESUID=[01], and
|
||||
-DHAVE_GETEUID=[01] to enable or disable the other calls’ use.
|
||||
|
||||
The new CFLAGS option -DTZ_CHANGE_INTERVAL=N makes tzset etc.
|
||||
check for TZif file changes if the in-memory data are N seconds
|
||||
old or more, and are derived from the TZ environment variable.
|
||||
This is intended for platforms that want tzset etc. to reflect
|
||||
changes to whatever file TZ selects (including changes to
|
||||
/etc/localtime if TZ is unset). If N is negative (the default)
|
||||
these checks are omitted; this is the traditional behavior.
|
||||
|
||||
The new CFLAGS options -DHAVE_STRUCT_STAT_ST_CTIM=0 and
|
||||
-DHAVE_STRUCT_TIMESPEC=0 port to non-POSIX.1-2008 platforms
|
||||
that lack st_ctim and struct timespec, respectively.
|
||||
On these platforms, the code falls back on st_ctime to
|
||||
implement -DTZ_CHANGE_INTERVAL=N.
|
||||
|
||||
tzset etc. now treat ' ' like '_' in time zone abbreviations,
|
||||
just as they treat other invalid bytes. This continues the
|
||||
transition begun in release 96k, which removed spaces in tzdata
|
||||
because the spaces break time string parsers.
|
||||
|
||||
The new CFLAGS option -DTHREAD_PREFER_SINGLE causes tzcode
|
||||
in single-threaded processes to avoid locks, as FreeBSD does.
|
||||
This can save time in single-threaded apps. The threadedness
|
||||
testing costs CPU time and energy in multi-threaded apps.
|
||||
New options -DHAVE___ISTHREADED and -DHAVE_SYS_SINGLE_THREADED_H
|
||||
can help configure how to test for single-threadedness.
|
||||
|
||||
The new CFLAGS option -DTHREAD_RWLOCK uses read-write locks, as
|
||||
macOS does, instead of mutexes. This saves real time when TZ is
|
||||
rarely changing and many threads call tzcode simultaneously.
|
||||
It costs more CPU time and energy.
|
||||
|
||||
The new CFLAGS option -TTHREAD_TM_MULTI causes localtime to return
|
||||
a pointer to thread-specific memory, as FreeBSD does, instead of
|
||||
to the same memory in all threads. This supports nonportable
|
||||
programs that incorrectly use localtime instead of localtime_r.
|
||||
This option affects gmtime and offtime similarly to localtime.
|
||||
Because the corresponding storage is freed on thread exit, this
|
||||
option is incompatible with POSIX.1-2024 and earlier. It also
|
||||
costs CPU time and memory.
|
||||
|
||||
tzfree now preserves errno, consistently with POSIX.1-2024 ‘free’.
|
||||
|
||||
tzcode now uses mempcpy if available, guessing its availability.
|
||||
Compile with -DHAVE_MEMPCPY=1 or 0 to override the guess.
|
||||
|
||||
tzcode now uses strnlen to improve asymptotic performance a bit.
|
||||
Compile with -DHAVE_STRNLEN=0 if your platform lacks it.
|
||||
|
||||
tzcode now hand-declares unistd.h-provided symbols like getopt
|
||||
if HAVE_UNISTD_H=0, not if HAVE_POSIX_DECLS=0.
|
||||
|
||||
tzset etc. now have an experimental OPENAT_TZDIR option;
|
||||
see Makefile and localtime.c for details.
|
||||
|
||||
On platforms like GNU/Hurd that do not define PATH_MAX,
|
||||
exceedingly long TZ strings no longer fail merely because they
|
||||
exceed an arbitrary file name length limit imposed by tzcode.
|
||||
|
||||
zic has new options inspired by FreeBSD. ‘-D’ skips creation of
|
||||
output ancestor directories, ‘-m MODE’ sets output files’ mode,
|
||||
and ‘-u OWNER[:GROUP]’ sets output files’ owner and group.
|
||||
|
||||
zic now uses the fdopen function, which was standardized by
|
||||
POSIX.1-1988 and is now safe to use in portable code.
|
||||
This replaces its use of the older umask function, which
|
||||
complicated maintenance.
|
||||
|
||||
Changes to commentary
|
||||
|
||||
The leapseconds file contains commentary about the IERS and NIST
|
||||
last-modified and expiration timestamps for leap second data.
|
||||
(Thanks to Judah Levine.)
|
||||
|
||||
Commentary now also uses characters from the set –‘’“”•≤ as this
|
||||
can be useful and should work with current applications. This
|
||||
also affects data in iso3166.tab and zone1970.tab, which now
|
||||
contain strings like “Côte d’Ivoire” instead of “Côte d'Ivoire”.
|
||||
|
||||
|
||||
Release 2025b - 2025-03-22 13:40:46 -0700
|
||||
|
||||
Briefly:
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
README for the tz distribution
|
||||
|
||||
"Where do I set the hands of the clock?" -- Les Tremayne as The King
|
||||
"Oh that--you can set them any place you want." -- Frank Baxter as The Scientist
|
||||
(from the Bell System film "About Time")
|
||||
“Where do I set the hands of the clock?” – Les Tremayne as The King
|
||||
“Oh that – you can set them any place you want.” – Frank Baxter as The Scientist
|
||||
(from the Bell System film “About Time”)
|
||||
|
||||
The Time Zone Database (called tz, tzdb or zoneinfo) contains code and
|
||||
data that represent the history of local time for many representative
|
||||
@@ -13,12 +13,12 @@ and daylight-saving rules.
|
||||
See <https://www.iana.org/time-zones/repository/tz-link.html> or the
|
||||
file tz-link.html for how to acquire the code and data.
|
||||
|
||||
Once acquired, read the leading comments in the file "Makefile"
|
||||
Once acquired, read the leading comments in the file ‘Makefile’
|
||||
and make any changes needed to make things right for your system,
|
||||
especially when using a platform other than current GNU/Linux.
|
||||
|
||||
Then run the following commands, substituting your desired
|
||||
installation directory for "$HOME/tzdir":
|
||||
installation directory for ‘$HOME/tzdir’:
|
||||
|
||||
make TOPDIR="$HOME/tzdir" install
|
||||
"$HOME/tzdir/usr/bin/zdump" -v America/Los_Angeles
|
||||
@@ -39,12 +39,12 @@ The information in the time zone data files is by no means authoritative;
|
||||
fixes and enhancements are welcome. Please see the file CONTRIBUTING
|
||||
for details.
|
||||
|
||||
Thanks to these Time Zone Caballeros who've made major contributions to the
|
||||
Thanks to these Time Zone Caballeros who’ve made major contributions to the
|
||||
time conversion package: Keith Bostic; Bob Devine; Paul Eggert; Robert Elz;
|
||||
Guy Harris; Mark Horton; John Mackin; and Bradley White. Thanks also to
|
||||
Michael Bloom, Art Neilson, Stephen Prince, John Sovereign, and Frank Wales
|
||||
for testing work, and to Gwillim Law for checking local mean time data.
|
||||
Thanks in particular to Arthur David Olson, the project's founder and first
|
||||
Thanks in particular to Arthur David Olson, the project’s founder and first
|
||||
maintainer, to whom the time zone community owes the greatest debt of all.
|
||||
None of them are responsible for remaining errors.
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
Please report any sensitive security-related bugs via email to the
|
||||
tzdb designated coordinators, currently Paul Eggert
|
||||
<eggert@cs.ucla.edu> and Tim Parenti <tim@timtimeonline.com>.
|
||||
Put "tzdb security" at the start of your email's subject line.
|
||||
Put “tzdb security” at the start of your email’s subject line.
|
||||
We prefer communications to be in English.
|
||||
|
||||
You should receive a response within a week. If not, please follow up
|
||||
|
||||
@@ -16,30 +16,9 @@ and (in Paris only) 1871-05-06 through 1871-05-23.
|
||||
|
||||
Russia
|
||||
|
||||
From Chris Carrier (1996-12-02):
|
||||
On 1929-10-01 the Soviet Union instituted an "Eternal Calendar"
|
||||
with 30-day months plus 5 holidays, with a 5-day week.
|
||||
On 1931-12-01 it changed to a 6-day week; in 1934 it reverted to the
|
||||
Gregorian calendar while retaining the 6-day week; on 1940-06-27 it
|
||||
reverted to the 7-day week. With the 6-day week the usual days
|
||||
off were the 6th, 12th, 18th, 24th and 30th of the month.
|
||||
(Source: Evitiar Zerubavel, _The Seven Day Circle_)
|
||||
|
||||
|
||||
Mark Brader reported a similar story in "The Book of Calendars", edited
|
||||
by Frank Parise (1982, Facts on File, ISBN 0-8719-6467-8), page 377. But:
|
||||
|
||||
From: Petteri Sulonen (via Usenet)
|
||||
Date: 14 Jan 1999 00:00:00 GMT
|
||||
...
|
||||
|
||||
If your source is correct, how come documents between 1929 and 1940 were
|
||||
still dated using the conventional, Gregorian calendar?
|
||||
|
||||
I can post a scan of a document dated December 1, 1934, signed by
|
||||
Yenukidze, the secretary, on behalf of Kalinin, the President of the
|
||||
Executive Committee of the Supreme Soviet, if you like.
|
||||
|
||||
Soviet Russia adopted the Gregorian calendar on 1918-02-14.
|
||||
It also used 5- and 6-day work weeks at times, in parallel with the
|
||||
Gregorian calendar; see <https://en.wikipedia.org/wiki/Soviet_calendar>.
|
||||
|
||||
|
||||
Sweden (and Finland)
|
||||
|
||||
@@ -4,8 +4,6 @@
|
||||
.SH NAME
|
||||
date \- show and set date and time
|
||||
.SH SYNOPSIS
|
||||
.if n .nh
|
||||
.if n .na
|
||||
.B date
|
||||
[
|
||||
.B \-u
|
||||
@@ -79,6 +77,6 @@ hexadecimal (leading 0x), preceded by an optional sign.
|
||||
.br
|
||||
/usr/share/zoneinfo timezone directory
|
||||
.br
|
||||
/usr/share/zoneinfo/Etc/UTC for UTC leap seconds
|
||||
/usr/share/zoneinfo/Etc/UTC for UTC leap seconds, if supported
|
||||
.SH SEE ALSO
|
||||
.BR strftime (3).
|
||||
|
||||
@@ -31,11 +31,6 @@
|
||||
#include <locale.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#if !HAVE_POSIX_DECLS
|
||||
extern char * optarg;
|
||||
extern int optind;
|
||||
#endif
|
||||
|
||||
static int retval = EXIT_SUCCESS;
|
||||
|
||||
static void display(const char *, time_t);
|
||||
@@ -64,7 +59,7 @@ main(const int argc, char *argv[])
|
||||
textdomain(TZ_DOMAIN);
|
||||
#endif /* HAVE_GETTEXT */
|
||||
t = time(NULL);
|
||||
while ((ch = getopt(argc, argv, "ucr:")) != EOF && ch != -1) {
|
||||
while ((ch = getopt(argc, argv, "ucr:")) != -1) {
|
||||
switch (ch) {
|
||||
default:
|
||||
usage();
|
||||
|
||||
+1044
-709
File diff suppressed because it is too large
Load Diff
+13
-15
@@ -181,7 +181,7 @@ instead.
|
||||
.PP
|
||||
The
|
||||
.B ctime
|
||||
function is equivalent to calliing
|
||||
function is equivalent to calling
|
||||
.B localtime
|
||||
and then calling
|
||||
.B asctime
|
||||
@@ -246,17 +246,17 @@ includes the following fields:
|
||||
.PP
|
||||
.nf
|
||||
.ta 2n +\w'long tm_gmtoff;nn'u
|
||||
int tm_sec; /\(** seconds (0\*(en60) \(**/
|
||||
int tm_min; /\(** minutes (0\*(en59) \(**/
|
||||
int tm_hour; /\(** hours (0\*(en23) \(**/
|
||||
int tm_mday; /\(** day of month (1\*(en31) \(**/
|
||||
int tm_mon; /\(** month of year (0\*(en11) \(**/
|
||||
int tm_year; /\(** year \- 1900 \(**/
|
||||
int tm_wday; /\(** day of week (Sunday = 0) \(**/
|
||||
int tm_yday; /\(** day of year (0\*(en365) \(**/
|
||||
int tm_isdst; /\(** is daylight saving time in effect? \(**/
|
||||
char \(**tm_zone; /\(** time zone abbreviation (optional) \(**/
|
||||
long tm_gmtoff; /\(** offset from UT in seconds (optional) \(**/
|
||||
int tm_sec; /* seconds (0\*(en60) */
|
||||
int tm_min; /* minutes (0\*(en59) */
|
||||
int tm_hour; /* hours (0\*(en23) */
|
||||
int tm_mday; /* day of month (1\*(en31) */
|
||||
int tm_mon; /* month of year (0\*(en11) */
|
||||
int tm_year; /* year \- 1900 */
|
||||
int tm_wday; /* day of week (Sunday = 0) */
|
||||
int tm_yday; /* day of year (0\*(en365) */
|
||||
int tm_isdst; /* is daylight saving time in effect? */
|
||||
char *tm_zone; /* time zone abbreviation (optional) */
|
||||
long tm_gmtoff; /* offset from UT in seconds (optional) */
|
||||
.fi
|
||||
.RE
|
||||
.PP
|
||||
@@ -311,13 +311,11 @@ and
|
||||
functions might (or might not) also behave this way.
|
||||
This is for compatibility with older platforms, as required by POSIX.
|
||||
.SH FILES
|
||||
.ta \w'/usr/share/zoneinfo/posixrules\0\0'u
|
||||
.ta \w'/usr/share/zoneinfo/GMT\0\0'u
|
||||
/etc/localtime local timezone file
|
||||
.br
|
||||
/usr/share/zoneinfo timezone directory
|
||||
.br
|
||||
/usr/share/zoneinfo/posixrules default DST rules (obsolete)
|
||||
.br
|
||||
/usr/share/zoneinfo/GMT for UTC leap seconds
|
||||
.PP
|
||||
If /usr/share/zoneinfo/GMT is absent,
|
||||
|
||||
@@ -74,7 +74,7 @@ string consists of zero or more conversion specifications and
|
||||
ordinary characters.
|
||||
All ordinary characters are copied directly into the array.
|
||||
A conversion specification consists of a percent sign
|
||||
.Ql %
|
||||
.q %
|
||||
and one other character.
|
||||
.PP
|
||||
No more than
|
||||
|
||||
+22
-25
@@ -13,7 +13,7 @@ tzset \- initialize time conversion information
|
||||
.PP
|
||||
.B void tzset(void);
|
||||
.PP
|
||||
/\(** Optional and obsolescent: \(**/
|
||||
/* Optional and obsolescent: */
|
||||
.br
|
||||
.B extern char *tzname[];
|
||||
.br
|
||||
@@ -78,7 +78,17 @@ contents are used as a pathname, a pathname beginning with
|
||||
is used as-is; otherwise
|
||||
the pathname is relative to a system time conversion information
|
||||
directory.
|
||||
The file must be in the format specified in
|
||||
In a privileged program the pathname must be relative.
|
||||
Relative pathnames must not contain
|
||||
.q "..\&"
|
||||
components.
|
||||
For the purpose of these checks, a file name beginning with
|
||||
.q "/"
|
||||
is considered to be relative if it is the
|
||||
.B localtime
|
||||
file's name, or if it starts with the
|
||||
system timezone directory's name followed by one more more slashes.
|
||||
The file must be a regular file in the format specified in
|
||||
.BR tzfile (5).
|
||||
.PP
|
||||
When
|
||||
@@ -267,7 +277,7 @@ is a placeholder.
|
||||
.TP
|
||||
.B <\-03>3<\-02>,M3.5.0/\-2,M10.5.0/\-1
|
||||
stands for time in western Greenland, 3 hours behind UT, where clocks
|
||||
follow the EU rules of
|
||||
follow the EU rule of
|
||||
springing forward on March's last Sunday at 01:00 UT (\-02:00 local
|
||||
time, i.e., 22:00 the previous day) and falling back on October's last
|
||||
Sunday at 01:00 UT (\-01:00 local time, i.e., 23:00 the previous day).
|
||||
@@ -280,28 +290,13 @@ If
|
||||
.I TZ
|
||||
specifies daylight saving time but does not specify a
|
||||
.IR rule ,
|
||||
and the optional
|
||||
.BR tzfile (5)-format
|
||||
file
|
||||
.B posixrules
|
||||
is present in the system time conversion information directory, the
|
||||
rules in
|
||||
.B posixrules
|
||||
are used, with the
|
||||
.B posixrules
|
||||
standard and daylight saving time offsets from UT
|
||||
replaced by those specified by the
|
||||
.I offset
|
||||
values in
|
||||
.IR TZ .
|
||||
However, the
|
||||
.B posixrules
|
||||
file is obsolete: if it is present it is only for backward compatibility,
|
||||
and it does not work reliably.
|
||||
the rule typically defaults to the current US daylight-saving rule,
|
||||
although such a default is not guaranteed and
|
||||
is incorrect for many locations outside the US.
|
||||
Therefore, if a
|
||||
.I TZ
|
||||
string directly specifies a timezone with daylight saving time,
|
||||
it should specify the daylight saving rules explicitly.
|
||||
it should specify the daylight saving rule explicitly.
|
||||
.PP
|
||||
For compatibility with System V Release 3.1, a semicolon
|
||||
.RB ( ; )
|
||||
@@ -369,6 +364,10 @@ If successful, the
|
||||
function returns a nonnull pointer to the newly allocated object.
|
||||
Otherwise, it returns a null pointer and sets
|
||||
.IR errno .
|
||||
The
|
||||
.B tzfree
|
||||
function does not modify
|
||||
.IR errno .
|
||||
.SH ERRORS
|
||||
.TP
|
||||
.B EOVERFLOW
|
||||
@@ -389,13 +388,11 @@ for any of the errors specified for the routines
|
||||
and
|
||||
.BR read (2).
|
||||
.SH FILES
|
||||
.ta \w'/usr/share/zoneinfo/posixrules\0\0'u
|
||||
.ta \w'/usr/share/zoneinfo/GMT\0\0'u
|
||||
/etc/localtime local timezone file
|
||||
.br
|
||||
/usr/share/zoneinfo timezone directory
|
||||
.br
|
||||
/usr/share/zoneinfo/posixrules default DST rules (obsolete)
|
||||
.br
|
||||
/usr/share/zoneinfo/GMT for UTC leap seconds
|
||||
.PP
|
||||
If /usr/share/zoneinfo/GMT is absent,
|
||||
|
||||
+224
-156
@@ -82,8 +82,9 @@
|
||||
# include <stdbool.h>
|
||||
#endif
|
||||
|
||||
#if __STDC_VERSION__ < 202311
|
||||
# undef static_assert
|
||||
/* For pre-C23 compilers, a substitute for static_assert.
|
||||
Some of these compilers may warn if it is used outside the top level. */
|
||||
#if __STDC_VERSION__ < 202311 && !defined static_assert
|
||||
# define static_assert(cond) extern int static_assert_check[(cond) ? 1 : -1]
|
||||
#endif
|
||||
|
||||
@@ -98,7 +99,9 @@
|
||||
#endif
|
||||
|
||||
/* This string was in the Factory zone through version 2016f. */
|
||||
#define GRANDPARENTED "Local time zone must be set--use tzsetup"
|
||||
#ifndef GRANDPARENTED
|
||||
# define GRANDPARENTED "Local time zone must be set--see zic manual page"
|
||||
#endif
|
||||
|
||||
/*
|
||||
** Defaults for preprocessor symbols.
|
||||
@@ -118,6 +121,14 @@
|
||||
# define HAVE__GENERIC (201112 <= __STDC_VERSION__)
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_GETEUID
|
||||
# define HAVE_GETEUID 1
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_GETRESUID
|
||||
# define HAVE_GETRESUID 1
|
||||
#endif
|
||||
|
||||
#if !defined HAVE_GETTEXT && defined __has_include
|
||||
# if __has_include(<libintl.h>)
|
||||
# define HAVE_GETTEXT 1
|
||||
@@ -182,37 +193,44 @@
|
||||
# define ctime_r _incompatible_ctime_r
|
||||
#endif /* HAVE_INCOMPATIBLE_CTIME_R */
|
||||
|
||||
#ifndef TZ_RUNTIME_LEAPS
|
||||
# define TZ_RUNTIME_LEAPS 1
|
||||
#endif
|
||||
|
||||
/*
|
||||
** Nested includes
|
||||
*/
|
||||
|
||||
/* Avoid clashes with NetBSD by renaming NetBSD's declarations.
|
||||
If defining the 'timezone' variable, avoid a clash with FreeBSD's
|
||||
'timezone' function by renaming its declaration. */
|
||||
#define localtime_rz sys_localtime_rz
|
||||
#define mktime_z sys_mktime_z
|
||||
#define posix2time_z sys_posix2time_z
|
||||
#define time2posix_z sys_time2posix_z
|
||||
#if defined USG_COMPAT && USG_COMPAT == 2
|
||||
# define timezone sys_timezone
|
||||
#endif
|
||||
#define timezone_t sys_timezone_t
|
||||
#define tzalloc sys_tzalloc
|
||||
#define tzfree sys_tzfree
|
||||
#include <time.h>
|
||||
#undef localtime_rz
|
||||
#undef mktime_z
|
||||
#undef posix2time_z
|
||||
#undef time2posix_z
|
||||
#if defined USG_COMPAT && USG_COMPAT == 2
|
||||
# undef timezone
|
||||
#endif
|
||||
#undef timezone_t
|
||||
#undef tzalloc
|
||||
#undef tzfree
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
/* If defining the 'timezone' variable a la POSIX, avoid clashing with the old
|
||||
'timezone' function of FreeBSD <= 14, by renaming the latter's declaration.
|
||||
This hack can be removed after 2028-11-30, FreeBSD 14's expected EOL. */
|
||||
#if (defined __FreeBSD__ && __FreeBSD__ < 15 && defined __BSD_VISIBLE \
|
||||
&& defined USG_COMPAT && USG_COMPAT == 2)
|
||||
# define timezone sys_timezone
|
||||
# define timezone_defined
|
||||
#endif
|
||||
|
||||
#include <time.h>
|
||||
|
||||
#ifdef timezone_defined
|
||||
# undef timezone
|
||||
# undef timezone_defined
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
#if defined HAVE_STRNLEN && !HAVE_STRNLEN
|
||||
static size_t
|
||||
strnlen (char const *s, size_t maxlen)
|
||||
{
|
||||
size_t i;
|
||||
for (i = 0; i < maxlen && s[i]; i++)
|
||||
continue;
|
||||
return i;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if !PORT_TO_C89
|
||||
# include <inttypes.h>
|
||||
#endif
|
||||
@@ -234,6 +252,9 @@
|
||||
#ifndef ENOMEM
|
||||
# define ENOMEM EINVAL
|
||||
#endif
|
||||
#ifndef ENOTCAPABLE
|
||||
# define ENOTCAPABLE EINVAL
|
||||
#endif
|
||||
#ifndef ENOTSUP
|
||||
# define ENOTSUP EINVAL
|
||||
#endif
|
||||
@@ -246,7 +267,12 @@
|
||||
#endif /* HAVE_GETTEXT */
|
||||
|
||||
#if HAVE_UNISTD_H
|
||||
# include <unistd.h> /* for R_OK, and other POSIX goodness */
|
||||
# include <unistd.h>
|
||||
#else
|
||||
/* Assume getopt.o or equivalent is linked via Makefile configuration. */
|
||||
int getopt(int, char *const[], char const *);
|
||||
extern char *optarg;
|
||||
extern int optind;
|
||||
#endif /* HAVE_UNISTD_H */
|
||||
|
||||
/* SUPPORT_POSIX2008 means the tzcode library should support
|
||||
@@ -274,6 +300,16 @@
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_ISSETUGID
|
||||
# if (defined __FreeBSD__ || defined __NetBSD__ || defined __OpenBSD__ \
|
||||
|| (defined __linux__ && !defined __GLIBC__) /* Android, musl, etc. */ \
|
||||
|| (defined __APPLE__ && defined __MACH__) || defined __sun)
|
||||
# define HAVE_ISSETUGID 1
|
||||
# else
|
||||
# define HAVE_ISSETUGID 0
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_SNPRINTF
|
||||
# define HAVE_SNPRINTF (!PORT_TO_C89 || 199901 <= __STDC_VERSION__)
|
||||
#endif
|
||||
@@ -310,10 +346,6 @@
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef R_OK
|
||||
# define R_OK 4
|
||||
#endif /* !defined R_OK */
|
||||
|
||||
#if PORT_TO_C89
|
||||
|
||||
/*
|
||||
@@ -322,150 +354,144 @@
|
||||
** previously included files. glibc 2.1 and Solaris 10 and later have
|
||||
** stdint.h, even with pre-C99 compilers.
|
||||
*/
|
||||
#if !defined HAVE_STDINT_H && defined __has_include
|
||||
# define HAVE_STDINT_H 1 /* C23 __has_include implies C99 stdint.h. */
|
||||
#endif
|
||||
#ifndef HAVE_STDINT_H
|
||||
# define HAVE_STDINT_H \
|
||||
(199901 <= __STDC_VERSION__ \
|
||||
|| 2 < __GLIBC__ + (1 <= __GLIBC_MINOR__) \
|
||||
|| __CYGWIN__ || INTMAX_MAX)
|
||||
#endif /* !defined HAVE_STDINT_H */
|
||||
# if !defined HAVE_STDINT_H && defined __has_include
|
||||
# define HAVE_STDINT_H 1 /* C23 __has_include implies C99 stdint.h. */
|
||||
# endif
|
||||
# ifndef HAVE_STDINT_H
|
||||
# define HAVE_STDINT_H \
|
||||
(199901 <= __STDC_VERSION__ \
|
||||
|| 2 < __GLIBC__ + (1 <= __GLIBC_MINOR__) \
|
||||
|| __CYGWIN__ || INTMAX_MAX)
|
||||
# endif /* !defined HAVE_STDINT_H */
|
||||
|
||||
#if HAVE_STDINT_H
|
||||
# include <stdint.h>
|
||||
#endif /* !HAVE_STDINT_H */
|
||||
# if HAVE_STDINT_H
|
||||
# include <stdint.h>
|
||||
# endif /* !HAVE_STDINT_H */
|
||||
|
||||
#ifndef HAVE_INTTYPES_H
|
||||
# define HAVE_INTTYPES_H HAVE_STDINT_H
|
||||
#endif
|
||||
#if HAVE_INTTYPES_H
|
||||
# include <inttypes.h>
|
||||
#endif
|
||||
# ifndef HAVE_INTTYPES_H
|
||||
# define HAVE_INTTYPES_H HAVE_STDINT_H
|
||||
# endif
|
||||
# if HAVE_INTTYPES_H
|
||||
# include <inttypes.h>
|
||||
# endif
|
||||
|
||||
/* Pre-C99 GCC compilers define __LONG_LONG_MAX__ instead of LLONG_MAX. */
|
||||
#if defined __LONG_LONG_MAX__ && !defined __STRICT_ANSI__
|
||||
# ifndef LLONG_MAX
|
||||
# define LLONG_MAX __LONG_LONG_MAX__
|
||||
# if defined __LONG_LONG_MAX__ && !defined __STRICT_ANSI__
|
||||
# ifndef LLONG_MAX
|
||||
# define LLONG_MAX __LONG_LONG_MAX__
|
||||
# endif
|
||||
# ifndef LLONG_MIN
|
||||
# define LLONG_MIN (-1 - LLONG_MAX)
|
||||
# endif
|
||||
# ifndef ULLONG_MAX
|
||||
# define ULLONG_MAX (LLONG_MAX * 2ull + 1)
|
||||
# endif
|
||||
# endif
|
||||
# ifndef LLONG_MIN
|
||||
# define LLONG_MIN (-1 - LLONG_MAX)
|
||||
# endif
|
||||
# ifndef ULLONG_MAX
|
||||
# define ULLONG_MAX (LLONG_MAX * 2ull + 1)
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef INT_FAST64_MAX
|
||||
# if 1 <= LONG_MAX >> 31 >> 31
|
||||
# ifndef INT_FAST64_MAX
|
||||
# if 1 <= LONG_MAX >> 31 >> 31
|
||||
typedef long int_fast64_t;
|
||||
# define INT_FAST64_MIN LONG_MIN
|
||||
# define INT_FAST64_MAX LONG_MAX
|
||||
# else
|
||||
# define INT_FAST64_MIN LONG_MIN
|
||||
# define INT_FAST64_MAX LONG_MAX
|
||||
# else
|
||||
/* If this fails, compile with -DHAVE_STDINT_H or with a better compiler. */
|
||||
typedef long long int_fast64_t;
|
||||
# define INT_FAST64_MIN LLONG_MIN
|
||||
# define INT_FAST64_MAX LLONG_MAX
|
||||
# define INT_FAST64_MIN LLONG_MIN
|
||||
# define INT_FAST64_MAX LLONG_MAX
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef PRIdFAST64
|
||||
# if INT_FAST64_MAX == LONG_MAX
|
||||
# define PRIdFAST64 "ld"
|
||||
# else
|
||||
# define PRIdFAST64 "lld"
|
||||
# ifndef PRIdFAST64
|
||||
# if INT_FAST64_MAX == LONG_MAX
|
||||
# define PRIdFAST64 "ld"
|
||||
# else
|
||||
# define PRIdFAST64 "lld"
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef SCNdFAST64
|
||||
# define SCNdFAST64 PRIdFAST64
|
||||
#endif
|
||||
# ifndef SCNdFAST64
|
||||
# define SCNdFAST64 PRIdFAST64
|
||||
# endif
|
||||
|
||||
#ifndef INT_FAST32_MAX
|
||||
# if INT_MAX >> 31 == 0
|
||||
# ifndef INT_FAST32_MAX
|
||||
typedef long int_fast32_t;
|
||||
# define INT_FAST32_MAX LONG_MAX
|
||||
# define INT_FAST32_MIN LONG_MIN
|
||||
# else
|
||||
typedef int int_fast32_t;
|
||||
# define INT_FAST32_MAX INT_MAX
|
||||
# define INT_FAST32_MIN INT_MIN
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef INT_LEAST32_MAX
|
||||
# ifndef INT_LEAST32_MAX
|
||||
typedef int_fast32_t int_least32_t;
|
||||
#endif
|
||||
# endif
|
||||
|
||||
#ifndef INTMAX_MAX
|
||||
# ifdef LLONG_MAX
|
||||
# ifndef INTMAX_MAX
|
||||
# ifdef LLONG_MAX
|
||||
typedef long long intmax_t;
|
||||
# ifndef HAVE_STRTOLL
|
||||
# define HAVE_STRTOLL 1
|
||||
# endif
|
||||
# if HAVE_STRTOLL
|
||||
# define strtoimax strtoll
|
||||
# endif
|
||||
# define INTMAX_MAX LLONG_MAX
|
||||
# define INTMAX_MIN LLONG_MIN
|
||||
# else
|
||||
# ifndef HAVE_STRTOLL
|
||||
# define HAVE_STRTOLL 1
|
||||
# endif
|
||||
# if HAVE_STRTOLL
|
||||
# define strtoimax strtoll
|
||||
# endif
|
||||
# define INTMAX_MAX LLONG_MAX
|
||||
# define INTMAX_MIN LLONG_MIN
|
||||
# else
|
||||
typedef long intmax_t;
|
||||
# define INTMAX_MAX LONG_MAX
|
||||
# define INTMAX_MIN LONG_MIN
|
||||
# define INTMAX_MAX LONG_MAX
|
||||
# define INTMAX_MIN LONG_MIN
|
||||
# endif
|
||||
# ifndef strtoimax
|
||||
# define strtoimax strtol
|
||||
# endif
|
||||
# endif
|
||||
# ifndef strtoimax
|
||||
# define strtoimax strtol
|
||||
|
||||
# ifndef PRIdMAX
|
||||
# if INTMAX_MAX == LLONG_MAX
|
||||
# define PRIdMAX "lld"
|
||||
# else
|
||||
# define PRIdMAX "ld"
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef PRIdMAX
|
||||
# if INTMAX_MAX == LLONG_MAX
|
||||
# define PRIdMAX "lld"
|
||||
# else
|
||||
# define PRIdMAX "ld"
|
||||
# ifndef PTRDIFF_MAX
|
||||
# define PTRDIFF_MAX MAXVAL(ptrdiff_t, TYPE_BIT(ptrdiff_t))
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef PTRDIFF_MAX
|
||||
# define PTRDIFF_MAX MAXVAL(ptrdiff_t, TYPE_BIT(ptrdiff_t))
|
||||
#endif
|
||||
|
||||
#ifndef UINT_FAST32_MAX
|
||||
# ifndef UINT_FAST32_MAX
|
||||
typedef unsigned long uint_fast32_t;
|
||||
#endif
|
||||
# endif
|
||||
|
||||
#ifndef UINT_FAST64_MAX
|
||||
# if 3 <= ULONG_MAX >> 31 >> 31
|
||||
# ifndef UINT_FAST64_MAX
|
||||
# if 3 <= ULONG_MAX >> 31 >> 31
|
||||
typedef unsigned long uint_fast64_t;
|
||||
# define UINT_FAST64_MAX ULONG_MAX
|
||||
# else
|
||||
# define UINT_FAST64_MAX ULONG_MAX
|
||||
# else
|
||||
/* If this fails, compile with -DHAVE_STDINT_H or with a better compiler. */
|
||||
typedef unsigned long long uint_fast64_t;
|
||||
# define UINT_FAST64_MAX ULLONG_MAX
|
||||
# define UINT_FAST64_MAX ULLONG_MAX
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef UINTMAX_MAX
|
||||
# ifdef ULLONG_MAX
|
||||
# ifndef UINTMAX_MAX
|
||||
# ifdef ULLONG_MAX
|
||||
typedef unsigned long long uintmax_t;
|
||||
# define UINTMAX_MAX ULLONG_MAX
|
||||
# else
|
||||
# define UINTMAX_MAX ULLONG_MAX
|
||||
# else
|
||||
typedef unsigned long uintmax_t;
|
||||
# define UINTMAX_MAX ULONG_MAX
|
||||
# define UINTMAX_MAX ULONG_MAX
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef PRIuMAX
|
||||
# ifdef ULLONG_MAX
|
||||
# define PRIuMAX "llu"
|
||||
# else
|
||||
# define PRIuMAX "lu"
|
||||
# ifndef PRIuMAX
|
||||
# ifdef ULLONG_MAX
|
||||
# define PRIuMAX "llu"
|
||||
# else
|
||||
# define PRIuMAX "lu"
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef SIZE_MAX
|
||||
# define SIZE_MAX ((size_t) -1)
|
||||
#endif
|
||||
# ifndef SIZE_MAX
|
||||
# define SIZE_MAX ((size_t) -1)
|
||||
# endif
|
||||
|
||||
#endif /* PORT_TO_C89 */
|
||||
|
||||
@@ -513,6 +539,15 @@ typedef unsigned long uintmax_t;
|
||||
# define HAVE___HAS_C_ATTRIBUTE false
|
||||
#endif
|
||||
|
||||
#ifdef __has_attribute
|
||||
# if __has_attribute (nonstring)
|
||||
# define ATTRIBUTE_NONSTRING __attribute__((__nonstring__))
|
||||
# endif
|
||||
#endif
|
||||
#ifndef ATTRIBUTE_NONSTRING
|
||||
# define ATTRIBUTE_NONSTRING
|
||||
#endif
|
||||
|
||||
#if HAVE___HAS_C_ATTRIBUTE
|
||||
# if __has_c_attribute(deprecated)
|
||||
# define ATTRIBUTE_DEPRECATED [[deprecated]]
|
||||
@@ -585,11 +620,11 @@ typedef unsigned long uintmax_t;
|
||||
# define ATTRIBUTE_UNSEQUENCED /* empty */
|
||||
#endif
|
||||
|
||||
/* GCC attributes that are useful in tzcode.
|
||||
__attribute__((const)) is stricter than [[unsequenced]],
|
||||
so the latter is an adequate substitute in non-GCC C23 platforms.
|
||||
__attribute__((pure)) is stricter than [[reproducible]],
|
||||
so the latter is an adequate substitute in non-GCC C23 platforms. */
|
||||
/* GNU C attributes that are useful in tzcode.
|
||||
Although neither __attribute__((const)) nor __attribute__((pure)) are
|
||||
stricter than their C23 counterparts [[unsequenced]] and [[reproducible]],
|
||||
the C23 attributes happen to work in each tzcode use of ATTRIBUTE_CONST
|
||||
and ATTRIBUTE_PURE. (This might not work outside of tzcode!) */
|
||||
#if __GNUC__ < 3
|
||||
# define ATTRIBUTE_CONST ATTRIBUTE_UNSEQUENCED
|
||||
# define ATTRIBUTE_FORMAT(spec) /* empty */
|
||||
@@ -608,6 +643,12 @@ typedef unsigned long uintmax_t;
|
||||
#else
|
||||
# define ATTRIBUTE_PURE_114833 /* empty */
|
||||
#endif
|
||||
/* GCC_LINT hack to pacify GCC bug 114833 even though the attribute is
|
||||
not strictly correct, as the function might not return whereas pure
|
||||
functions are supposed to return exactly once. This hack is not
|
||||
known to generate wrong code for tzcode on any platform.
|
||||
Remove this macro and its uses when the bug is fixed in a GCC release. */
|
||||
#define ATTRIBUTE_PURE_114833_HACK ATTRIBUTE_PURE_114833
|
||||
|
||||
#if (__STDC_VERSION__ < 199901 && !defined restrict \
|
||||
&& (PORT_TO_C89 || defined _MSC_VER))
|
||||
@@ -744,10 +785,10 @@ typedef time_tz tz_time_t;
|
||||
# endif
|
||||
DEPRECATED_IN_C23 char *asctime(struct tm const *);
|
||||
DEPRECATED_IN_C23 char *ctime(time_t const *);
|
||||
#if SUPPORT_POSIX2008
|
||||
# if SUPPORT_POSIX2008
|
||||
char *asctime_r(struct tm const *restrict, char *restrict);
|
||||
char *ctime_r(time_t const *, char *);
|
||||
#endif
|
||||
# endif
|
||||
ATTRIBUTE_CONST double difftime(time_t, time_t);
|
||||
size_t strftime(char *restrict, size_t, char const *restrict,
|
||||
struct tm const *restrict);
|
||||
@@ -795,6 +836,23 @@ extern char *asctime_r(struct tm const *restrict, char *restrict);
|
||||
extern char **environ;
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_MEMPCPY
|
||||
# if (defined mempcpy \
|
||||
|| defined __FreeBSD__ || defined __NetBSD__ || defined __linux__)
|
||||
# define HAVE_MEMPCPY 1
|
||||
# else
|
||||
# define HAVE_MEMPCPY 0
|
||||
# endif
|
||||
#endif
|
||||
#if !HAVE_MEMPCPY
|
||||
static void *
|
||||
mempcpy(void *restrict s1, void const *restrict s2, size_t n)
|
||||
{
|
||||
char *p = memcpy(s1, s2, n);
|
||||
return p + n;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if 2 <= HAVE_TZNAME + (TZ_TIME_T || !HAVE_POSIX_DECLS)
|
||||
extern char *tzname[];
|
||||
#endif
|
||||
@@ -855,26 +913,32 @@ time_t posix2time(time_t);
|
||||
#endif
|
||||
|
||||
/*
|
||||
** Define functions that are ABI compatible with NetBSD but have
|
||||
** better prototypes. NetBSD 6.1.4 defines a pointer type timezone_t
|
||||
** and labors under the misconception that 'const timezone_t' is a
|
||||
** pointer to a constant. This use of 'const' is ineffective, so it
|
||||
** is not done here. What we call 'struct state' NetBSD calls
|
||||
** Define functions that are ABI compatible with NetBSD.
|
||||
** What we call 'struct state' NetBSD calls
|
||||
** 'struct __state', but this is a private name so it doesn't matter.
|
||||
*/
|
||||
#if NETBSD_INSPIRED
|
||||
# ifdef _NETBSD_SOURCE
|
||||
# define state __state
|
||||
# else
|
||||
typedef struct state *timezone_t;
|
||||
# endif
|
||||
struct tm *localtime_rz(timezone_t restrict, time_t const *restrict,
|
||||
struct tm *restrict);
|
||||
time_t mktime_z(timezone_t restrict, struct tm *restrict);
|
||||
timezone_t tzalloc(char const *);
|
||||
void tzfree(timezone_t);
|
||||
# if STD_INSPIRED
|
||||
# if TZ_RUNTIME_LEAPS
|
||||
# define ATTRIBUTE_POSIX2TIME ATTRIBUTE_PURE
|
||||
# else
|
||||
# define ATTRIBUTE_POSIX2TIME ATTRIBUTE_CONST
|
||||
# endif
|
||||
# if TZ_TIME_T || !defined posix2time_z
|
||||
ATTRIBUTE_PURE time_t posix2time_z(timezone_t, time_t);
|
||||
ATTRIBUTE_POSIX2TIME time_t posix2time_z(timezone_t, time_t);
|
||||
# endif
|
||||
# if TZ_TIME_T || !defined time2posix_z
|
||||
ATTRIBUTE_PURE time_t time2posix_z(timezone_t, time_t);
|
||||
ATTRIBUTE_POSIX2TIME time_t time2posix_z(timezone_t, time_t);
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
@@ -885,7 +949,7 @@ ATTRIBUTE_PURE time_t time2posix_z(timezone_t, time_t);
|
||||
|
||||
#define TYPE_BIT(type) (CHAR_BIT * (ptrdiff_t) sizeof(type))
|
||||
#define TYPE_SIGNED(type) (((type) -1) < 0)
|
||||
#define TWOS_COMPLEMENT(t) ((t) ~ (t) 0 < 0)
|
||||
#define TWOS_COMPLEMENT(type) (TYPE_SIGNED (type) && (! ~ (type) -1))
|
||||
|
||||
/* Minimum and maximum of two values. Use lower case to avoid
|
||||
naming clashes with standard include files. */
|
||||
@@ -1008,23 +1072,27 @@ time_t timeoff(struct tm *, long);
|
||||
*/
|
||||
|
||||
#if HAVE_GETTEXT
|
||||
#define _(msgid) gettext(msgid)
|
||||
# define _(msgid) gettext(msgid)
|
||||
#else /* !HAVE_GETTEXT */
|
||||
#define _(msgid) msgid
|
||||
# define _(msgid) (msgid)
|
||||
#endif /* !HAVE_GETTEXT */
|
||||
#define N_(msgid) (msgid)
|
||||
|
||||
#if !defined TZ_DOMAIN && defined HAVE_GETTEXT
|
||||
# define TZ_DOMAIN "tz"
|
||||
#endif
|
||||
|
||||
#if HAVE_INCOMPATIBLE_CTIME_R
|
||||
#undef asctime_r
|
||||
#undef ctime_r
|
||||
# undef asctime_r
|
||||
# undef ctime_r
|
||||
char *asctime_r(struct tm const *restrict, char *restrict);
|
||||
char *ctime_r(time_t const *, char *);
|
||||
#endif /* HAVE_INCOMPATIBLE_CTIME_R */
|
||||
|
||||
/* Handy macros that are independent of tzfile implementation. */
|
||||
/* Handy constants that are independent of tzfile implementation. */
|
||||
|
||||
/* 2**31 - 1 as a signed integer, and usable in #if. */
|
||||
#define TWO_31_MINUS_1 2147483647
|
||||
|
||||
enum {
|
||||
SECSPERMIN = 60,
|
||||
|
||||
@@ -49,8 +49,9 @@
|
||||
and account for the tm_year origin (1900) and time_t origin (1970). */
|
||||
#define MKTIME_FITS_IN(min, max) \
|
||||
((min) < 0 \
|
||||
&& ((min) + 0x7fffffff) / 366 / 24 / 60 / 60 / 2 + 1970 - 1900 < INT_MIN \
|
||||
&& INT_MAX < ((max) - 0x7fffffff) / 366 / 24 / 60 / 60 / 2 + 1970 - 1900)
|
||||
&& (((min) + TWO_31_MINUS_1) / 366 / 24 / 60 / 60 / 2 + 1970 - 1900 \
|
||||
< INT_MIN) \
|
||||
&& INT_MAX < ((max) - TWO_31_MINUS_1) / 366 / 24 / 60 / 60 / 2 + 1970 - 1900)
|
||||
|
||||
/* MKTIME_MIGHT_OVERFLOW is true if mktime can fail due to time_t overflow
|
||||
or if it is not known whether mktime can fail,
|
||||
|
||||
+195
-188
@@ -3,14 +3,16 @@
|
||||
<head>
|
||||
<title>Theory and pragmatics of the tz code and data</title>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<style>
|
||||
pre {margin-left: 2em; white-space: pre-wrap;}
|
||||
dd {margin-left: 1.3rem;}
|
||||
pre {margin-left: 1.3rem; overflow: auto;}
|
||||
ul {padding-left: 1.3rem;}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h1>Theory and pragmatics of the <code><abbr>tz</abbr></code> code and data</h1>
|
||||
<h3>Outline</h3>
|
||||
<nav>
|
||||
<ul>
|
||||
<li><a href="#scope">Scope of the <code><abbr>tz</abbr></code>
|
||||
@@ -89,24 +91,25 @@ The <code><abbr>tz</abbr></code> code is upwards compatible with <a
|
||||
href="https://en.wikipedia.org/wiki/POSIX">POSIX</a>, an international
|
||||
standard for <a
|
||||
href="https://en.wikipedia.org/wiki/Unix">UNIX</a>-like systems.
|
||||
As of this writing, the current edition of POSIX is POSIX.1-2024,
|
||||
which has been published but not yet in HTML form.
|
||||
Unlike its predecessor POSIX.1-2017 (<a
|
||||
href="https://pubs.opengroup.org/onlinepubs/9699919799/"> The Open
|
||||
Group Base Specifications Issue 7</a>, IEEE Std 1003.1-2017, 2018
|
||||
Edition), POSIX.1-2024 requires support for the
|
||||
As of this writing, the current edition of POSIX is
|
||||
<a href="https://pubs.opengroup.org/onlinepubs/9799919799/">POSIX.1-2024</a>
|
||||
(The Open Group Base Specifications Issue 8, IEEE Std 1003.1-2024).
|
||||
Unlike its predecessors
|
||||
<a href="https://archive.org/details/POSIX.1-1988">POSIX.1-1988</a> through
|
||||
<a href="https://pubs.opengroup.org/onlinepubs/9699919799/">POSIX.1-2017</a>,
|
||||
POSIX.1-2024 requires support for the
|
||||
<code><abbr>tz</abbr></code> database, which has a
|
||||
model for describing civil time that is more complex than the
|
||||
standard and daylight saving times required by POSIX.1-2017.
|
||||
standard and daylight saving times required by earlier POSIX editions.
|
||||
A <code><abbr>tz</abbr></code> timezone corresponds to a ruleset that can
|
||||
have more than two changes per year, these changes need not merely
|
||||
flip back and forth between two alternatives, and the rules themselves
|
||||
can change at times.
|
||||
Whether and when a timezone changes its clock,
|
||||
and even the timezone's notional base offset from <abbr>UTC</abbr>,
|
||||
and even the timezone’s notional base offset from <abbr>UTC</abbr>,
|
||||
are variable.
|
||||
It does not always make sense to talk about a timezone's
|
||||
"base offset", which is not necessarily a single number.
|
||||
It does not always make sense to talk about a timezone’s
|
||||
“base offset”, which is not necessarily a single number.
|
||||
</p>
|
||||
|
||||
</section>
|
||||
@@ -118,16 +121,16 @@ Each timezone has a name that uniquely identifies the timezone.
|
||||
Inexperienced users are not expected to select these names unaided.
|
||||
Distributors should provide documentation and/or a simple selection
|
||||
interface that explains each name via a map or via descriptive text like
|
||||
"Czech Republic" instead of the timezone name "<code>Europe/Prague</code>".
|
||||
“Czech Republic” instead of the timezone name “<code>Europe/Prague</code>”.
|
||||
If geolocation information is available, a selection interface can
|
||||
locate the user on a timezone map or prioritize names that are
|
||||
geographically close. For an example selection interface, see the
|
||||
<code>tzselect</code> program in the <code><abbr>tz</abbr></code> code.
|
||||
Unicode's <a href="https://cldr.unicode.org">Common Locale Data
|
||||
Unicode’s <a href="https://cldr.unicode.org">Common Locale Data
|
||||
Repository (<abbr>CLDR</abbr>)</a>
|
||||
contains data that may be useful for other selection
|
||||
interfaces; it maps timezone names like <code>Europe/Prague</code> to
|
||||
locale-dependent strings like "Prague", "Praha", "Прага", and "布拉格".
|
||||
locale-dependent strings like “Prague”, “Praha”, “Прага”, and “布拉格”.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
@@ -142,13 +145,13 @@ among the following goals:
|
||||
civil time.
|
||||
</li>
|
||||
<li>
|
||||
Indicate to experts where the timezone's clocks typically are.
|
||||
Indicate to experts where the timezone’s clocks typically are.
|
||||
</li>
|
||||
<li>
|
||||
Be robust in the presence of political changes.
|
||||
For example, names are typically not tied to countries, to avoid
|
||||
incompatibilities when countries change their name (e.g.,
|
||||
Swaziland→Eswatini) or when locations change countries (e.g., Hong
|
||||
Swaziland→Eswatini) or when locations change countries (e.g., Hong
|
||||
Kong from UK colony to China).
|
||||
There is no requirement that every country or national
|
||||
capital must have a timezone name.
|
||||
@@ -166,11 +169,11 @@ Names normally have the format
|
||||
<var>AREA</var><code>/</code><var>LOCATION</var>, where
|
||||
<var>AREA</var> is a continent or ocean, and
|
||||
<var>LOCATION</var> is a specific location within the area.
|
||||
North and South America share the same area, '<code>America</code>'.
|
||||
Typical names are '<code>Africa/Cairo</code>',
|
||||
'<code>America/New_York</code>', and '<code>Pacific/Honolulu</code>'.
|
||||
North and South America share the same area, <code>America</code>.
|
||||
Typical names are <code>Africa/Cairo</code>,
|
||||
<code>America/New_York</code>, and <code>Pacific/Honolulu</code>.
|
||||
Some names are further qualified to help avoid confusion; for example,
|
||||
'<code>America/Indiana/Petersburg</code>' distinguishes Petersburg,
|
||||
<code>America/Indiana/Petersburg</code> distinguishes Petersburg,
|
||||
Indiana from other Petersburgs in America.
|
||||
</p>
|
||||
|
||||
@@ -183,25 +186,25 @@ in decreasing order of importance:
|
||||
<ul>
|
||||
<li>
|
||||
Use only valid POSIX file name components (i.e., the parts of
|
||||
names other than '<code>/</code>').
|
||||
Do not use the file name components '<code>.</code>' and
|
||||
'<code>..</code>'.
|
||||
names other than "<code>/</code>").
|
||||
Do not use the file name components "<code>.</code>" and
|
||||
"<code>..</code>".
|
||||
Within a file name component, use only <a
|
||||
href="https://en.wikipedia.org/wiki/ASCII">ASCII</a> letters,
|
||||
'<code>.</code>', '<code>-</code>' and '<code>_</code>'.
|
||||
"<code>.</code>", "<code>-</code>" and "<code>_</code>".
|
||||
Do not use digits, as that might create an ambiguity with <a
|
||||
href="https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap08.html#tag_08_03">POSIX's proleptic
|
||||
<code>TZ</code> strings</a>.
|
||||
href="https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/V1_chap08.html#tag_08_03">POSIX’s
|
||||
proleptic <code>TZ</code> strings</a>.
|
||||
A file name component must not exceed 14 characters or start with
|
||||
'<code>-</code>'.
|
||||
"<code>-</code>".
|
||||
E.g., prefer <code>America/Noronha</code> to
|
||||
<code>America/Fernando_de_Noronha</code>.
|
||||
Exceptions: see the discussion of legacy names below.
|
||||
</li>
|
||||
<li>
|
||||
A name must not be empty, or contain '<code>//</code>', or
|
||||
start or end with '<code>/</code>'.
|
||||
Also, a name must not be '<code>Etc/Unknown</code>', as
|
||||
A name must not be empty, or contain "<code>//</code>", or
|
||||
start or end with "<code>/</code>".
|
||||
Also, a name must not be "<code>Etc/Unknown</code>", as
|
||||
<abbr>CLDR</abbr> uses that string for an unknown or invalid timezone.
|
||||
</li>
|
||||
<li>
|
||||
@@ -213,7 +216,7 @@ in decreasing order of importance:
|
||||
<li>
|
||||
If one name <var>A</var> is an initial prefix of another
|
||||
name <var>AB</var> (ignoring case), then <var>B</var> must not
|
||||
start with '<code>/</code>', as a regular file cannot have the
|
||||
start with "<code>/</code>", as a regular file cannot have the
|
||||
same name as a directory in POSIX.
|
||||
For example, <code>America/New_York</code> precludes
|
||||
<code>America/New_York/Bronx</code>.
|
||||
@@ -280,8 +283,8 @@ in decreasing order of importance:
|
||||
<code>Atlantic/Canaries</code>.
|
||||
</li>
|
||||
<li>
|
||||
Omit common suffixes like '<code>_Islands</code>' and
|
||||
'<code>_City</code>', unless that would lead to ambiguity.
|
||||
Omit common suffixes like "<code>_Islands</code>" and
|
||||
"<code>_City</code>", unless that would lead to ambiguity.
|
||||
E.g., prefer <code>America/Cayman</code> to
|
||||
<code>America/Cayman_Islands</code> and
|
||||
<code>America/Guatemala</code> to
|
||||
@@ -292,10 +295,10 @@ in decreasing order of importance:
|
||||
country of Mexico has several time zones</a>.
|
||||
</li>
|
||||
<li>
|
||||
Use '<code>_</code>' to represent a space.
|
||||
Use "<code>_</code>" to represent a space.
|
||||
</li>
|
||||
<li>
|
||||
Omit '<code>.</code>' from abbreviations in names.
|
||||
Omit "<code>.</code>" from abbreviations in names.
|
||||
E.g., prefer <code>Atlantic/St_Helena</code> to
|
||||
<code>Atlantic/St._Helena</code>.
|
||||
</li>
|
||||
@@ -303,15 +306,15 @@ in decreasing order of importance:
|
||||
Do not change established names if they only marginally violate
|
||||
the above guidelines.
|
||||
For example, do not change the existing name <code>Europe/Rome</code> to
|
||||
<code>Europe/Milan</code> merely because Milan's population has grown
|
||||
to be somewhat greater than Rome's.
|
||||
<code>Europe/Milan</code> merely because Milan’s population has grown
|
||||
to be somewhat greater than Rome’s.
|
||||
</li>
|
||||
<li>
|
||||
If a name is changed, put its old spelling in the
|
||||
'<code>backward</code>' file as a link to the new spelling.
|
||||
"<code>backward</code>" file as a link to the new spelling.
|
||||
This means old spellings will continue to work.
|
||||
Ordinarily a name change should occur only in the rare case when
|
||||
a location's consensus English-language spelling changes; for example,
|
||||
a location’s consensus English-language spelling changes; for example,
|
||||
in 2008 <code>Asia/Calcutta</code> was renamed to <code>Asia/Kolkata</code>
|
||||
due to long-time widespread use of the new city name instead of the old.
|
||||
</li>
|
||||
@@ -327,11 +330,11 @@ have included the following:
|
||||
<ul>
|
||||
<li>
|
||||
Older versions of this package used a different naming scheme.
|
||||
See the file '<code>backward</code>' for most of these older names
|
||||
(e.g., '<code>US/Eastern</code>' instead of '<code>America/New_York</code>').
|
||||
See the file "<code>backward</code>" for most of these older names
|
||||
(e.g., <code>US/Eastern</code> instead of <code>America/New_York</code>).
|
||||
The other old-fashioned names still supported are
|
||||
'<code>WET</code>', '<code>CET</code>', '<code>MET</code>', and
|
||||
'<code>EET</code>' (see the file '<code>europe</code>').
|
||||
<code>WET</code>, <code>CET</code>, <code>MET</code>, and
|
||||
<code>EET</code> (see the file "<code>europe</code>").
|
||||
</li>
|
||||
|
||||
<li>
|
||||
@@ -339,13 +342,13 @@ Older versions of this package defined legacy names that are
|
||||
incompatible with the first guideline of location names, but which are
|
||||
still supported.
|
||||
These legacy names are mostly defined in the file
|
||||
'<code>etcetera</code>'.
|
||||
Also, the file '<code>backward</code>' defines the legacy names
|
||||
'<code>Etc/GMT0</code>', '<code>Etc/GMT-0</code>', '<code>Etc/GMT+0</code>',
|
||||
'<code>GMT0</code>', '<code>GMT-0</code>' and '<code>GMT+0</code>',
|
||||
and the file '<code>northamerica</code>' defines the legacy names
|
||||
'<code>EST5EDT</code>', '<code>CST6CDT</code>',
|
||||
'<code>MST7MDT</code>', and '<code>PST8PDT</code>'.
|
||||
"<code>etcetera</code>".
|
||||
Also, the file "<code>backward</code>" defines the legacy names
|
||||
<code>Etc/GMT0</code>, <code>Etc/GMT-0</code>, <code>Etc/GMT+0</code>,
|
||||
<code>GMT0</code>, <code>GMT-0</code> and <code>GMT+0</code>,
|
||||
and the file "<code>northamerica</code>" defines the legacy names
|
||||
<code>EST5EDT</code>, <code>CST6CDT</code>,
|
||||
<code>MST7MDT</code>, and <code>PST8PDT</code>.
|
||||
</li>
|
||||
|
||||
<li>
|
||||
@@ -365,11 +368,11 @@ The file <code>zone1970.tab</code> lists geographical locations used
|
||||
to name timezones.
|
||||
It is intended to be an exhaustive list of names for geographic
|
||||
regions as described above; this is a subset of the timezones in the data.
|
||||
Although a <code>zone1970.tab</code> location's
|
||||
Although a <code>zone1970.tab</code> location’s
|
||||
<a href="https://en.wikipedia.org/wiki/Longitude">longitude</a>
|
||||
corresponds to
|
||||
its <a href="https://en.wikipedia.org/wiki/Local_mean_time">local mean
|
||||
time (<abbr>LMT</abbr>)</a> offset with one hour for every 15°
|
||||
time (<abbr>LMT</abbr>)</a> offset with one hour for every 15°
|
||||
east longitude, this relationship is not exact.
|
||||
The backward-compatibility file <code>zone.tab</code> is similar
|
||||
but conforms to the older-version guidelines related to <abbr>ISO</abbr> 3166-1;
|
||||
@@ -395,7 +398,7 @@ on platforms that do not support proleptic <code>TZ</code> strings
|
||||
like <code><+08>-8</code>;
|
||||
no other source file other than <code>backward</code>
|
||||
contains links to its zones.
|
||||
One of <code>etcetera</code>'s names is <code>Etc/UTC</code>,
|
||||
One of <code>etcetera</code>’s names is <code>Etc/UTC</code>,
|
||||
used by functions like <code>gmtime</code> to obtain leap
|
||||
second information on platforms that support leap seconds.
|
||||
Another <code>etcetera</code> name, <code>GMT</code>,
|
||||
@@ -407,7 +410,7 @@ is used by older code releases.
|
||||
<h2 id="abbreviations">Time zone abbreviations</h2>
|
||||
<p>
|
||||
When this package is installed, it generates time zone abbreviations
|
||||
like '<code>EST</code>' to be compatible with human tradition and POSIX.
|
||||
like <code>EST</code> to be compatible with human tradition and POSIX.
|
||||
Here are the general guidelines used for choosing time zone abbreviations,
|
||||
in decreasing order of importance:
|
||||
</p>
|
||||
@@ -415,25 +418,24 @@ in decreasing order of importance:
|
||||
<ul>
|
||||
<li>
|
||||
Use three to six characters that are ASCII alphanumerics or
|
||||
'<code>+</code>' or '<code>-</code>'.
|
||||
"<code>+</code>" or "<code>-</code>".
|
||||
Previous editions of this database also used characters like
|
||||
space and '<code>?</code>', but these characters have a
|
||||
space and "<code>?</code>", but these characters have a
|
||||
special meaning to the
|
||||
<a href="https://en.wikipedia.org/wiki/Unix_shell">UNIX shell</a>
|
||||
and cause commands like
|
||||
'<code><a href="https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#set">set</a>
|
||||
`<a href="https://pubs.opengroup.org/onlinepubs/9699919799/utilities/date.html">date</a>`</code>'
|
||||
"<code><a href="https://pubs.opengroup.org/onlinepubs/9799919799/utilities/V3_chap02.html#set">set</a>
|
||||
`<a href="https://pubs.opengroup.org/onlinepubs/9799919799/utilities/date.html">date</a>`</code>"
|
||||
to have unexpected effects.
|
||||
Previous editions of this guideline required upper-case letters, but the
|
||||
Congressman who introduced
|
||||
<a href="https://en.wikipedia.org/wiki/Chamorro_Time_Zone">Chamorro
|
||||
Standard Time</a> preferred "ChST", so lower-case letters are now
|
||||
allowed.
|
||||
Also, POSIX from 2001 on relaxed the rule to allow '<code>-</code>',
|
||||
'<code>+</code>', and alphanumeric characters from the portable
|
||||
Standard Time</a> preferred “ChST”, so lower-case letters are now allowed.
|
||||
Also, POSIX from 2001 on relaxed the rule to allow "<code>-</code>",
|
||||
"<code>+</code>", and alphanumeric characters from the portable
|
||||
character set in the current locale.
|
||||
In practice ASCII alphanumerics and '<code>+</code>' and
|
||||
'<code>-</code>' are safe in all locales.
|
||||
In practice ASCII alphanumerics and "<code>+</code>" and
|
||||
"<code>-</code>" are safe in all locales.
|
||||
|
||||
<p>
|
||||
In other words, in the C locale the POSIX extended regular
|
||||
@@ -445,10 +447,10 @@ in decreasing order of importance:
|
||||
</li>
|
||||
<li>
|
||||
Use abbreviations that are in common use among English-speakers,
|
||||
e.g., 'EST' for Eastern Standard Time in North America.
|
||||
e.g., “EST” for Eastern Standard Time in North America.
|
||||
We assume that applications translate them to other languages
|
||||
as part of the normal localization process; for example,
|
||||
a French application might translate 'EST' to 'HNE'.
|
||||
a French application might translate “EST” to “HNE”.
|
||||
|
||||
<p>
|
||||
<small>These abbreviations (for standard/daylight/etc. time) are:
|
||||
@@ -483,7 +485,7 @@ in decreasing order of importance:
|
||||
NST/NDT/NWT/NPT/NDDT Newfoundland,
|
||||
NST/NDT/NWT/NPT Nome,
|
||||
NZMT/NZST New Zealand through 1945,
|
||||
NZST/NZDT New Zealand 1946–present,
|
||||
NZST/NZDT New Zealand 1946–present,
|
||||
PKT/PKST Pakistan,
|
||||
PST/PDT/PWT/PPT Pacific,
|
||||
PST/PDT Philippine,
|
||||
@@ -500,12 +502,12 @@ in decreasing order of importance:
|
||||
</li>
|
||||
<li>
|
||||
<p>
|
||||
For times taken from a city's longitude, use the
|
||||
For times taken from a city’s longitude, use the
|
||||
traditional <var>x</var>MT notation.
|
||||
The only abbreviation like this in current use is '<abbr>GMT</abbr>'.
|
||||
The only abbreviation like this in current use is <abbr>GMT</abbr>.
|
||||
The others are for timestamps before 1960,
|
||||
except that Monrovia Mean Time persisted until 1972.
|
||||
Typically, numeric abbreviations (e.g., '<code>-</code>004430' for
|
||||
Typically, numeric abbreviations (e.g., <code>-</code>004430 for
|
||||
MMT) would cause trouble here, as the numeric strings would exceed
|
||||
the POSIX length limit.
|
||||
</p>
|
||||
@@ -546,39 +548,39 @@ in decreasing order of importance:
|
||||
<small>A few abbreviations also follow the pattern that
|
||||
<abbr>GMT</abbr>/<abbr>BST</abbr> established for time in the UK.
|
||||
They are:
|
||||
BMT/BST for Bermuda 1890–1930,
|
||||
BMT/BST for Bermuda 1890–1930,
|
||||
CMT/BST for Calamarca Mean Time and Bolivian Summer Time
|
||||
1890–1932,
|
||||
1890–1932,
|
||||
DMT/IST for Dublin/Dunsink Mean Time and Irish Summer Time
|
||||
1880–1916,
|
||||
MMT/MST/MDST for Moscow 1880–1919, and
|
||||
RMT/LST for Riga Mean Time and Latvian Summer time 1880–1926.
|
||||
1880–1916,
|
||||
MMT/MST/MDST for Moscow 1880–1919, and
|
||||
RMT/LST for Riga Mean Time and Latvian Summer time 1880–1926.
|
||||
</small>
|
||||
</p>
|
||||
</li>
|
||||
<li>
|
||||
Use '<abbr>LMT</abbr>' for local mean time of locations before the
|
||||
introduction of standard time; see "<a href="#scope">Scope of the
|
||||
<code><abbr>tz</abbr></code> database</a>".
|
||||
Use “<abbr>LMT</abbr>” for local mean time of locations before the
|
||||
introduction of standard time; see “<a href="#scope">Scope of the
|
||||
<code><abbr>tz</abbr></code> database</a>”.
|
||||
</li>
|
||||
<li>
|
||||
If there is no common English abbreviation, use numeric offsets like
|
||||
<code>-</code>05 and <code>+</code>0530 that are generated
|
||||
by <code>zic</code>'s <code>%z</code> notation.
|
||||
by <code>zic</code>’s <code>%z</code> notation.
|
||||
</li>
|
||||
<li>
|
||||
Use current abbreviations for older timestamps to avoid confusion.
|
||||
For example, in 1910 a common English abbreviation for time
|
||||
in central Europe was 'MEZ' (short for both "Middle European
|
||||
Zone" and for "Mitteleuropäische Zeit" in German).
|
||||
Nowadays 'CET' ("Central European Time") is more common in
|
||||
English, and the database uses 'CET' even for circa-1910
|
||||
in central Europe was “MEZ” (short for both “Middle European
|
||||
Zone” and for “Mitteleuropäische Zeit” in German).
|
||||
Nowadays “CET” (“Central European Time”) is more common in
|
||||
English, and the database uses “CET” even for circa-1910
|
||||
timestamps as this is less confusing for modern users and avoids
|
||||
the need for determining when 'CET' supplanted 'MEZ' in common
|
||||
the need for determining when “CET” supplanted “MEZ” in common
|
||||
usage.
|
||||
</li>
|
||||
<li>
|
||||
Use a consistent style in a timezone's history.
|
||||
Use a consistent style in a timezone’s history.
|
||||
For example, if a history tends to use numeric
|
||||
abbreviations and a particular entry could go either way, use a
|
||||
numeric abbreviation.
|
||||
@@ -586,13 +588,13 @@ in decreasing order of importance:
|
||||
<li>
|
||||
Use
|
||||
<a href="https://en.wikipedia.org/wiki/Universal_Time">Universal Time</a>
|
||||
(<abbr>UT</abbr>) (with time zone abbreviation '<code>-</code>00') for
|
||||
(<abbr>UT</abbr>) (with time zone abbreviation <code>-</code>00) for
|
||||
locations while uninhabited.
|
||||
The leading '<code>-</code>' is a flag that the <abbr>UT</abbr> offset is in
|
||||
The leading "<code>-</code>" is a flag that the <abbr>UT</abbr> offset is in
|
||||
some sense undefined; this notation is derived
|
||||
from <a href="https://www.rfc-editor.org/rfc/rfc3339">Internet
|
||||
<abbr title="Request For Comments">RFC</abbr> 3339</a>.
|
||||
(The abbreviation 'Z' that
|
||||
(The abbreviation Z that
|
||||
<a href="https://www.rfc-editor.org/rfc/rfc9557">Internet
|
||||
<abbr>RFC</abbr> 9557</a> uses for this concept
|
||||
would violate the POSIX requirement
|
||||
@@ -602,11 +604,11 @@ in decreasing order of importance:
|
||||
|
||||
<p>
|
||||
Application writers should note that these abbreviations are ambiguous
|
||||
in practice: e.g., 'CST' means one thing in China and something else
|
||||
in North America, and 'IST' can refer to time in India, Ireland or
|
||||
in practice: e.g., CST means one thing in China and something else
|
||||
in North America, and IST can refer to time in India, Ireland or
|
||||
Israel.
|
||||
To avoid ambiguity, use numeric <abbr>UT</abbr> offsets like
|
||||
'<code>-</code>0600' instead of time zone abbreviations like 'CST'.
|
||||
<code>-</code>0600 instead of time zone abbreviations like CST.
|
||||
</p>
|
||||
</section>
|
||||
|
||||
@@ -617,7 +619,7 @@ The <code><abbr>tz</abbr></code> database is not authoritative, and it
|
||||
surely has errors.
|
||||
Corrections are welcome and encouraged; see the file <code>CONTRIBUTING</code>.
|
||||
Users requiring authoritative data should consult national standards
|
||||
bodies and the references cited in the database's comments.
|
||||
bodies and the references cited in the database’s comments.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
@@ -639,7 +641,7 @@ Errors in the <code><abbr>tz</abbr></code> database arise from many sources:
|
||||
clocks actually behaved; the vast majority of the necessary
|
||||
information was lost or never recorded.
|
||||
Thousands more timezones would be needed if
|
||||
the <code><abbr>tz</abbr></code> database's scope were extended to
|
||||
the <code><abbr>tz</abbr></code> database’s scope were extended to
|
||||
cover even just the known or guessed history of standard time; for
|
||||
example, the current single entry for France would need to split
|
||||
into dozens of entries, perhaps hundreds.
|
||||
@@ -648,14 +650,14 @@ Errors in the <code><abbr>tz</abbr></code> database arise from many sources:
|
||||
should be observed.
|
||||
In her 2015 book
|
||||
<cite><a
|
||||
href="https://www.hup.harvard.edu/catalog.php?isbn=9780674286146">The
|
||||
Global Transformation of Time, 1870–1950</a></cite>,
|
||||
href="https://www.hup.harvard.edu/books/9780674286146">The
|
||||
Global Transformation of Time, 1870–1950</a></cite>,
|
||||
Vanessa Ogle writes
|
||||
"Outside of Europe and North America there was no system of time
|
||||
“Outside of Europe and North America there was no system of time
|
||||
zones at all, often not even a stable landscape of mean times,
|
||||
prior to the middle decades of the twentieth century".
|
||||
prior to the middle decades of the twentieth century”.
|
||||
See: Timothy Shenk, <a
|
||||
href="https://www.dissentmagazine.org/blog/booked-a-global-history-of-time-vanessa-ogle">Booked:
|
||||
href="https://dissentmagazine.org/blog/booked-a-global-history-of-time-vanessa-ogle/">Booked:
|
||||
A Global History of Time</a>. <cite>Dissent</cite> 2015-12-17.
|
||||
</li>
|
||||
<li>
|
||||
@@ -671,8 +673,8 @@ href="https://www.dissentmagazine.org/blog/booked-a-global-history-of-time-vanes
|
||||
For the UK the <code><abbr>tz</abbr></code> database relies on
|
||||
years of first-class work done by
|
||||
Joseph Myers and others; see
|
||||
"<a href="https://www.polyomino.org.uk/british-time/">History of
|
||||
legal time in Britain</a>".
|
||||
“<a href="https://www.polyomino.org.uk/british-time/">History of
|
||||
legal time in Britain</a>”.
|
||||
Other countries are not done nearly as well.
|
||||
</li>
|
||||
<li>
|
||||
@@ -697,13 +699,13 @@ href="https://www.dissentmagazine.org/blog/booked-a-global-history-of-time-vanes
|
||||
entries are often accurate for only a small subset of that region.
|
||||
For example, <code>Europe/London</code> stands for the United
|
||||
Kingdom, but its pre-1847 times are valid only for locations that
|
||||
have London's exact meridian, and its 1847 transition
|
||||
have London’s exact meridian, and its 1847 transition
|
||||
to <abbr>GMT</abbr> is known to be valid only for the L&NW and
|
||||
the Caledonian railways.
|
||||
</li>
|
||||
<li>
|
||||
The <code><abbr>tz</abbr></code> database does not record the
|
||||
earliest time for which a timezone's
|
||||
earliest time for which a timezone’s
|
||||
data entries are thereafter valid for every location in the region.
|
||||
For example, <code>Europe/London</code> is valid for all locations
|
||||
in its region after <abbr>GMT</abbr> was made the standard time,
|
||||
@@ -714,7 +716,7 @@ href="https://www.dissentmagazine.org/blog/booked-a-global-history-of-time-vanes
|
||||
</li>
|
||||
<li>
|
||||
The <code><abbr>tz</abbr></code> database does not record a
|
||||
region's boundaries, and in many cases the boundaries are not known.
|
||||
region’s boundaries, and in many cases the boundaries are not known.
|
||||
For example, the timezone
|
||||
<code>America/Kentucky/Louisville</code> represents a region
|
||||
around the city of Louisville, the boundaries of which are
|
||||
@@ -747,7 +749,7 @@ href="https://www.dissentmagazine.org/blog/booked-a-global-history-of-time-vanes
|
||||
than what the <code><abbr>tz</abbr></code> code can handle.
|
||||
For example, from 1880 to 1916 clocks in Ireland observed Dublin Mean
|
||||
Time (estimated to be <abbr>UT</abbr>
|
||||
−00:25:21.1); although the <code><abbr>tz</abbr></code>
|
||||
−00:25:21.1); although the <code><abbr>tz</abbr></code>
|
||||
source data can represent the .1 second, TZif files and the code cannot.
|
||||
In practice these old specifications were rarely if ever
|
||||
implemented to subsecond precision.
|
||||
@@ -787,9 +789,9 @@ href="https://www.dissentmagazine.org/blog/booked-a-global-history-of-time-vanes
|
||||
non-hour-based system at night.
|
||||
And even today, some local practices diverge from the Gregorian
|
||||
calendar with 24-hour days. These divergences range from
|
||||
relatively minor, such as Japanese bars giving times like "24:30" for the
|
||||
relatively minor, such as Japanese bars giving times like 24:30 for the
|
||||
wee hours of the morning, to more-significant differences such as <a
|
||||
href="https://theworld.org/stories/2015-01-30/if-you-have-meeting-ethiopia-you-better-double-check-time">the
|
||||
href="https://theworld.org/stories/2015/01/30/ethiopian-time">the
|
||||
east African practice of starting the day at dawn</a>, renumbering
|
||||
the Western 06:00 to be 12:00. These practices are largely outside
|
||||
the scope of the <code><abbr>tz</abbr></code> code and data, which
|
||||
@@ -825,16 +827,16 @@ href="https://www.dissentmagazine.org/blog/booked-a-global-history-of-time-vanes
|
||||
<li>
|
||||
Civil time was not based on atomic time before 1972, and we do not
|
||||
know the history of
|
||||
<a href="https://en.wikipedia.org/wiki/Earth's_rotation">earth's
|
||||
<a href="https://en.wikipedia.org/wiki/Earth's_rotation">earth’s
|
||||
rotation</a> accurately enough to map <a
|
||||
href="https://en.wikipedia.org/wiki/International_System_of_Units"><abbr
|
||||
title="International System of Units">SI</abbr></a> seconds to
|
||||
historical <a href="https://en.wikipedia.org/wiki/Solar_time">solar time</a>
|
||||
to more than about one-hour accuracy.
|
||||
See: Stephenson FR, Morrison LV, Hohenkerk CY.
|
||||
<a href="https://dx.doi.org/10.1098/rspa.2016.0404">Measurement of
|
||||
the Earth's rotation: 720 BC to AD 2015</a>.
|
||||
<cite>Proc Royal Soc A</cite>. 2016;472:20160404.
|
||||
See: Morrison LV, Stephenson FR, Hohenkerk CY, Zawilski M.
|
||||
<a href="https://doi.org/10.1098/rspa.2020.0776">Addendum 2020
|
||||
to ‘Measurement of the Earth’s rotation: 720 BC to AD 2015’</a>.
|
||||
<cite>Proc Royal Soc A</cite>. 2021;477:20200776.
|
||||
Also see: Espenak F. <a
|
||||
href="https://eclipse.gsfc.nasa.gov/SEhelp/uncertainty2004.html">Uncertainty
|
||||
in Delta T (ΔT)</a>.
|
||||
@@ -843,7 +845,7 @@ href="https://www.dissentmagazine.org/blog/booked-a-global-history-of-time-vanes
|
||||
The relationship between POSIX time (that is, <abbr>UTC</abbr> but
|
||||
ignoring <a href="https://en.wikipedia.org/wiki/Leap_second">leap
|
||||
seconds</a>) and <abbr>UTC</abbr> is not agreed upon.
|
||||
This affects time stamps during the leap second era (1972–2035).
|
||||
This affects time stamps during the leap second era (1972–2035).
|
||||
Although the POSIX
|
||||
clock officially stops during an inserted leap second, at least one
|
||||
proposed standard has it jumping back a second instead; and in
|
||||
@@ -862,12 +864,12 @@ href="https://www.dissentmagazine.org/blog/booked-a-global-history-of-time-vanes
|
||||
|
||||
<p>
|
||||
In short, many, perhaps most, of the <code><abbr>tz</abbr></code>
|
||||
database's pre-1970 and future timestamps are either wrong or
|
||||
database’s pre-1970 and future timestamps are either wrong or
|
||||
misleading.
|
||||
Any attempt to pass the
|
||||
<code><abbr>tz</abbr></code> database off as the definition of time
|
||||
should be unacceptable to anybody who cares about the facts.
|
||||
In particular, the <code><abbr>tz</abbr></code> database's
|
||||
In particular, the <code><abbr>tz</abbr></code> database’s
|
||||
<abbr>LMT</abbr> offsets should not be considered meaningful, and
|
||||
should not prompt creation of timezones
|
||||
merely because two locations
|
||||
@@ -886,7 +888,7 @@ Code compatible with this package is already
|
||||
primary use of this package is to update obsolete time-related files.
|
||||
To do this, you may need to compile the time zone compiler
|
||||
<code>zic</code> supplied with this package instead of using the
|
||||
system <code>zic</code>, since the format of <code>zic</code>'s
|
||||
system <code>zic</code>, since the format of <code>zic</code>’s
|
||||
input is occasionally extended, and a platform may still be shipping
|
||||
an older <code>zic</code>.
|
||||
</p>
|
||||
@@ -914,7 +916,8 @@ environment variable <code>TZ</code>, which can have two forms:
|
||||
|
||||
<h3 id="POSIX.1-2017">POSIX.1-2017 properties and limitations</h3>
|
||||
<p>
|
||||
Some platforms support only the features required by POSIX.1-2017,
|
||||
Some platforms support only the features required by POSIX.1-2017
|
||||
and earlier editions,
|
||||
and have not yet upgraded to POSIX.1-2024.
|
||||
Code intended to be portable to these platforms must deal
|
||||
with problems that were fixed in later POSIX editions.
|
||||
@@ -956,14 +959,14 @@ with problems that were fixed in later POSIX editions.
|
||||
are 3 or more characters specifying the standard
|
||||
and daylight saving time (<abbr>DST</abbr>) zone abbreviations.
|
||||
Starting with POSIX.1-2001, <var>std</var> and <var>dst</var>
|
||||
may also be in a quoted form like '<code><+09></code>';
|
||||
may also be quoted in angle brackets, like <code><+09></code>;
|
||||
this allows "<code>+</code>" and "<code>-</code>" in the names.
|
||||
</dd>
|
||||
<dt><var>offset</var></dt><dd>
|
||||
is of the form
|
||||
'<code>[±]<var>hh</var>:[<var>mm</var>[:<var>ss</var>]]</code>'
|
||||
<code>[±]<var>hh</var>:[<var>mm</var>[:<var>ss</var>]]</code>
|
||||
and specifies the offset west of <abbr>UT</abbr>.
|
||||
'<var>hh</var>' may be a single digit;
|
||||
<var>hh</var> may be a single digit;
|
||||
0≤<var>hh</var>≤24.
|
||||
The default <abbr>DST</abbr> offset is one hour ahead of
|
||||
standard time.
|
||||
@@ -976,10 +979,10 @@ with problems that were fixed in later POSIX editions.
|
||||
</dd>
|
||||
<dt><var>time</var></dt><dd>
|
||||
takes the form
|
||||
'<var>hh</var><code>:</code>[<var>mm</var>[<code>:</code><var>ss</var>]]'
|
||||
<var>hh</var><code>:</code>[<var>mm</var>[<code>:</code><var>ss</var>]]
|
||||
and defaults to 02:00.
|
||||
This is the same format as the offset, except that a
|
||||
leading '<code>+</code>' or '<code>-</code>' is not allowed.
|
||||
leading "<code>+</code>" or "<code>-</code>" is not allowed.
|
||||
</dd>
|
||||
<dt><var>date</var></dt><dd>
|
||||
takes one of the following forms:
|
||||
@@ -996,7 +999,7 @@ with problems that were fixed in later POSIX editions.
|
||||
for the <var>d</var>th day of week <var>n</var> of
|
||||
month <var>m</var> of the year, where week 1 is the first
|
||||
week in which day <var>d</var> appears, and
|
||||
'<code>5</code>' stands for the last week in which
|
||||
"<code>5</code>" stands for the last week in which
|
||||
day <var>d</var> appears (which may be either the 4th or
|
||||
5th week).
|
||||
Typically, this is the only useful form; the <var>n</var>
|
||||
@@ -1011,8 +1014,8 @@ with problems that were fixed in later POSIX editions.
|
||||
Zealand after 2007.
|
||||
It says that standard time (<abbr>NZST</abbr>) is 12 hours ahead
|
||||
of <abbr>UT</abbr>, and that daylight saving time
|
||||
(<abbr>NZDT</abbr>) is observed from September's last Sunday at
|
||||
02:00 until April's first Sunday at 03:00:
|
||||
(<abbr>NZDT</abbr>) is observed from September’s last Sunday at
|
||||
02:00 until April’s first Sunday at 03:00:
|
||||
</p>
|
||||
|
||||
<pre><code>TZ='NZST-12NZDT,M9.5.0,M4.1.0/3'</code></pre>
|
||||
@@ -1048,11 +1051,11 @@ POSIX.1-2024 extends POSIX.1-2017 in the following significant ways:
|
||||
Earlier POSIX editions lack this requirement.
|
||||
</li>
|
||||
<li>
|
||||
DST transition times can range from −167:59:59
|
||||
DST transition times can range from −167:59:59
|
||||
to 167:59:59 instead of merely from 00:00:00 to 24:59:59.
|
||||
This allows for proleptic TZ strings
|
||||
like <code>"<-02>2<-01>,M3.5.0/-1,M10.5.0/0"</code>
|
||||
where the transition time −1:00 means 23:00 the previous day.
|
||||
where the transition time −1:00 means 23:00 the previous day.
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
@@ -1065,14 +1068,14 @@ However POSIX.1-2024, like earlier POSIX editions, has some limitations:
|
||||
</li>
|
||||
<li>
|
||||
In POSIX, there is no tamper-proof way for a process to learn the
|
||||
system's best idea of local (wall clock) time.
|
||||
system’s best idea of local (wall clock) time.
|
||||
This is important for applications that an administrator wants
|
||||
used only at certain times – without regard to whether the
|
||||
used only at certain times – without regard to whether the
|
||||
user has fiddled the
|
||||
<code>TZ</code> environment variable.
|
||||
While an administrator can "do everything in <abbr>UT</abbr>" to
|
||||
While an administrator can “do everything in <abbr>UT</abbr>” to
|
||||
get around the problem, doing so is inconvenient and precludes
|
||||
handling daylight saving time shifts – as might be required to
|
||||
handling daylight saving time shifts – as might be required to
|
||||
limit phone calls to off-peak hours.
|
||||
</li>
|
||||
<li>
|
||||
@@ -1081,8 +1084,7 @@ However POSIX.1-2024, like earlier POSIX editions, has some limitations:
|
||||
</li>
|
||||
<li>
|
||||
POSIX does not define the <abbr>DST</abbr> transitions
|
||||
for <code>TZ</code> values like
|
||||
"<code>EST5EDT</code>".
|
||||
for settings like <code>TZ='EST5EDT'</code>.
|
||||
Traditionally the current <abbr>US</abbr> <abbr>DST</abbr> rules
|
||||
were used to interpret such values, but this meant that the
|
||||
<abbr>US</abbr> <abbr>DST</abbr> rules were compiled into each
|
||||
@@ -1124,9 +1126,9 @@ However POSIX.1-2024, like earlier POSIX editions, has some limitations:
|
||||
If the <code>TZ</code> environment variable uses the geographical format,
|
||||
it is used in generating
|
||||
the name of a file from which time-related information is read.
|
||||
The file's format is <dfn><abbr>TZif</abbr></dfn>,
|
||||
The file’s format is <dfn><abbr>TZif</abbr></dfn>,
|
||||
a timezone information format that contains binary data; see
|
||||
<a href="https://www.rfc-editor.org/rfc/9636">Internet
|
||||
<a href="https://www.rfc-editor.org/rfc/rfc9636">Internet
|
||||
<abbr>RFC</abbr> 9636</a>.
|
||||
The daylight saving time rules to be used for a
|
||||
particular timezone are encoded in the
|
||||
@@ -1138,18 +1140,18 @@ However POSIX.1-2024, like earlier POSIX editions, has some limitations:
|
||||
<p>
|
||||
When the <code><abbr>tz</abbr></code> code was developed in the 1980s,
|
||||
it was recognized that allowing the <code>TZ</code> environment
|
||||
variable to take on values such as '<code>America/New_York</code>'
|
||||
might cause "old" programs (that expect <code>TZ</code> to have a
|
||||
variable to take on values such as <code>America/New_York</code>
|
||||
might cause old programs (that expect <code>TZ</code> to have a
|
||||
certain format) to operate incorrectly; consideration was given to using
|
||||
some other environment variable (for example, <code>TIMEZONE</code>)
|
||||
to hold the string used to generate the <abbr>TZif</abbr> file's name.
|
||||
to hold the string used to generate the <abbr>TZif</abbr> file’s name.
|
||||
In the end, however, it was decided to continue using
|
||||
<code>TZ</code>: it is widely used for time zone purposes;
|
||||
separately maintaining both <code>TZ</code>
|
||||
and <code>TIMEZONE</code> seemed a nuisance; and systems where
|
||||
"new" forms of <code>TZ</code> might cause problems can simply
|
||||
use legacy <code>TZ</code> values such as "<code>EST5EDT</code>" which
|
||||
can be used by "new" programs as well as by "old" programs that
|
||||
new forms of <code>TZ</code> might cause problems can simply
|
||||
use legacy settings such as <code>TZ='EST5EDT'</code> which
|
||||
can be used by new programs as well as by old programs that
|
||||
assume pre-POSIX <code>TZ</code> values.
|
||||
</p>
|
||||
</li>
|
||||
@@ -1192,20 +1194,20 @@ The vestigial <abbr>API</abbr>s are:
|
||||
The POSIX <code>tzname</code> variable does not suffice and is no
|
||||
longer needed.
|
||||
It is planned to be removed in a future edition of POSIX.
|
||||
To get a timestamp's time zone abbreviation, consult
|
||||
To get a timestamp’s time zone abbreviation, consult
|
||||
the <code>tm_zone</code> member if available; otherwise,
|
||||
use <code>strftime</code>'s <code>"%Z"</code> conversion
|
||||
use <code>strftime</code>’s <code>"%Z"</code> conversion
|
||||
specification.
|
||||
</li>
|
||||
<li>
|
||||
The POSIX <code>daylight</code> and <code>timezone</code>
|
||||
variables do not suffice and are no longer needed.
|
||||
They are planned to be removed in a future edition of POSIX.
|
||||
To get a timestamp's <abbr>UT</abbr> offset, consult
|
||||
To get a timestamp’s <abbr>UT</abbr> offset, consult
|
||||
the <code>tm_gmtoff</code> member if available; otherwise,
|
||||
subtract values returned by <code>localtime</code>
|
||||
and <code>gmtime</code> using the rules of the Gregorian calendar,
|
||||
or use <code>strftime</code>'s <code>"%z"</code> conversion
|
||||
or use <code>strftime</code>’s <code>"%z"</code> conversion
|
||||
specification if a string like <code>"+0900"</code> suffices.
|
||||
</li>
|
||||
<li>
|
||||
@@ -1230,9 +1232,9 @@ The vestigial <abbr>API</abbr>s are:
|
||||
<li>
|
||||
The <a href="https://en.wikipedia.org/wiki/Version_7_Unix">7th Edition
|
||||
UNIX</a> <code>timezone</code> function is not present in this
|
||||
package; it is impossible to reliably map <code>timezone</code>'s
|
||||
arguments (a "minutes west of <abbr>GMT</abbr>" value and a
|
||||
"daylight saving time in effect" flag) to a time zone
|
||||
package; it is impossible to reliably map <code>timezone</code>’s
|
||||
arguments (a “minutes west of <abbr>GMT</abbr>” value and a
|
||||
“daylight saving time in effect” flag) to a time zone
|
||||
abbreviation, and we refuse to guess.
|
||||
Programs that in the past used the <code>timezone</code> function
|
||||
may now examine <code>localtime(&clock)->tm_zone</code>
|
||||
@@ -1262,7 +1264,7 @@ The vestigial <abbr>API</abbr>s are:
|
||||
The functions that are conditionally compiled
|
||||
if <code>STD_INSPIRED</code> is nonzero should, at this point, be
|
||||
looked on primarily as food for thought.
|
||||
They are not in any sense "standard compatible" – some are
|
||||
They are not in any sense “standard compatible” – some are
|
||||
not, in fact, specified in <em>any</em> standard.
|
||||
They do, however, represent responses of various authors to
|
||||
standardization proposals.
|
||||
@@ -1293,11 +1295,11 @@ The <code><abbr>tz</abbr></code> code and data supply the following interfaces:
|
||||
<ul>
|
||||
<li>
|
||||
A set of timezone names as per
|
||||
"<a href="#naming">Timezone identifiers</a>" above.
|
||||
“<a href="#naming">Timezone identifiers</a>” above.
|
||||
</li>
|
||||
<li>
|
||||
Library functions described in "<a href="#functions">Time and date
|
||||
functions</a>" above.
|
||||
Library functions described in “<a href="#functions">Time and date
|
||||
functions</a>” above.
|
||||
</li>
|
||||
<li>
|
||||
The programs <code>tzselect</code>, <code>zdump</code>,
|
||||
@@ -1319,7 +1321,7 @@ The <code><abbr>tz</abbr></code> code and data supply the following interfaces:
|
||||
</li>
|
||||
<li>
|
||||
The version number of the code and data, as the first line of
|
||||
the text file '<code>version</code>' in each release.
|
||||
the text file "<code>version</code>" in each release.
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
@@ -1347,7 +1349,7 @@ For example, even though the <samp>Asia/Bangkok</samp> timezone
|
||||
currently includes Chang Mai, Hanoi, and Phnom Penh, this is not part
|
||||
of the stable interface and the timezone can split at any time.
|
||||
If a calendar application records a future event in some location other
|
||||
than Bangkok by putting "<samp>Asia/Bangkok</samp>" in the event's record,
|
||||
than Bangkok by putting <samp>Asia/Bangkok</samp> in the event’s record,
|
||||
the application should be robust in the presence of timezone splits
|
||||
between now and the future time.
|
||||
</p>
|
||||
@@ -1381,7 +1383,7 @@ commonly used by
|
||||
<a href="https://www.ntp.org"><abbr title="Network Time Protocol">NTP</abbr></a>
|
||||
software that adjusts the kernel clock.
|
||||
However, kernel-clock twiddling approximates UTC only roughly,
|
||||
and systems needing more precise UTC can use this package's leap
|
||||
and systems needing more precise UTC can use this package’s leap
|
||||
second support directly.
|
||||
</p>
|
||||
|
||||
@@ -1391,8 +1393,8 @@ counts of seconds since the POSIX epoch normally include leap seconds,
|
||||
as opposed to POSIX <code>time_t</code> counts which exclude leap seconds.
|
||||
This modified timescale is converted to <abbr>UTC</abbr>
|
||||
at the same point that time zone and <abbr>DST</abbr>
|
||||
adjustments are applied –
|
||||
namely, at calls to <code>localtime</code> and analogous functions –
|
||||
adjustments are applied –
|
||||
namely, at calls to <code>localtime</code> and analogous functions –
|
||||
and the process is driven by leap second information
|
||||
stored in alternate versions of the <abbr>TZif</abbr> files.
|
||||
Because a leap second adjustment may be needed even
|
||||
@@ -1402,7 +1404,7 @@ also need to consult a <abbr>TZif</abbr> file,
|
||||
conventionally named <samp><abbr>Etc/UTC</abbr></samp>
|
||||
(<samp><abbr>GMT</abbr></samp> in previous versions),
|
||||
to see whether leap second corrections are needed.
|
||||
To convert an application's <code>time_t</code> timestamps to or from
|
||||
To convert an application’s <code>time_t</code> timestamps to or from
|
||||
POSIX <code>time_t</code> timestamps (for use when, say,
|
||||
embedding or interpreting timestamps in portable
|
||||
<a href="https://en.wikipedia.org/wiki/Tar_(computing)"><code>tar</code></a>
|
||||
@@ -1425,7 +1427,7 @@ So if you configure your kernel to count leap seconds, you should also
|
||||
discard <samp>zoneinfo</samp> and rename <samp>zoneinfo-leaps</samp>
|
||||
to <samp>zoneinfo</samp>.
|
||||
Alternatively, you can install just one set of <abbr>TZif</abbr> files
|
||||
in the first place; see the <code>REDO</code> variable in this package's
|
||||
in the first place; see the <code>REDO</code> variable in this package’s
|
||||
<a href="https://en.wikipedia.org/wiki/Makefile">makefile</a>.
|
||||
</p>
|
||||
</section>
|
||||
@@ -1438,9 +1440,9 @@ but they indicate the sort of problems that we would run into if we
|
||||
extended the time zone database further into the past.
|
||||
An excellent resource in this area is Edward M. Reingold
|
||||
and Nachum Dershowitz, <cite><a
|
||||
href="https://www.cambridge.org/fr/academic/subjects/computer-science/computing-general-interest/calendrical-calculations-ultimate-edition-4th-edition">Calendrical
|
||||
href="https://www.cambridge.org/fr/universitypress/subjects/computer-science/computing-general-interest/calendrical-calculations-ultimate-edition-4th-edition">Calendrical
|
||||
Calculations: The Ultimate Edition</a></cite>, Cambridge University Press (2018).
|
||||
Other information and sources are given in the file '<code>calendars</code>'
|
||||
Other information and sources are given in the file "<code>calendars</code>"
|
||||
in the <code><abbr>tz</abbr></code> distribution.
|
||||
They sometimes disagree.
|
||||
</p>
|
||||
@@ -1450,20 +1452,20 @@ They sometimes disagree.
|
||||
<h2 id="planets">Time and time zones off Earth</h2>
|
||||
<p>
|
||||
The European Space Agency is <a
|
||||
href='https://www.esa.int/Applications/Navigation/Telling_time_on_the_Moon'>considering</a>
|
||||
href="https://www.esa.int/Applications/Satellite_navigation/Telling_time_on_the_Moon">considering</a>
|
||||
the establishment of a reference timescale for the Moon, which has
|
||||
days roughly equivalent to 29.5 Earth days, and where relativistic
|
||||
effects cause clocks to tick slightly faster than on Earth.
|
||||
Also, <abbr title="National Aeronautics and Space Administration">NASA</abbr>
|
||||
has been <a
|
||||
href='https://www.whitehouse.gov/wp-content/uploads/2024/04/Celestial-Time-Standardization-Policy.pdf'>ordered</a>
|
||||
href="https://bidenwhitehouse.archives.gov/wp-content/uploads/2024/04/Celestial-Time-Standardization-Policy.pdf">ordered</a>
|
||||
to consider the establishment of Coordinated Lunar Time (<abbr>LTC</abbr>).
|
||||
It is not yet known whether the US and European efforts will result in
|
||||
multiple timescales on the Moon.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Some people's work schedules have used
|
||||
Some people’s work schedules have used
|
||||
<a href="https://en.wikipedia.org/wiki/Timekeeping_on_Mars">Mars time</a>.
|
||||
Jet Propulsion Laboratory (JPL) coordinators kept Mars time on
|
||||
and off during the
|
||||
@@ -1473,7 +1475,7 @@ Some of their family members also adapted to Mars time.
|
||||
Dozens of special Mars watches were built for JPL workers who kept
|
||||
Mars time during the
|
||||
<a href="https://en.wikipedia.org/wiki/Mars_Exploration_Rover">Mars
|
||||
Exploration Rovers (MER)</a> mission (2004–2018).
|
||||
Exploration Rovers (MER)</a> mission (2004–2018).
|
||||
These timepieces looked like normal Seikos and Citizens but were adjusted
|
||||
to use Mars seconds rather than terrestrial seconds, although
|
||||
unfortunately the adjusted watches were unreliable and appear to have
|
||||
@@ -1481,12 +1483,12 @@ had only limited use.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
A Mars solar day is called a "sol" and has a mean period equal to
|
||||
A Mars solar day is called a “sol” and has a mean period equal to
|
||||
about 24 hours 39 minutes 35.244 seconds in terrestrial time.
|
||||
It is divided into a conventional 24-hour clock, so each Mars second
|
||||
equals about 1.02749125 terrestrial seconds.
|
||||
(One MER worker noted, "If I am working Mars hours, and Mars hours are
|
||||
2.5% more than Earth hours, shouldn't I get an extra 2.5% pay raise?")
|
||||
(One MER worker noted, “If I am working Mars hours, and Mars hours are
|
||||
2.5% more than Earth hours, shouldn’t I get an extra 2.5% pay raise?”)
|
||||
</p>
|
||||
|
||||
<p>
|
||||
@@ -1494,7 +1496,7 @@ The <a href="https://en.wikipedia.org/wiki/Prime_meridian">prime
|
||||
meridian</a> of Mars goes through the center of the crater
|
||||
<a href="https://en.wikipedia.org/wiki/Airy-0">Airy-0</a>, named in
|
||||
honor of the British astronomer who built the Greenwich telescope that
|
||||
defines Earth's prime meridian.
|
||||
defines Earth’s prime meridian.
|
||||
Mean solar time on the Mars prime meridian is
|
||||
called Mars Coordinated Time (<abbr>MTC</abbr>).
|
||||
</p>
|
||||
@@ -1502,13 +1504,13 @@ called Mars Coordinated Time (<abbr>MTC</abbr>).
|
||||
<p>
|
||||
Each landed mission on Mars has adopted a different reference for
|
||||
solar timekeeping, so there is no real standard for Mars time zones.
|
||||
For example, the MER mission defined two time zones "Local
|
||||
Solar Time A" and "Local Solar Time B" for its two missions, each zone
|
||||
For example, the MER mission defined two time zones “Local
|
||||
Solar Time A” and “Local Solar Time B” for its two missions, each zone
|
||||
designed so that its time equals local true solar time at
|
||||
approximately the middle of the nominal mission.
|
||||
The A and B zones differ enough so that an MER worker assigned to
|
||||
the A zone might suffer "Mars lag" when switching to work in the B zone.
|
||||
Such a "time zone" is not particularly suited for any application
|
||||
the A zone might suffer “Mars lag” when switching to work in the B zone.
|
||||
Such a “time zone” is not particularly suited for any application
|
||||
other than the mission itself.
|
||||
</p>
|
||||
|
||||
@@ -1522,13 +1524,13 @@ sequential count of Mars solar days elapsed since about 1873-12-29
|
||||
|
||||
<p>
|
||||
In our solar system, Mars is the planet with time and calendar most
|
||||
like Earth's.
|
||||
like Earth’s.
|
||||
On other planets, Sun-based time and calendars would work quite
|
||||
differently.
|
||||
For example, although Mercury's
|
||||
For example, although Mercury’s
|
||||
<a href="https://en.wikipedia.org/wiki/Rotation_period">sidereal
|
||||
rotation period</a> is 58.646 Earth days, Mercury revolves around the
|
||||
Sun so rapidly that an observer on Mercury's equator would see a
|
||||
Sun so rapidly that an observer on Mercury’s equator would see a
|
||||
sunrise only every 175.97 Earth days, i.e., a Mercury year is 0.5 of a
|
||||
Mercury day.
|
||||
Venus is more complicated, partly because its rotation is slightly
|
||||
@@ -1554,8 +1556,8 @@ Sources for time on other planets:
|
||||
<ul>
|
||||
<li>
|
||||
Michael Allison and Robert Schmunk,
|
||||
"<a href="https://www.giss.nasa.gov/tools/mars24/help/notes.html">Technical
|
||||
Notes on Mars Solar Time as Adopted by the Mars24 Sunclock</a>"
|
||||
“<a href="https://www.giss.nasa.gov/tools/mars24/help/notes.html">Technical
|
||||
Notes on Mars Solar Time as Adopted by the Mars24 Sunclock</a>”
|
||||
(2020-03-08).
|
||||
</li>
|
||||
<li>
|
||||
@@ -1565,28 +1567,33 @@ Sources for time on other planets:
|
||||
</li>
|
||||
<li>
|
||||
Jia-Rui Chong,
|
||||
"<a href="https://www.latimes.com/archives/la-xpm-2004-jan-14-sci-marstime14-story.html">Workdays
|
||||
Fit for a Martian</a>", <cite>Los Angeles Times</cite>
|
||||
(2004-01-14), pp A1, A20–A21.
|
||||
“<a href="https://www.latimes.com/archives/la-xpm-2004-jan-14-sci-marstime14-story.html">Workdays
|
||||
Fit for a Martian</a>”, <cite>Los Angeles Times</cite>
|
||||
(2004-01-14), pp A1, A20–A21.
|
||||
</li>
|
||||
<li>
|
||||
Tom Chmielewski,
|
||||
"<a href="https://www.theatlantic.com/technology/archive/2015/02/jet-lag-is-worse-on-mars/386033/">Jet
|
||||
Lag Is Worse on Mars</a>", <cite>The Atlantic</cite> (2015-02-26)
|
||||
“<a href="https://www.theatlantic.com/technology/archive/2015/02/jet-lag-is-worse-on-mars/386033/">Jet
|
||||
Lag Is Worse on Mars</a>”, <cite>The Atlantic</cite> (2015-02-26)
|
||||
</li>
|
||||
<li>
|
||||
Matt Williams,
|
||||
"<a href="https://www.universetoday.com/37481/days-of-the-planets/">How
|
||||
long is a day on the other planets of the solar system?</a>"
|
||||
“<a href="https://www.universetoday.com/articles/days-of-the-planets">How
|
||||
long is a day on the other planets of the solar system?</a>”
|
||||
(2016-01-20).
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
<footer>
|
||||
<hr>
|
||||
This file is in the public domain, so clarified as of 2009-05-17 by
|
||||
Arthur David Olson.
|
||||
<hr>
|
||||
This web page is in the public domain, so clarified as of
|
||||
2009-05-17 by Arthur David Olson.
|
||||
<br>
|
||||
Please send corrections to this web page to the
|
||||
<a href="mailto:tz@iana.org">time zone mailing list</a>.
|
||||
The mailing list and its archives are public,
|
||||
so please do not send confidential information.
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
+72
-46
@@ -1,6 +1,6 @@
|
||||
.\" This file is in the public domain, so clarified as of
|
||||
.\" 1996-06-05 by Arthur David Olson.
|
||||
.Dd December 15, 2022
|
||||
.Dd March 8, 2026
|
||||
.Dt TIME2POSIX 3
|
||||
.Os
|
||||
.Sh NAME
|
||||
@@ -17,10 +17,9 @@
|
||||
.Fn posix2time "time_t t"
|
||||
.Sh DESCRIPTION
|
||||
.St -p1003.1-88
|
||||
requires the time_t value 536457599 to stand for 1986-12-31 23:59:59 UTC.
|
||||
This effectively implies that POSIX
|
||||
.Vt time_t
|
||||
values cannot include leap
|
||||
says that
|
||||
.B time_t
|
||||
values cannot count leap
|
||||
seconds and,
|
||||
therefore,
|
||||
that the system time must be adjusted as each leap occurs.
|
||||
@@ -37,28 +36,25 @@ value).
|
||||
This means that these values will differ from those required by POSIX
|
||||
by the net number of leap seconds inserted since the Epoch.
|
||||
.Pp
|
||||
Typically this is not a problem as the type
|
||||
For many C programs this is not a problem as the C standard says that
|
||||
.Vt time_t
|
||||
is intended
|
||||
to be
|
||||
is
|
||||
(mostly)
|
||||
opaque \(em
|
||||
.Vt time_t
|
||||
values should only be obtained-from and
|
||||
passed-to functions such as
|
||||
.Xr time 3 ,
|
||||
values should be obtained from and
|
||||
passed to functions such as
|
||||
.Xr time 2 ,
|
||||
.Xr localtime 3 ,
|
||||
.Xr mktime 3
|
||||
.Xr mktime 3 ,
|
||||
and
|
||||
.Xr difftime 3 .
|
||||
However,
|
||||
.St -p1003.1-88
|
||||
gives an arithmetic
|
||||
expression for directly computing a
|
||||
POSIX gives an arithmetic
|
||||
expression for computing a
|
||||
.Vt time_t
|
||||
value from a given date/time,
|
||||
value directly from a given Universal date and time,
|
||||
and the same relationship is assumed by some
|
||||
(usually older)
|
||||
applications.
|
||||
Any programs creating/dissecting
|
||||
.Vt time_t
|
||||
@@ -70,38 +66,31 @@ The
|
||||
.Fn time2posix
|
||||
and
|
||||
.Fn posix2time
|
||||
functions are provided to address this
|
||||
.Vt time_t
|
||||
mismatch by converting
|
||||
functions address this mismatch by converting
|
||||
between local
|
||||
.Vt time_t
|
||||
values and their POSIX equivalents.
|
||||
This is done by accounting for the number of time-base changes that
|
||||
would have taken place on a POSIX system as leap seconds were inserted
|
||||
or deleted.
|
||||
These converted values can then be used in lieu of correcting the older
|
||||
applications,
|
||||
or when communicating with POSIX-compliant systems.
|
||||
These converted values can then be used
|
||||
when communicating with POSIX-compliant systems.
|
||||
.Pp
|
||||
The
|
||||
.Fn time2posix
|
||||
function
|
||||
is single-valued.
|
||||
That is,
|
||||
every local
|
||||
function converts a
|
||||
.Vt time_t
|
||||
corresponds to a single POSIX
|
||||
.Vt time_t .
|
||||
value to its POSIX counterpart, if one exists.
|
||||
The
|
||||
.Fn posix2time
|
||||
function
|
||||
function does the reverse but
|
||||
is less well-behaved:
|
||||
for a positive leap second hit the result is not unique,
|
||||
and for a negative leap second hit the corresponding
|
||||
POSIX
|
||||
.Vt time_t
|
||||
does not exist so an adjacent value is returned.
|
||||
Both of these are good indicators of the inferiority of the
|
||||
doesn't exist so an adjacent value is returned.
|
||||
Both of these are indicate problems with the
|
||||
POSIX representation.
|
||||
.Pp
|
||||
The following table summarizes the relationship between a time
|
||||
@@ -109,23 +98,35 @@ T and its conversion to,
|
||||
and back from,
|
||||
the POSIX representation over the leap second inserted at the end of June,
|
||||
1993.
|
||||
.Bl -column "93/06/30" "23:59:59" "A+0" "X=time2posix(T)"
|
||||
.It Sy "DATE TIME T X=time2posix(T) posix2time(X)"
|
||||
.It "93/06/30 23:59:59 A+0 B+0 A+0"
|
||||
.It "93/06/30 23:59:60 A+1 B+1 A+1 or A+2"
|
||||
.It "93/07/01 00:00:00 A+2 B+1 A+1 or A+2"
|
||||
.It "93/07/01 00:00:01 A+3 B+2 A+3"
|
||||
In this table,
|
||||
.Li X=time2posix(T) ,
|
||||
.Li Y=posix2time(X) ,
|
||||
.Li A=741484816 ,
|
||||
and
|
||||
.Li B=A\-17
|
||||
because 17 positive leap seconds preceded this leap second.
|
||||
.Pp
|
||||
.Bl -column "1993-06-30" "23:59:59" "A+0" "B+0"
|
||||
.It DATE TIME T X Y
|
||||
.It 1993-06-30 23:59:59 A B A
|
||||
.It 1993-06-30 23:59:60 A+1 B+1 A+1 or A+2
|
||||
.It 1993-07-01 00:00:00 A+2 B+1 A+1 or A+2
|
||||
.It 1993-07-01 00:00:01 A+3 B+2 A+3
|
||||
.El
|
||||
.Pp
|
||||
A leap second deletion would look like...
|
||||
.Bl -column "??/06/30" "23:59:58" "A+0" "X=time2posix(T)"
|
||||
.It Sy "DATE TIME T X=time2posix(T) posix2time(X)"
|
||||
.It "??/06/30 23:59:58 A+0 B+0 A+0"
|
||||
.It "??/07/01 00:00:00 A+1 B+2 A+1"
|
||||
.It "??/07/01 00:00:01 A+2 B+3 A+2"
|
||||
.El
|
||||
A leap second deletion would look like the following, and
|
||||
.Li posix2time(B+1)
|
||||
would return either
|
||||
.Li A
|
||||
or
|
||||
.Li A+1 .
|
||||
.Pp
|
||||
.D1 No "[Note: posix2time(B+1) => A+0 or A+1]"
|
||||
.Bl -column "????-06-30" "23:59:58" "A+1" "B+2" "A+1"
|
||||
.It DATE TIME T X Y
|
||||
.It ????-06-30 23:59:58 A B A
|
||||
.It ????-07-01 00:00:00 A+1 B+2 A+1
|
||||
.It ????-07-01 00:00:01 A+2 B+3 A+2
|
||||
.El
|
||||
.Pp
|
||||
If leap-second support is not enabled,
|
||||
local
|
||||
@@ -139,6 +140,31 @@ and both
|
||||
and
|
||||
.Fn posix2time
|
||||
degenerate to the identity function.
|
||||
.Sh RETURN VALUES
|
||||
If successful, these functions return the resulting timestamp without modifying
|
||||
.Va errno .
|
||||
Otherwise, they set
|
||||
.Va errno
|
||||
and return
|
||||
.Li "((time_t) -1)" .
|
||||
.Sh ERRORS
|
||||
These functions fail if:
|
||||
.Bl -tag -width Er
|
||||
.It Bq Er EOVERFLOW
|
||||
The resulting value cannot be represented.
|
||||
This can happen for
|
||||
.Fn posix2time
|
||||
if its argument is close to the maximum
|
||||
.Vt time_t
|
||||
value.
|
||||
In environments where the
|
||||
.Ev TZ
|
||||
environment variable names a TZif file,
|
||||
overflow can happen for either function for an argument sufficiently
|
||||
close to an extreme
|
||||
.Vt time_t
|
||||
value if the TZif file specifies unrealistic leap second corrections.
|
||||
.El
|
||||
.Sh "SEE ALSO"
|
||||
.Xr difftime 3 ,
|
||||
.Xr localtime 3 ,
|
||||
|
||||
+224
-199
@@ -2,6 +2,10 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<style>
|
||||
ul {padding-left: 1.3rem;}
|
||||
</style>
|
||||
<title>Time and the Arts</title>
|
||||
</head>
|
||||
<body>
|
||||
@@ -9,28 +13,40 @@
|
||||
<h2>Documentaries</h2>
|
||||
<ul>
|
||||
<li>
|
||||
"<a href="https://www.youtube.com/watch?v=84aWtseb2-4">Daylight
|
||||
Saving Time Explained</a>" (2011; 6:39) lightly covers daylight saving
|
||||
time's theory, history, pros and cons. Among other things, it explains
|
||||
Arizona's daylight-saving enclaves quite well.</li>
|
||||
“<a href="https://www.youtube.com/watch?v=84aWtseb2-4">Daylight
|
||||
Saving Time Explained</a>” (2011; 6:39) lightly covers daylight saving
|
||||
time’s theory, history, pros and cons. Among other things, it explains
|
||||
Arizona’s daylight-saving enclaves quite well.
|
||||
</li>
|
||||
<li>
|
||||
"<a href="https://www.youtube.com/watch?v=-5wpm-gesOY">The Problem
|
||||
with Time & Timezones – Computerphile</a>" (2013; 10:12) delves
|
||||
into problems that programmers have with timekeeping.</li>
|
||||
“<a href="https://www.youtube.com/watch?v=-5wpm-gesOY">The Problem
|
||||
with Time & Timezones – Computerphile</a>” (2013; 10:12) delves
|
||||
into problems that programmers have with timekeeping.
|
||||
</li>
|
||||
<li>
|
||||
"<a href="https://www.rferl.org/a/28375932.html">All The Time In The World:
|
||||
Explaining The Mysteries Of Time Zones</a>" (2017; 2:15)
|
||||
“<a href="https://www.rferl.org/a/all-the-time-in-the-world/28375932.html">All
|
||||
The Time In The World: Explaining The Mysteries Of Time Zones</a>” (2017; 2:15)
|
||||
briefly says why France has more time zones than Russia.
|
||||
</li>
|
||||
<li>
|
||||
"<a href="https://www.youtube.com/watch?v=yRz-Dl60Lfc">Why Denmark used to be
|
||||
.04 seconds behind the world</a>" (2019; 6:29) explains why the United Kingdom
|
||||
— and, once, Denmark — haven't always exactly followed their own
|
||||
“<a href="https://www.youtube.com/watch?v=yRz-Dl60Lfc">Why Denmark used to be
|
||||
.04 seconds behind the world</a>” (2019; 6:29) explains why the United Kingdom
|
||||
– and, once, Denmark – haven’t always exactly followed their own
|
||||
laws about civil time.
|
||||
</li>
|
||||
<li>
|
||||
"About Time" (1962; 59 minutes) is part of the
|
||||
“<a href="https://www.youtube.com/watch?v=mfzsBMUiGGQ">How Daylight Savings
|
||||
Broke this $24 Million Building</a>” (2025; 5:01) describes the system of
|
||||
mirrors used at Melbourne’s Shrine of Remembrance to ensure the sun’s light
|
||||
still hits at the “correct” ceremonial hour to commemorate the Armistice which
|
||||
ended World War I.
|
||||
</li>
|
||||
<li>
|
||||
“About Time” (1962; 59 minutes) is part of the
|
||||
Bell Science extravaganza, with Frank Baxter, Richard Deacon, and Les Tremayne.
|
||||
Its advisor was Richard Feynman, and it was voiced by Mel Blanc.
|
||||
(<a href="https://www.imdb.com/title/tt0154110/">IMDb entry</a>.)</li>
|
||||
(<a href="https://www.imdb.com/title/tt0154110/">IMDb entry</a>.)
|
||||
</li>
|
||||
</ul>
|
||||
<h2>Movies</h2>
|
||||
<ul>
|
||||
@@ -39,15 +55,16 @@ In the 1946 movie <em>A Matter of Life and Death</em>
|
||||
(U.S. title <em>Stairway to Heaven</em>)
|
||||
there is a reference to British Double Summer Time.
|
||||
The time does not play a large part in the plot;
|
||||
it's just a passing reference to the time when one of the
|
||||
characters was supposed to have died (but didn't).
|
||||
it’s just a passing reference to the time when one of the
|
||||
characters was supposed to have died (but didn’t).
|
||||
(<a href="https://www.imdb.com/title/tt0038733/">IMDb entry.</a>)
|
||||
(Dave Cantor)
|
||||
</li>
|
||||
<li>
|
||||
The 1953 railway comedy movie <em>The Titfield Thunderbolt</em> includes a
|
||||
play on words on British Double Summer Time. Valentine's wife wants
|
||||
him to leave the pub and asks him, "Do you know what time it is?"
|
||||
And he, happy where he is, replies: "Yes, my love. Summer double time."
|
||||
play on words on British Double Summer Time. Valentine’s wife wants
|
||||
him to leave the pub and asks him, “Do you know what time it is?”
|
||||
And he, happy where he is, replies: “Yes, my love. Summer double time.”
|
||||
(<a href="https://www.imdb.com/title/tt0046436/">IMDb entry.</a>)
|
||||
(Mark Brader, 2009-10-02)
|
||||
</li>
|
||||
@@ -60,12 +77,12 @@ is extended by 10 seconds, it will create a one-time opportunity for
|
||||
a gigantic computerized theft. To achieve this, at one location the
|
||||
crooks interfere with the microwave system supplying time signals to
|
||||
the computer, advancing the time by 0.1 second each minute over the
|
||||
last hour of 1999. (So this movie teaches us that 0.1 × 60 = 10.)
|
||||
last hour of 1999. (So this movie teaches us that 0.1 × 60 = 10.)
|
||||
(<a href="https://www.imdb.com/title/tt0137494/">IMDb entry.</a>)
|
||||
(Mark Brader, 2009-10-02)
|
||||
</li>
|
||||
<li>
|
||||
One mustn't forget the
|
||||
One mustn’t forget the
|
||||
<a href="https://www.youtube.com/watch?v=k4EUTMPuvHo">trailer</a>
|
||||
(2014; 2:23) for the movie <em>Daylight Saving</em>.
|
||||
</li>
|
||||
@@ -73,74 +90,74 @@ One mustn't forget the
|
||||
<h2>TV episodes</h2>
|
||||
<ul>
|
||||
<li>
|
||||
An episode of <em>The Adventures of Superman</em> entitled "The Mysterious
|
||||
Cube," first aired 1958-02-24, had Superman convincing the controllers
|
||||
An episode of <em>The Adventures of Superman</em> entitled “The Mysterious
|
||||
Cube”, first aired 1958-02-24, had Superman convincing the controllers
|
||||
of the Arlington Time Signal to broadcast ahead of actual time;
|
||||
doing so got a crook trying to be declared dead to
|
||||
emerge a bit too early from the titular enclosure.
|
||||
(<a href="https://www.imdb.com/title/tt0506628/">IMDb entry</a>.)
|
||||
</li>
|
||||
<li>
|
||||
"<a href="https://en.wikipedia.org/wiki/The_Chimes_of_Big_Ben">The Chimes
|
||||
of Big Ben</a>", <em>The Prisoner</em>, episode 2, ITC, 1967-10-06.
|
||||
“<a href="https://en.wikipedia.org/wiki/The_Chimes_of_Big_Ben">The Chimes
|
||||
of Big Ben</a>”, <em>The Prisoner</em>, episode 2, ITC, 1967-10-06.
|
||||
Our protagonist tumbles to
|
||||
the fraudulent nature of a Poland-to-England escape upon hearing "Big
|
||||
Ben" chiming on Polish local time.
|
||||
the fraudulent nature of a Poland-to-England escape upon hearing Big
|
||||
Ben chiming on Polish local time.
|
||||
(<a href="https://www.imdb.com/title/tt0679185/">IMDb entry.</a>)
|
||||
</li>
|
||||
<li>
|
||||
"The Susie", <em>Seinfeld</em>, season 8, episode 15, NBC, 1997-02-13.
|
||||
“The Susie”, <em>Seinfeld</em>, season 8, episode 15, NBC, 1997-02-13.
|
||||
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>
|
||||
"20 Hours in America", <em>The West Wing</em>, season 4, episodes 1–2,
|
||||
“20 Hours in America”, <em>The West Wing</em>, season 4, episodes 1–2,
|
||||
2002-09-25, contained a <a
|
||||
href="https://www.youtube.com/watch?v=-J1NHzQ1sgc">scene</a> that
|
||||
saw White House staffers stranded in Indiana; they thought they had time to
|
||||
catch Air Force One but were done in by intra-Indiana local time changes.
|
||||
</li>
|
||||
<li>
|
||||
"In what time zone would you find New York City?" was a $200 question on
|
||||
“In what time zone would you find New York City?” was a $200 question on
|
||||
the 1999-11-13 United States airing of <em>Who Wants to Be a Millionaire?</em>,
|
||||
and "In 1883, what industry led the movement to divide the U.S. into four time
|
||||
zones?" was a $32,000 question on the 2001-05-23 United States airing of
|
||||
and “In 1883, what industry led the movement to divide the U.S. into four time
|
||||
zones?” was a $32,000 question on the 2001-05-23 United States airing of
|
||||
the same show. At this rate, the million-dollar time-zone
|
||||
question should have been asked 2002-06-04.
|
||||
</li>
|
||||
<li>
|
||||
A private jet's mid-flight change of time zones distorts Alison Dubois'
|
||||
premonition in the "We Had a Dream" episode of <em>Medium</em>
|
||||
A private jet’s mid-flight change of time zones distorts Alison Dubois’
|
||||
premonition in the “We Had a Dream” episode of <em>Medium</em>
|
||||
(originally aired 2007-02-28).
|
||||
</li>
|
||||
<li>
|
||||
A criminal's failure to account for the start of daylight saving is pivotal
|
||||
in "<a href="https://monk.fandom.com/wiki/Mr._Monk_and_the_Rapper">Mr. Monk
|
||||
and the Rapper</a>" (first aired 2007-07-20).
|
||||
A criminal’s failure to account for the start of daylight saving is pivotal
|
||||
in “<a href="https://monk.fandom.com/wiki/Mr._Monk_and_the_Rapper">Mr. Monk
|
||||
and the Rapper</a>” (first aired 2007-07-20).
|
||||
</li>
|
||||
<li>
|
||||
In the <em>30 Rock</em> episode "Anna Howard Shaw Day"
|
||||
In the <em>30 Rock</em> episode “Anna Howard Shaw Day”
|
||||
(first broadcast 2010-02-11),
|
||||
Jack Donaghy's date realizes that a Geneva-to-New-York business phone call
|
||||
Jack Donaghy’s date realizes that a Geneva-to-New-York business phone call
|
||||
received in the evening must be fake given the difference in local times.
|
||||
</li>
|
||||
<li>
|
||||
In the "Run by the Monkeys" episode of <em>Da Vinci's Inquest</em>
|
||||
In the “Run by the Monkeys” episode of <em>Da Vinci’s Inquest</em>
|
||||
(first broadcast 2002-11-17),
|
||||
a witness in a five-year-old fire case realizes they may not have set
|
||||
their clock back when daylight saving ended on the day of the fire,
|
||||
introducing the possibility of an hour when arson might have occurred.
|
||||
</li>
|
||||
<li>
|
||||
In "The Todd Couple" episode of <em>Outsourced</em> (first aired 2011-02-10),
|
||||
Manmeet sets up Valentine's Day teledates for 6:00 and 9:00pm;
|
||||
In “The Todd Couple” episode of <em>Outsourced</em> (first aired 2011-02-10),
|
||||
Manmeet sets up Valentine’s Day teledates for 6:00 and 9:00pm;
|
||||
since one is with a New Yorker and the other with a San Franciscan,
|
||||
hilarity ensues.
|
||||
(Never mind that this should be 7:30am in Mumbai, yet for some reason the show
|
||||
proceeds as though it's also mid-evening there.)
|
||||
proceeds as though it’s also mid-evening there.)
|
||||
</li>
|
||||
<li>
|
||||
In the "14 Days to Go"/"T Minus..." episode of
|
||||
In the “14 Days to Go”/“T Minus...” episode of
|
||||
<em>You, Me and the Apocalypse</em>
|
||||
(first aired 2015-11-11 in the UK, 2016-03-10 in the US),
|
||||
the success of a mission to deal with a comet
|
||||
@@ -149,39 +166,39 @@ hinges on whether or not Russia observes daylight saving time.
|
||||
the episode first aired in the week before the switch to <abbr>DST</abbr>.)
|
||||
</li>
|
||||
<li>
|
||||
"The Lost Hour", <em>Eerie, Indiana</em>, episode 10, NBC, 1991-12-01.
|
||||
Despite Indiana's then-lack of <abbr>DST</abbr>,
|
||||
“The Lost Hour”, <em>Eerie, Indiana</em>, episode 10, NBC, 1991-12-01.
|
||||
Despite Indiana’s then-lack of <abbr>DST</abbr>,
|
||||
Marshall changes his clock with unusual consequences.
|
||||
See "<a
|
||||
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>".
|
||||
Indiana</em> was a few dimensions ahead of its time</a>”.
|
||||
</li>
|
||||
<li>
|
||||
"Time Tunnel", <em>The Adventures of Pete & Pete</em>, season 2, episode 5,
|
||||
Nickelodeon, 1994-10-23.
|
||||
“Time Tunnel”, <em>The Adventures of Pete & Pete</em>,
|
||||
season 2, episode 5, Nickelodeon, 1994-10-23.
|
||||
The two Petes travel back in time an hour
|
||||
on the day that <abbr>DST</abbr> ends.
|
||||
</li>
|
||||
<li>
|
||||
"King-Size Homer", <em>The Simpsons</em>, episode 135, Fox, 1995-11-05.
|
||||
Homer, working from home, remarks "8:58, first
|
||||
time I've ever been early for work. Except for all those daylight
|
||||
savings days. Lousy farmers."
|
||||
“King-Size Homer”, <em>The Simpsons</em>, episode 135, Fox, 1995-11-05.
|
||||
Homer, working from home, remarks “8:58, first
|
||||
time I’ve ever been early for work. Except for all those daylight
|
||||
savings days. Lousy farmers.”
|
||||
</li>
|
||||
<li>
|
||||
<em>Last Week Tonight with John Oliver</em>, season 2, episode 5, 2015-03-08,
|
||||
asked, "<a href="https://www.youtube.com/watch?v=br0NW9ufUUw">Daylight Saving
|
||||
Time – How Is This Still A Thing?</a>"
|
||||
asked, “<a href="https://www.youtube.com/watch?v=br0NW9ufUUw">Daylight
|
||||
Saving Time – How Is This Still A Thing?</a>”
|
||||
</li>
|
||||
<li>
|
||||
"Tracks", <em>The Good Wife</em>, season 7, episode 12,
|
||||
“Tracks”, <em>The Good Wife</em>, season 7, episode 12,
|
||||
CBS, 2016-01-17.
|
||||
The applicability of a contract hinges on the
|
||||
time zone associated with a video timestamp.
|
||||
</li>
|
||||
<li>
|
||||
"Justice", <em>Veep</em>, season 6, episode 4, HBO, 2017-05-07.
|
||||
Jonah's inability to understand <abbr>DST</abbr> ends up impressing a wealthy
|
||||
“Justice”, <em>Veep</em>, season 6, episode 4, HBO, 2017-05-07.
|
||||
Jonah’s inability to understand <abbr>DST</abbr> ends up impressing a wealthy
|
||||
backer who sets him up for a 2020 presidential run.
|
||||
</li>
|
||||
</ul>
|
||||
@@ -197,8 +214,8 @@ reading a paper.
|
||||
Available versions include
|
||||
<a href="https://www.gutenberg.org/ebooks/103">an English
|
||||
translation</a>, and
|
||||
<a href="https://fourmilab.ch/etexts/www/tdm80j">the original French</a>
|
||||
"with illustrations from the original 1873 French-language edition".
|
||||
<a href="https://fourmilab.ch/etexts/www/tdm80j/">the original French</a>
|
||||
“with illustrations from the original 1873 French-language edition”.
|
||||
</li>
|
||||
<li>
|
||||
Nick Enright, <em>Daylight Saving</em>, 1989.
|
||||
@@ -208,24 +225,24 @@ A fast-paced comedy about love and loneliness as the clocks turn back.
|
||||
Umberto Eco,
|
||||
<a href="https://en.wikipedia.org/wiki/The_Island_of_the_Day_Before"><em>The
|
||||
Island of the Day Before</em></a>
|
||||
(<em>L'isola del giorno prima</em>), 1994.
|
||||
"...the story of a 17th century Italian nobleman trapped near an island
|
||||
(<em>L’isola del giorno prima</em>), 1994.
|
||||
“...the story of a 17th century Italian nobleman trapped near an island
|
||||
on the International Date Line. Time and time zones play an integral
|
||||
part in the novel." (Paul Eggert, 2006-04-22)
|
||||
part in the novel.” (Paul Eggert, 2006-04-22)
|
||||
</li>
|
||||
<li>
|
||||
John Dunning, <a
|
||||
href="https://www.simonandschuster.com/books/Two-OClock-Eastern-Wartime/John-Dunning/9781439171530"><em>Two
|
||||
O'Clock, Eastern Wartime</em></a>, 2001.
|
||||
O’Clock, Eastern Wartime</em></a>, 2001.
|
||||
Mystery, history, daylight saving time, and old-time radio.
|
||||
</li>
|
||||
<li>
|
||||
Surrealist artist Guy Billout's work "Date Line" appeared on page 103
|
||||
of the 1999-11 <em>Atlantic Monthly</em>.
|
||||
Surrealist artist Guy Billout’s work “Date Line”
|
||||
appeared on page 103 of the 1999-11 <em>Atlantic Monthly</em>.
|
||||
</li>
|
||||
<li>
|
||||
"Gloom, Gloom, Go Away" by Walter Kirn appeared on page 106 of <em>Time</em>
|
||||
magazine's 2002-11-11 issue; among other things, it proposed
|
||||
“Gloom, Gloom, Go Away” by Walter Kirn appeared on page 106 of <em>Time</em>
|
||||
magazine’s 2002-11-11 issue; among other things, it proposed
|
||||
year-round <abbr>DST</abbr> as a way of lessening wintertime despair.
|
||||
</li>
|
||||
<li>
|
||||
@@ -237,20 +254,20 @@ href="https://craphound.com/est/download/"><em>Eastern Standard Tribe</em></a>,
|
||||
<h2>Music</h2>
|
||||
<ul>
|
||||
<li>
|
||||
Recordings of "Save That Time," Russ Long, Serrob Publishing, BMI:
|
||||
Recordings of “Save That Time”, Russ Long, Serrob Publishing, BMI:
|
||||
<ul>
|
||||
<li>
|
||||
Karrin Allyson, <em>I Didn't Know About You</em> (1993), track 11, 3:44.
|
||||
Karrin Allyson, <em>I Didn’t Know About You</em> (1993), track 11, 3:44.
|
||||
Concord Jazz CCD-4543.
|
||||
Karrin Allyson, vocal;
|
||||
Russ Long, piano;
|
||||
Gerald Spaits, bass;
|
||||
Todd Strait, drums.
|
||||
CD notes "additional lyric by Karrin Allyson;
|
||||
arranged by Russ Long and Karrin Allyson".
|
||||
ADO ★,
|
||||
CD notes “additional lyric by Karrin Allyson;
|
||||
arranged by Russ Long and Karrin Allyson”.
|
||||
ADO ★,
|
||||
<a href="https://www.allmusic.com/album/i-didnt-know-about-you-mw0000618657">AMG</a>
|
||||
★★★★, Penguin ★★★⯪.
|
||||
★★★★, Penguin ★★★⯪.
|
||||
</li>
|
||||
<li>
|
||||
Kevin Mahogany, <em>Double Rainbow</em> (1993), track 3, 6:27. Enja ENJ-7097 2.
|
||||
@@ -259,18 +276,18 @@ Kenny Barron, piano;
|
||||
Ray Drummond, bass;
|
||||
Ralph Moore, tenor saxophone;
|
||||
Lewis Nash, drums.
|
||||
ADO ★⯪,
|
||||
ADO ★⯪,
|
||||
<a href="https://www.allmusic.com/album/double-rainbow-mw0000620371">AMG</a>
|
||||
★★★, Penguin ★★★.
|
||||
★★★, Penguin ★★★.
|
||||
</li>
|
||||
<li>
|
||||
Joe Williams, <em>Here's to Life</em> (1994), track 7, 3:58.
|
||||
Joe Williams, <em>Here’s to Life</em> (1994), track 7, 3:58.
|
||||
Telarc Jazz CD-83357.
|
||||
Joe Williams, vocal; The Robert Farnon [39 piece] Orchestra.
|
||||
Also in a 3-CD package "Triple Play", Telarc CD-83461.
|
||||
ADO •,
|
||||
Also in a 3-CD package “Triple Play”, Telarc CD-83461.
|
||||
ADO •,
|
||||
<a href="https://www.allmusic.com/album/heres-to-life-mw0000623648">AMG</a>
|
||||
★★, Penguin ★★★.
|
||||
★★, Penguin ★★★.
|
||||
</li>
|
||||
<li>
|
||||
Charles Fambrough, <em>Keeper of the Spirit</em> (1995), track 7, 7:07.
|
||||
@@ -280,9 +297,9 @@ Joel Levine, tenor recorder;
|
||||
Edward Simon, piano;
|
||||
Lenny White, drums;
|
||||
Marion Simon, percussion.
|
||||
ADO ★,
|
||||
ADO ★,
|
||||
<a href="https://www.allmusic.com/album/keeper-of-the-spirit-mw0000176559">AMG</a>
|
||||
unrated, Penguin ★★★.
|
||||
unrated, Penguin ★★★.
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
@@ -290,11 +307,11 @@ Holly Cole Trio, Blame It On My Youth (1992). Manhattan CDP 7 97349 2, 37:45.
|
||||
Holly Cole, voice;
|
||||
Aaron Davis, piano;
|
||||
David Piltch, string bass.
|
||||
Lyrical reference to "Eastern Standard Time" in
|
||||
Tom Waits's "Purple Avenue".
|
||||
ADO ★★⯪,
|
||||
Lyrical reference to “Eastern Standard Time” in
|
||||
Tom Waits’s “Purple Avenue”.
|
||||
ADO ★★⯪,
|
||||
<a href="https://www.allmusic.com/album/blame-it-on-my-youth-mw0000274303">AMG</a>
|
||||
★★★, Penguin unrated.
|
||||
★★★, Penguin unrated.
|
||||
</li>
|
||||
<li>
|
||||
Milt Hinton,
|
||||
@@ -314,15 +331,15 @@ drums;
|
||||
Lionel Hampton, vibraphone;
|
||||
Cab Calloway, Joe Williams, vocal;
|
||||
Buck Clayton, arrangements.
|
||||
Tunes include "Old Man Time", "Time After Time",
|
||||
"Sometimes I'm Happy",
|
||||
"A Hot Time in the Old Town Tonight",
|
||||
"Four or Five Times", "Now's the Time",
|
||||
"Time on My Hands", "This Time It's Us",
|
||||
and "Good Time Charlie".
|
||||
ADO ★★★,
|
||||
Tunes include “Old Man Time”, “Time After Time”,
|
||||
“Sometimes I’m Happy”,
|
||||
“A Hot Time in the Old Town Tonight”,
|
||||
“Four or Five Times”, “Now’s the Time”,
|
||||
“Time on My Hands”, “This Time It’s Us”,
|
||||
and “Good Time Charlie”.
|
||||
ADO ★★★,
|
||||
<a href="https://www.allmusic.com/album/old-man-time-mw0000269353">AMG</a>
|
||||
★★★★⯪, Penguin ★★★.
|
||||
★★★★⯪, Penguin ★★★.
|
||||
</li>
|
||||
<li>
|
||||
Alan Broadbent, <em>Pacific Standard Time</em> (1995).
|
||||
@@ -331,9 +348,9 @@ Alan Broadbent, piano;
|
||||
Putter Smith, Bass;
|
||||
Frank Gibson, Jr., drums.
|
||||
The CD cover features an analemma for equation-of-time fans.
|
||||
ADO ★,
|
||||
ADO ★,
|
||||
<a href="https://www.allmusic.com/album/pacific-standard-time-mw0000645433">AMG</a>
|
||||
★★★★, Penguin ★★★⯪.
|
||||
★★★★, Penguin ★★★⯪.
|
||||
</li>
|
||||
<li>
|
||||
Anthony Braxton/Richard Teitelbaum, <em>Silence/Time Zones</em> (1996).
|
||||
@@ -343,88 +360,89 @@ contrebasse clarinet, miscellaneous instruments;
|
||||
Leo Smith, trumpet and miscellaneous instruments;
|
||||
Leroy Jenkins, violin and miscellaneous instruments;
|
||||
Richard Teitelbaum, modular moog and micromoog synthesizer.
|
||||
ADO •,
|
||||
ADO •,
|
||||
<a href="https://www.allmusic.com/album/silence-time-zones-mw0000595735">AMG</a>
|
||||
★★★★.
|
||||
★★★★.
|
||||
</li>
|
||||
<li>
|
||||
Charles Gayle, <em>Time Zones</em> (2006). Tompkins Square TSQ2839, 49:06.
|
||||
Charles Gayle, piano.
|
||||
ADO ★,
|
||||
ADO ★,
|
||||
<a href="https://www.allmusic.com/album/time-zones-mw0000349642">AMG</a>
|
||||
★★★★⯪.
|
||||
★★★★⯪.
|
||||
</li>
|
||||
<li>
|
||||
The Get Up Kids, <em>Eudora</em> (2001). Vagrant 357, 65:12.
|
||||
Includes the song "Central Standard Time."
|
||||
Includes the song “Central Standard Time”.
|
||||
Thanks to Colin Bowern for this information.
|
||||
<a href="https://www.allmusic.com/album/eudora-mw0000592063">AMG</a>
|
||||
★★⯪.
|
||||
★★⯪.
|
||||
</li>
|
||||
<li>
|
||||
Coldplay, "Clocks" (2003).
|
||||
Coldplay, “Clocks” (2003).
|
||||
Capitol 52608, 4:13.
|
||||
Won the 2004 Record of the Year honor at the
|
||||
Grammy Awards. Co-written and performed by Chris Martin,
|
||||
great-great-grandson of <abbr>DST</abbr> inventor William Willett.
|
||||
The song's first line is "Lights go out and I can't be saved".
|
||||
The song’s first line is “Lights go out and I can’t be saved”.
|
||||
</li>
|
||||
<li>
|
||||
Jaime Guevara, "<a
|
||||
href="https://www.youtube.com/watch?v=ZfN4Fe_A50U">Qué
|
||||
hora es</a>" (1993), 3:04.
|
||||
The song protested "Sixto Hour" in Ecuador
|
||||
(1992–3). Its lyrics include "Amanecía en mitad de la noche, los
|
||||
guaguas iban a clase sin sol" ("It was dawning in the middle of the
|
||||
night, the buses went to class without sun").
|
||||
Jaime Guevara, “<a
|
||||
href="https://www.youtube.com/watch?v=ZfN4Fe_A50U">Qué
|
||||
hora es</a>” (1993), 3:04.
|
||||
The song protested “Sixto Hour” in Ecuador
|
||||
(1992–3). Its lyrics include “Amanecía en mitad de la noche, los
|
||||
guaguas iban a clase sin sol” (“It was dawning in the middle of the
|
||||
night, the buses went to class without sun”).
|
||||
</li>
|
||||
<li>
|
||||
Irving Kahal and Harry Richman,
|
||||
"There Ought to be a Moonlight Saving Time" (1931).
|
||||
“There Ought to be a Moonlight Saving Time” (1931).
|
||||
This musical standard was a No. 1 hit for Guy Lombardo
|
||||
in 1931, and was also performed by Maurice Chevalier, Blossom Dearie
|
||||
and many others. The phrase "Moonlight saving time" also appears in
|
||||
the 1995 country song "Not Enough Hours in the Night" written by Aaron
|
||||
and many others. The phrase “Moonlight saving time” also appears in
|
||||
the 1995 country song “Not Enough Hours in the Night” written by Aaron
|
||||
Barker, Kim Williams and Rob Harbin and performed by Doug
|
||||
Supernaw.
|
||||
</li>
|
||||
<li>
|
||||
The Microscopic Septet, <em>Lobster Leaps In</em> (2008).
|
||||
Cuneiform 272, 73:05.
|
||||
Includes the song "Twilight Time Zone."
|
||||
ADO ★★,
|
||||
Includes the song “Twilight Time Zone”.
|
||||
ADO ★★,
|
||||
<a href="https://www.allmusic.com/album/lobster-leaps-in-mw0000794929">AMG</a>
|
||||
★★★⯪.
|
||||
★★★⯪.
|
||||
</li>
|
||||
<li>
|
||||
Bob Dylan, <em>The Times They Are a-Changin'</em> (1964).
|
||||
Bob Dylan, <em>The Times They Are a-Changin’</em> (1964).
|
||||
Columbia CK-8905, 45:36.
|
||||
ADO ★⯪,
|
||||
ADO ★⯪,
|
||||
<a href="https://www.allmusic.com/album/the-times-they-a-changin-mw0000202344">AMG</a>
|
||||
★★★★⯪.
|
||||
The title song is also available on "Bob Dylan's Greatest Hits" and "The Essential Bob Dylan."
|
||||
★★★★⯪.
|
||||
The title song is also available on “Bob Dylan’s Greatest Hits”
|
||||
and “The Essential Bob Dylan”.
|
||||
</li>
|
||||
<li>
|
||||
Luciana Souza, <em>Tide</em> (2009). Universal Jazz France B0012688-02, 42:31.
|
||||
ADO ★★⯪,
|
||||
ADO ★★⯪,
|
||||
<a href="https://www.allmusic.com/album/tide-mw0000815692">AMG</a>
|
||||
★★★⯪.
|
||||
Includes the song "Fire and Wood" with the lyric
|
||||
"The clocks were turned back you remember/Think it's still November."
|
||||
★★★⯪.
|
||||
Includes the song “Fire and Wood” with the lyric
|
||||
“The clocks were turned back you remember/Think it’s still November.”
|
||||
</li>
|
||||
<li>
|
||||
Ken Nordine, <em>You're Getting Better: The Word Jazz Dot Masters</em> (2005).
|
||||
Ken Nordine, <em>You’re Getting Better: The Word Jazz Dot Masters</em> (2005).
|
||||
Geffen B0005171-02, 156:22.
|
||||
ADO ★,
|
||||
ADO ★,
|
||||
<a href="https://www.allmusic.com/album/youre-getting-better-the-word-jazz-dot-masters-mw0000736197">AMG</a>
|
||||
★★★★⯪.
|
||||
Includes the piece "What Time Is It"
|
||||
("He knew what time it was everywhere...that counted").
|
||||
★★★★⯪.
|
||||
Includes the piece “What Time Is It”
|
||||
(“He knew what time it was everywhere...that counted”).
|
||||
</li>
|
||||
<li>
|
||||
Chicago, <em>Chicago Transit Authority</em> (1969). Columbia 64409, 1:16:20.
|
||||
<a href="https://www.allmusic.com/album/chicago-transit-authority-mw0000189364">AMG</a> ★★★★.
|
||||
Includes the song "Does Anybody Really Know What Time It Is?".
|
||||
<a href="https://www.allmusic.com/album/chicago-transit-authority-mw0000189364">AMG</a> ★★★★.
|
||||
Includes the song “Does Anybody Really Know What Time It Is?”.
|
||||
</li>
|
||||
<li>
|
||||
Emanuele Arciuli,
|
||||
@@ -440,27 +458,27 @@ Unlike minimalism, it does not assume that the listener has plenty of time.
|
||||
<ul>
|
||||
<li>
|
||||
The webcomic <em>xkcd</em> has the strips
|
||||
"<a href="https://xkcd.com/673/">The Sun</a>" (2009-12-09),
|
||||
"<a href="https://xkcd.com/1655/">Doomsday Clock</a>" (2016-03-14) and
|
||||
"<a href="https://xkcd.com/2549/">Edge Cake</a>" (2021-12-01),
|
||||
“<a href="https://xkcd.com/673/">The Sun</a>” (2009-12-09),
|
||||
“<a href="https://xkcd.com/1655/">Doomsday Clock</a>” (2016-03-14) and
|
||||
“<a href="https://xkcd.com/2549/">Edge Cake</a>” (2021-12-01),
|
||||
along with the panels
|
||||
"<a href="https://xkcd.com/448/">Good Morning</a>" (2008-07-11),
|
||||
"<a href="https://xkcd.com/1017/">Backward in Time</a>" (2012-02-14),
|
||||
"<a href="https://xkcd.com/1061/">EST</a>" (2012-05-28),
|
||||
"<a href="https://xkcd.com/1179/">ISO 8601</a>" (2013-02-27),
|
||||
"<a href="https://xkcd.com/1335/">Now</a>" (2014-02-26),
|
||||
"<a href="https://xkcd.com/1799/">Bad Map Projection: Time Zones</a>"
|
||||
“<a href="https://xkcd.com/448/">Good Morning</a>” (2008-07-11),
|
||||
“<a href="https://xkcd.com/1017/">Backward in Time</a>” (2012-02-14),
|
||||
“<a href="https://xkcd.com/1061/">EST</a>” (2012-05-28),
|
||||
“<a href="https://xkcd.com/1179/">ISO 8601</a>” (2013-02-27),
|
||||
“<a href="https://xkcd.com/1335/">Now</a>” (2014-02-26),
|
||||
“<a href="https://xkcd.com/1799/">Bad Map Projection: Time Zones</a>”
|
||||
(2017-02-15),
|
||||
"<a href="https://xkcd.com/1883/">Supervillain Plan</a>" (2017-08-30),
|
||||
"<a href="https://xkcd.com/2050/">6/6 Time</a>" (2018-09-24),
|
||||
"<a href="https://xkcd.com/2092/">Consensus New Year</a>" (2018-12-31),
|
||||
"<a href="https://xkcd.com/2266/">Leap Smearing</a>" (2020-02-10),
|
||||
"<a href="https://xkcd.com/2594/">Consensus Time</a>" (2022-03-16),
|
||||
"<a href="https://xkcd.com/2846/">Daylight Saving Choice</a>" (2023-10-25),
|
||||
"<a href="https://xkcd.com/2854/">Date Line</a>" (2023-11-13),
|
||||
and "<a href="https://xkcd.com/2867/">DateTime</a>" (2023-12-13).
|
||||
“<a href="https://xkcd.com/1883/">Supervillain Plan</a>” (2017-08-30),
|
||||
“<a href="https://xkcd.com/2050/">6/6 Time</a>” (2018-09-24),
|
||||
“<a href="https://xkcd.com/2092/">Consensus New Year</a>” (2018-12-31),
|
||||
“<a href="https://xkcd.com/2266/">Leap Smearing</a>” (2020-02-10),
|
||||
“<a href="https://xkcd.com/2594/">Consensus Time</a>” (2022-03-16),
|
||||
“<a href="https://xkcd.com/2846/">Daylight Saving Choice</a>” (2023-10-25),
|
||||
“<a href="https://xkcd.com/2854/">Date Line</a>” (2023-11-13),
|
||||
and “<a href="https://xkcd.com/2867/">DateTime</a>” (2023-12-13).
|
||||
The related book <em>What If?</em> has an entry
|
||||
"<a href="https://what-if.xkcd.com/26/">Leap Seconds</a>" (2012-12-31).
|
||||
“<a href="https://what-if.xkcd.com/26/">Leap Seconds</a>” (2012-12-31).
|
||||
</li>
|
||||
<li>
|
||||
Pig kills time in <a
|
||||
@@ -480,112 +498,116 @@ Caulfield proposes changing clocks just once a year in
|
||||
(the same day)</a>.
|
||||
</li>
|
||||
<li>
|
||||
Peppermint Patty: "What if the world comes to an end tonight, Marcie?"
|
||||
Peppermint Patty: “What if the world comes to an end tonight, Marcie?”
|
||||
<br>
|
||||
Marcie: "I promise there'll be a tomorrow, sir ... in fact,
|
||||
it's already tomorrow in Australia!"
|
||||
Marcie: “I promise there’ll be a tomorrow, sir ... in fact,
|
||||
it’s already tomorrow in Australia!”
|
||||
<br>
|
||||
(Charles M. Schulz, <a href="https://www.gocomics.com/peanuts/1980/06/13"><em>Peanuts</em>, 1980-06-13</a>)
|
||||
(Charles M. Schulz,
|
||||
<a href="https://www.gocomics.com/peanuts/1980/06/13"><em>Peanuts</em>,
|
||||
1980-06-13</a>)
|
||||
</li>
|
||||
</ul>
|
||||
<h2>Jokes</h2>
|
||||
<ul>
|
||||
<li>
|
||||
The idea behind daylight saving time was first proposed as a joke by
|
||||
Benjamin Franklin. To enforce it, he suggested, "Every
|
||||
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ûte</em>."
|
||||
<a href="http://www.webexhibits.org/daylightsaving/franklin3.html">Franklin's
|
||||
natural and easy as the present irregularity; for, <em>ce n’est que le
|
||||
premier pas qui coûte</em>.”
|
||||
<a href="https://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.
|
||||
Now that's pretty near 100 years, daylight saving."
|
||||
“We’ve been using the five-cent nickel in this country since 1492.
|
||||
Now that’s pretty near 100 years, daylight saving.”
|
||||
(Groucho Marx as Captain Spaulding in <em>Animal Crackers</em>, 1930,
|
||||
as noted by Will Fitzgerald)
|
||||
</li>
|
||||
<li>
|
||||
BRADY. ...[Bishop Usher] determined that the Lord began the Creation
|
||||
on the 23rd of October in the Year 4,004 B.C. at – uh, 9 A.M.!
|
||||
on the 23rd of October in the Year 4,004 B.C. at – uh, 9 A.M.!
|
||||
<br>
|
||||
DRUMMOND. That Eastern Standard Time? (<em>Laughter.</em>) Or Rocky Mountain
|
||||
Time? (<em>More laughter.</em>) It wasn't daylight-saving time, was it? Because
|
||||
the Lord didn't make the sun until the fourth day!
|
||||
Time? (<em>More laughter.</em>) It wasn’t daylight-saving time, was it? Because
|
||||
the Lord didn’t make the sun until the fourth day!
|
||||
<br>
|
||||
(From the play <em>Inherit the Wind</em> by Jerome Lawrence and Robert E. Lee,
|
||||
filmed in 1960 with Spencer Tracy as Drummond and Fredric March as
|
||||
Brady, and several other times. Thanks to Mark Brader.)
|
||||
</li>
|
||||
<li>
|
||||
"Good news."
|
||||
"What did they do? Extend Daylight Saving Time year round?"
|
||||
“Good news.”
|
||||
“What did they do? Extend Daylight Saving Time year round?”
|
||||
(Professional tanner George Hamilton, in dialog from a
|
||||
May, 1999 episode of the syndicated television series <em>Baywatch</em>)
|
||||
</li>
|
||||
<li>
|
||||
"A fundamental belief held by Americans is that if you are on land, you
|
||||
“A fundamental belief held by Americans is that if you are on land, you
|
||||
cannot be killed by a fish...So most Americans remain on land, believing
|
||||
they're safe. Unfortunately, this belief – like so many myths, such as that
|
||||
there's a reason for 'Daylight Saving Time' – is false."
|
||||
they’re safe. Unfortunately, this belief – like so many myths, such as that
|
||||
there’s a reason for ‘Daylight Saving Time’ – is false.”
|
||||
(Dave Barry column, 2000-07-02)
|
||||
</li>
|
||||
<li>
|
||||
"I once had sex for an hour and five minutes, but that was on the day
|
||||
when you turn the clocks ahead."
|
||||
“I once had sex for an hour and five minutes, but that was on the day
|
||||
when you turn the clocks ahead.”
|
||||
(Garry Shandling, 52nd Annual Emmys, 2000-09-10)
|
||||
</li>
|
||||
<li>
|
||||
"Would it impress you if I told you I invented Daylight Savings Time?"
|
||||
("Sahjhan" to "Lilah" in dialog from the "Loyalty" episode of <em>Angel</em>,
|
||||
“Would it impress you if I told you I invented Daylight Savings Time?”
|
||||
(“Sahjhan” to “Lilah” in dialog from the “Loyalty” episode of <em>Angel</em>,
|
||||
originally aired 2002-02-25)
|
||||
</li>
|
||||
<li>
|
||||
"I thought you said Tulsa was a three-hour flight."
|
||||
"Well, you're forgetting about the time difference."
|
||||
("Joey" and "Chandler" in dialog from the episode of <em>Friends</em>
|
||||
entitled "The One With Rachel's Phone Number," originally aired 2002-12-05)
|
||||
“I thought you said Tulsa was a three-hour flight.”
|
||||
“Well, you’re forgetting about the time difference.”
|
||||
(“Joey” and “Chandler” in dialog from the
|
||||
episode of <em>Friends</em> entitled “The One With
|
||||
Rachel’s Phone Number”, originally aired 2002-12-05)
|
||||
</li>
|
||||
<li>
|
||||
"Is that a pertinent fact,
|
||||
or are you just trying to dazzle me with your command of time zones?"
|
||||
(Kelsey Grammer as "Frasier Crane" to "Roz" from the episode of <em>Frasier</em>
|
||||
entitled "The Kid," originally aired 1997-11-04)
|
||||
“Is that a pertinent fact,
|
||||
or are you just trying to dazzle me with your command of time zones?”
|
||||
(Kelsey Grammer as “Frasier Crane” to “Roz”
|
||||
from the episode of <em>Frasier</em> entitled “The Kid”,
|
||||
originally aired 1997-11-04)
|
||||
</li>
|
||||
<li>
|
||||
"I put myself and my staff through this crazy, huge ordeal, all because
|
||||
“I put myself and my staff through this crazy, huge ordeal, all because
|
||||
I refused to go on at midnight, okay? And so I work, you know, and
|
||||
then I get this job at eleven, supposed to be a big deal. Then
|
||||
yesterday daylight [saving] time ended. Right now it's basically
|
||||
midnight." (Conan O'Brien on the 2010-11-08 premiere of <em>Conan</em>)
|
||||
yesterday daylight [saving] time ended. Right now it’s basically midnight.”
|
||||
(Conan O’Brien on the 2010-11-08 premiere of <em>Conan</em>)
|
||||
</li>
|
||||
<li>
|
||||
"The best method, I told folks, was to hang a large clock high on a
|
||||
“The best method, I told folks, was to hang a large clock high on a
|
||||
barn wall where all the cows could see it. If you have Holsteins, you
|
||||
will need to use an analog clock." (Jerry Nelson, <a
|
||||
href="http://www.agriculture.com/family/farm-humor/how-to-adjust-dairy-cows-to-daylight-savings-time">How
|
||||
to adjust dairy cows to daylight saving time</a>", <em>Successful Farming</em>,
|
||||
2017-10-09)
|
||||
will need to use an analog clock.” (Jerry Nelson, “<a
|
||||
href="https://www.agriculture.com/family/farm-humor/how-to-adjust-dairy-cows-to-daylight-savings-time">How
|
||||
to adjust dairy cows to daylight saving time</a>”,
|
||||
<em>Successful Farming</em>, 2017-10-09)
|
||||
</li>
|
||||
<li>
|
||||
"And now, driving to California, I find that I must enter a password
|
||||
“And now, driving to California, I find that I must enter a password
|
||||
in order to change the time zone on my laptop clock. Evidently,
|
||||
someone is out to mess up my schedule and my clock must be secured."
|
||||
someone is out to mess up my schedule and my clock must be secured.”
|
||||
(Garrison Keillor,
|
||||
"<a href="http://www.garrisonkeillor.com/weve-never-been-here-before/">We've
|
||||
never been here before</a>", 2017-08-22)
|
||||
“<a href="https://www.garrisonkeillor.com/weve-never-been-here-before/">We’ve
|
||||
never been here before</a>”, 2017-08-22)
|
||||
</li>
|
||||
<li>
|
||||
"Well, in my time zone that's all the time I have,
|
||||
but maybe in your time zone I haven't finished yet. So stay tuned!"
|
||||
(Goldie Hawn, <em>Rowan & Martin's Laugh-In</em> No. 65, 1970-03-09)
|
||||
“Well, in my time zone that’s all the time I have,
|
||||
but maybe in your time zone I haven’t finished yet. So stay tuned!”
|
||||
(Goldie Hawn, <em>Rowan & Martin’s Laugh-In</em> No. 65, 1970-03-09)
|
||||
</li>
|
||||
</ul>
|
||||
<h2>See also</h2>
|
||||
@@ -593,13 +615,16 @@ but maybe in your time zone I haven't finished yet. So stay tuned!"
|
||||
<li><a href="tz-link.html">Time Zone and Daylight Saving
|
||||
Time Data</a></li>
|
||||
</ul>
|
||||
|
||||
<footer>
|
||||
<hr>
|
||||
<address>
|
||||
This web page is in the public domain, so clarified as of
|
||||
2009-05-17 by Arthur David Olson.
|
||||
<br>
|
||||
Please send corrections to this web page to the
|
||||
<a href="mailto:tz@iana.org">time zone mailing list</a>.
|
||||
</address>
|
||||
The mailing list and its archives are public,
|
||||
so please do not send confidential information.
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
+102
-148
@@ -3,14 +3,15 @@
|
||||
<head>
|
||||
<title>How to Read the tz Database</title>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<style>
|
||||
pre {margin-left: 2em; white-space: pre-wrap;}
|
||||
pre.td {margin-left: 0;}
|
||||
pre {margin-left: 1.3rem; overflow: auto;}
|
||||
td {text-align: center;}
|
||||
table {border: 1px outset;}
|
||||
th, td {border: 1px inset;}
|
||||
table.rule {border: none; margin: auto;}
|
||||
td.footnote {text-align: left;}
|
||||
ul {padding-left: 1.3rem;}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
@@ -23,31 +24,22 @@ times of day from the <a href="tz-link.html">tz database</a>
|
||||
source files. It might be helpful, but not absolutely necessary,
|
||||
for the reader to have already downloaded the
|
||||
latest release of the database and become familiar with the basic layout
|
||||
of the data files. The format is explained in the “man
|
||||
page” for the zic compiler, <code>zic.8.txt</code>, in
|
||||
of the data files. The format is explained in the “man page”
|
||||
for the zic compiler, <code>zic.8.txt</code>, in
|
||||
the <code>code</code> subdirectory.
|
||||
Although this guide covers many of the common cases, it is not a
|
||||
complete summary of what zic accepts; the man page is the
|
||||
authoritative reference.</p>
|
||||
|
||||
<p>We’ll begin by talking about the rules for changing between standard
|
||||
and daylight saving time since we’ll need that information when we talk
|
||||
<p>We’ll begin by talking about the rules for changing between standard
|
||||
and daylight saving time since we’ll need that information when we talk
|
||||
about the zones.</p>
|
||||
|
||||
<p>First, let’s consider the special daylight saving time rules
|
||||
<p>First, let’s consider the special daylight saving time rules
|
||||
for Chicago (from the <code>northamerica</code> file in
|
||||
the <code>data</code> subdirectory):</p>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th colspan="6">From the Source File</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="6">
|
||||
<table class="rule">
|
||||
<tr><td style="border:none;text-align:left">
|
||||
<pre class="td">
|
||||
#Rule NAME FROM TO - IN ON AT SAVE LETTER
|
||||
<pre>#Rule NAME FROM TO - IN ON AT SAVE LETTER
|
||||
Rule Chicago 1920 only - Jun 13 2:00 1:00 D
|
||||
Rule Chicago 1920 1921 - Oct lastSun 2:00 0 S
|
||||
Rule Chicago 1921 only - Mar lastSun 2:00 1:00 D
|
||||
@@ -55,8 +47,7 @@ Rule Chicago 1922 1966 - Apr lastSun 2:00 1:00 D
|
||||
Rule Chicago 1922 1954 - Sep lastSun 2:00 0 S
|
||||
Rule Chicago 1955 1966 - Oct lastSun 2:00 0 S
|
||||
</pre>
|
||||
</td></tr></table></td>
|
||||
</tr>
|
||||
<table>
|
||||
<tr>
|
||||
<th colspan="6">Reformatted a Bit</th>
|
||||
</tr>
|
||||
@@ -107,7 +98,7 @@ first and last calendar years defining a contiguous range over which a specific
|
||||
Rule line is to apply. The keyword <code>only</code> can be used in the
|
||||
<code>TO</code> field to repeat the value of the <code>FROM</code> field in the
|
||||
event that a rule should only apply to a single year. Often, the keyword
|
||||
<code>max</code> is used to extend a rule’s application into the
|
||||
<code>max</code> is used to extend a rule’s application into the
|
||||
indefinite future; it is a platform-agnostic stand-in for the largest
|
||||
representable year.
|
||||
|
||||
@@ -117,28 +108,28 @@ Prior to the 2020b release, it was called the <code>TYPE</code> field, though
|
||||
it had not been used in the main data since the 2000e release.
|
||||
An obsolescent supplementary file used the
|
||||
field as a proof-of-concept to allow <code>zic</code> to apply a given Rule
|
||||
line only to certain “types” of years within the specified range as
|
||||
line only to certain “types” of years within the specified range as
|
||||
dictated by the output of a separate script, such as: only years which would
|
||||
have a US presidential election, or only years which wouldn’t.
|
||||
have a US presidential election, or only years which wouldn’t.
|
||||
|
||||
<p>The <code>SAVE</code> column contains the local (wall clock) offset from
|
||||
local standard time.
|
||||
This is usually either zero for standard time or one hour for daylight
|
||||
saving time; but there’s no reason, in principle, why it can’t
|
||||
saving time; but there’s no reason, in principle, why it can’t
|
||||
take on other values.
|
||||
|
||||
<p>The <code>LETTER</code> (sometimes called <code>LETTER/S</code>)
|
||||
column can contain a variable
|
||||
part of the usual abbreviation of the time zone’s name, or it can just
|
||||
be a hyphen if there’s no variable part. For example, the abbreviation
|
||||
used in the central time zone will be either “CST” or
|
||||
“CDT”. The variable part is ‘S’ or ‘D’;
|
||||
and, sure enough, that’s just what we find in
|
||||
part of the usual abbreviation of the time zone’s name, or it can just
|
||||
be a hyphen if there’s no variable part. For example, the abbreviation
|
||||
used in the central time zone will be either “CST” or “CDT”.
|
||||
The variable part is ‘S’ or ‘D’;
|
||||
and, sure enough, that’s just what we find in
|
||||
the <code>LETTER</code> column
|
||||
in the <code>Chicago</code> rules. More about this when we talk about
|
||||
“Zone” lines.
|
||||
“Zone” lines.
|
||||
|
||||
<p>One important thing to notice is that “Rule” lines
|
||||
<p>One important thing to notice is that “Rule” lines
|
||||
want at once to be both <i>transitions</i> and <i>steady states</i>:
|
||||
<ul>
|
||||
<li>On the one hand, they represent transitions between standard and
|
||||
@@ -158,18 +149,9 @@ years. Similarly, the rule for changing to daylight saving time was
|
||||
the same from 1922 to 1966; but the rule for returning to standard
|
||||
time changed in 1955. Got it?</p>
|
||||
|
||||
<p>OK, now for the somewhat more interesting “US” rules:</p>
|
||||
<p>OK, now for the somewhat more interesting “US” rules:</p>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th colspan="6">From the Source File</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="6">
|
||||
<table class="rule">
|
||||
<tr><td style="border:none;text-align:left">
|
||||
<pre class="td">
|
||||
#Rule NAME FROM TO - IN ON AT SAVE LETTER/S
|
||||
<pre>#Rule NAME FROM TO - IN ON AT SAVE LETTER/S
|
||||
Rule US 1918 1919 - Mar lastSun 2:00 1:00 D
|
||||
Rule US 1918 1919 - Oct lastSun 2:00 0 S
|
||||
Rule US 1942 only - Feb 9 2:00 1:00 W # War
|
||||
@@ -184,8 +166,7 @@ Rule US 1987 2006 - Apr Sun>=1 2:00 1:00 D
|
||||
Rule US 2007 max - Mar Sun>=8 2:00 1:00 D
|
||||
Rule US 2007 max - Nov Sun>=1 2:00 0 S
|
||||
</pre>
|
||||
</td></tr></table></td>
|
||||
</tr>
|
||||
<table>
|
||||
<tr>
|
||||
<th colspan="6">Reformatted a Bit</th>
|
||||
</tr>
|
||||
@@ -211,15 +192,15 @@ Rule US 2007 max - Nov Sun>=1 2:00 0 S
|
||||
<tr>
|
||||
<td colspan="2">1942 only</td>
|
||||
<td colspan="2">February 9<small><sup>th</sup></small></td>
|
||||
<td>go to “war time”</td>
|
||||
<td>go to “war time”</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" rowspan="2">1945 only</td>
|
||||
<td colspan="2">August 14<small><sup>th</sup></small></td>
|
||||
<td>23:00 <a href="https://en.wikipedia.org/wiki/Universal_Time">UT</a></td>
|
||||
<td>
|
||||
rename “war time” to “peace<br>time;”
|
||||
clocks don’t change
|
||||
rename “war time” to “peace<br>time;”
|
||||
clocks don’t change
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -272,33 +253,33 @@ Rule US 2007 max - Nov Sun>=1 2:00 0 S
|
||||
|
||||
<p>First, the time that something happens (in the <code>AT</code>
|
||||
column) is not necessarily the local (wall clock) time. The time can be
|
||||
suffixed with ‘s’ (for “standard”) to mean
|
||||
suffixed with ‘s’ (for “standard”) to mean
|
||||
local standard time, different from local (wall clock) time when observing
|
||||
daylight saving time; or it can be suffixed with ‘g’,
|
||||
‘u’, or ‘z’, all three of which mean the
|
||||
daylight saving time; or it can be suffixed with ‘g’,
|
||||
‘u’, or ‘z’, all three of which mean the
|
||||
standard time at the
|
||||
<a href="https://en.wikipedia.org/wiki/Prime_Meridian">prime meridian</a>.
|
||||
‘g’ stands for “<a
|
||||
href="https://en.wikipedia.org/wiki/Greenwich_Mean_Time">GMT</a>”;
|
||||
‘u’ stands for “<a
|
||||
href="https://en.wikipedia.org/wiki/Universal_Time">UT</a>” or “<a
|
||||
href="https://en.wikipedia.org/wiki/Coordinated_Universal_Time">UTC</a>”
|
||||
(whichever was official at the time); ‘z’ stands for the
|
||||
‘g’ stands for “<a
|
||||
href="https://en.wikipedia.org/wiki/Greenwich_Mean_Time">GMT</a>”;
|
||||
‘u’ stands for “<a
|
||||
href="https://en.wikipedia.org/wiki/Universal_Time">UT</a>” or “<a
|
||||
href="https://en.wikipedia.org/wiki/Coordinated_Universal_Time">UTC</a>”
|
||||
(whichever was official at the time); ‘z’ stands for the
|
||||
<a href="https://en.wikipedia.org/wiki/Nautical_time">nautical time zone</a>
|
||||
Z (a.k.a. “Zulu” which, in turn, stands for ‘Z’).
|
||||
The time can also be suffixed with ‘w’ meaning local (wall
|
||||
clock) time; but it usually isn’t because that’s the
|
||||
Z (a.k.a. “Zulu” which, in turn, stands for ‘Z’).
|
||||
The time can also be suffixed with ‘w’ meaning local (wall
|
||||
clock) time; but it usually isn’t because that’s the
|
||||
default.</p>
|
||||
|
||||
<p>Second, the day in the <code>ON</code> column, in addition to
|
||||
“<code>lastSun</code>” or a particular day of the month,
|
||||
can have the form, “<code>Sun>=</code><i>x</i>” or
|
||||
“<code>Sun<=</code><i>x</i>,” where <i>x</i> is a day
|
||||
of the month. For example, “<code>Sun>=8</code>” means
|
||||
“the first Sunday on or after the eighth of the month,” in
|
||||
“<code>lastSun</code>” or a particular day of the month,
|
||||
can have the form, “<code>Sun>=</code><i>x</i>” or
|
||||
“<code>Sun<=</code><i>x</i>,” where <i>x</i> is a day
|
||||
of the month. For example, “<code>Sun>=8</code>” means
|
||||
“the first Sunday on or after the eighth of the month,” in
|
||||
other words, the second Sunday of the month. Furthermore, although
|
||||
there are no examples above, the weekday needn’t be
|
||||
“<code>Sun</code>” in either form, but can be the usual
|
||||
there are no examples above, the weekday needn’t be
|
||||
“<code>Sun</code>” in either form, but can be the usual
|
||||
three-character English abbreviation for any day of the week.</p>
|
||||
|
||||
<p>And the US rules give us more examples of a couple of things
|
||||
@@ -317,8 +298,8 @@ state or other more local rule).</li>
|
||||
|
||||
<li>The <code>SAVE</code> and <code>LETTER</code> columns
|
||||
contain <i>steady state</i>, not transitions. Consider, for example,
|
||||
the transition from “war time” to “peace time”
|
||||
that happened on August 14, 1945. The “1:00” in
|
||||
the transition from “war time” to “peace time”
|
||||
that happened on August 14, 1945. The “1:00” in
|
||||
the <code>SAVE</code> column is <i>not</i> an instruction to advance
|
||||
the clock an hour. It means that clocks should <i>be</i> one hour
|
||||
ahead of standard time, which they already are because of the previous
|
||||
@@ -326,17 +307,9 @@ rule, so there should be no change.</li>
|
||||
|
||||
</ul>
|
||||
|
||||
<p>OK, now let’s look at a Zone record:</p>
|
||||
<p>OK, now let’s look at a Zone record:</p>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th colspan="5">From the Source File</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="5">
|
||||
<table class="rule">
|
||||
<tr><td style="border:none;text-align:left">
|
||||
<pre class="td">
|
||||
<pre>
|
||||
#Zone NAME STDOFF RULES FORMAT [UNTIL]
|
||||
Zone America/Chicago -5:50:36 - LMT 1883 Nov 18 12:09:24
|
||||
-6:00 US C%sT 1920
|
||||
@@ -347,8 +320,7 @@ Zone America/Chicago -5:50:36 - LMT 1883 Nov 18 12:09:24
|
||||
-6:00 Chicago C%sT 1967
|
||||
-6:00 US C%sT
|
||||
</pre>
|
||||
</td></tr></table></td>
|
||||
</tr>
|
||||
<table>
|
||||
<tr>
|
||||
<th colspan="5">Columns Renamed</th>
|
||||
</tr>
|
||||
@@ -365,14 +337,14 @@ Zone America/Chicago -5:50:36 - LMT 1883 Nov 18 12:09:24
|
||||
<th>Time</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>−5:50:36</td>
|
||||
<td>−5:50:36</td>
|
||||
<td>not observed</td>
|
||||
<td>LMT</td>
|
||||
<td>1883-11-18</td>
|
||||
<td>12:09:24</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td rowspan="2">−6:00:00</td>
|
||||
<td rowspan="2">−6:00:00</td>
|
||||
<td>US rules</td>
|
||||
<td rowspan="2">CST or CDT</td>
|
||||
<td>1920-01-01</td>
|
||||
@@ -384,13 +356,13 @@ Zone America/Chicago -5:50:36 - LMT 1883 Nov 18 12:09:24
|
||||
<td rowspan="2">02:00:00</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>−5:00:00</td>
|
||||
<td>−5:00:00</td>
|
||||
<td>not observed</td>
|
||||
<td>EST</td>
|
||||
<td>1936-11-15</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td rowspan="4">−6:00:00</td>
|
||||
<td rowspan="4">−6:00:00</td>
|
||||
<td>Chicago rules</td>
|
||||
<td>CST or CDT</td>
|
||||
<td>1942-01-01</td>
|
||||
@@ -408,7 +380,7 @@ Zone America/Chicago -5:50:36 - LMT 1883 Nov 18 12:09:24
|
||||
</tr>
|
||||
<tr>
|
||||
<td>US rules</td>
|
||||
<td colspan="2">—</td>
|
||||
<td colspan="2">–</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
@@ -417,24 +389,24 @@ Zone America/Chicago -5:50:36 - LMT 1883 Nov 18 12:09:24
|
||||
<p>First, and somewhat trivially, whereas Rules are considered to
|
||||
contain one or more records, a Zone is considered to be a single
|
||||
record with zero or more <i>continuation lines</i>. Thus, the keyword,
|
||||
“<code>Zone</code>,” and the zone name are not
|
||||
“<code>Zone</code>,” and the zone name are not
|
||||
repeated. The last line is the one without anything in
|
||||
the <code>[UNTIL]</code> column.</p>
|
||||
|
||||
<p>Second, and more fundamentally, each line of a Zone represents a
|
||||
steady state, not a transition between states. The state exists from
|
||||
the date and time in the previous line’s <code>[UNTIL]</code>
|
||||
the date and time in the previous line’s <code>[UNTIL]</code>
|
||||
column up to the date and time in the current
|
||||
line’s <code>[UNTIL]</code> column. In other words, the date and
|
||||
line’s <code>[UNTIL]</code> column. In other words, the date and
|
||||
time in the <code>[UNTIL]</code> column is the instant that separates
|
||||
this state from the next. Where that would be ambiguous because
|
||||
we’re setting our clocks back, the <code>[UNTIL]</code> column
|
||||
we’re setting our clocks back, the <code>[UNTIL]</code> column
|
||||
specifies the first occurrence of the instant. The state specified by
|
||||
the last line, the one without anything in the <code>[UNTIL]</code>
|
||||
column, continues to the present.</p>
|
||||
|
||||
<p>The first line typically specifies the mean solar time observed
|
||||
before the introduction of standard time. Since there’s no line before
|
||||
before the introduction of standard time. Since there’s no line before
|
||||
that, it has no beginning. <code>8-) </code> For some places near the <a
|
||||
href="https://en.wikipedia.org/wiki/International_Date_Line">International
|
||||
Date Line</a>, the first <i>two</i> lines will show solar times
|
||||
@@ -453,16 +425,16 @@ Alaska was then 24 hours earlier than it had
|
||||
been. <code><aside></code>(6 October in the Julian calendar,
|
||||
which Russia was still using then for religious reasons, was followed
|
||||
by <i>a second instance of the same day with a different name</i>, 18
|
||||
October in the Gregorian calendar. Isn’t civil time
|
||||
October in the Gregorian calendar. Isn’t civil time
|
||||
wonderful? <code>8-)</code>)<code></aside></code></p>
|
||||
|
||||
<p>The abbreviation, “LMT” stands for “local mean
|
||||
time”, which is an invention of
|
||||
<p>The abbreviation, “LMT” stands for “local mean
|
||||
time”, which is an invention of
|
||||
the <a href="https://en.wikipedia.org/wiki/Tz_database">tz
|
||||
database</a> and was probably never actually used during the
|
||||
period. Furthermore, the value is almost certainly wrong except in the
|
||||
archetypal place after which the zone is named. (The tz database
|
||||
usually doesn’t provide a separate Zone record for places where
|
||||
usually doesn’t provide a separate Zone record for places where
|
||||
nothing significant happened after 1970.)</p>
|
||||
|
||||
<p>The <code>RULES</code> column tells us whether daylight saving time is being observed:
|
||||
@@ -470,7 +442,7 @@ nothing significant happened after 1970.)</p>
|
||||
<li>A hyphen, a kind of null value, means that we have not set our
|
||||
clocks ahead of standard time.</li>
|
||||
|
||||
<li>An amount of time (usually but not necessarily “1:00”
|
||||
<li>An amount of time (usually but not necessarily “1:00”
|
||||
meaning one hour) means that we have set our clocks ahead by that
|
||||
amount.</li>
|
||||
|
||||
@@ -488,10 +460,10 @@ Zone Pacific/Honolulu ... 1933 Apr 30 2:00
|
||||
</pre>
|
||||
|
||||
<p>Hawaii tried daylight saving time for three weeks in 1933 and
|
||||
decided they didn’t like it. <code>8-) </code>Note that
|
||||
decided they didn’t like it. <code>8-) </code>Note that
|
||||
the <code>STDOFF</code> column always contains the standard time
|
||||
offset, so the local (wall clock) time during this period was GMT −
|
||||
10:30 + 1:00 = GMT − 9:30.</p>
|
||||
offset, so the local (wall clock) time during this period was GMT −
|
||||
10:30 + 1:00 = GMT − 9:30.</p>
|
||||
|
||||
<p>The <code>FORMAT</code> column specifies the usual abbreviation of
|
||||
the time zone name. It should have one of four forms:</p>
|
||||
@@ -499,24 +471,24 @@ the time zone name. It should have one of four forms:</p>
|
||||
|
||||
<li>a time zone abbreviation that is a string of three or more
|
||||
characters that are either ASCII alphanumerics,
|
||||
“<code>+</code>”, or “<code>-</code>”</li>
|
||||
“<code>+</code>”, or “<code>-</code>”</li>
|
||||
|
||||
<li>the string “%z”, in which case the
|
||||
“<code>%z</code>” will be replaced by a numeric time zone
|
||||
<li>the string “%z”, in which case the
|
||||
“<code>%z</code>” will be replaced by a numeric time zone
|
||||
abbreviation</li>
|
||||
|
||||
<li>a pair of time zone abbreviations separated by a slash
|
||||
(‘<code>/</code>’), in which case the first string is the
|
||||
(‘<code>/</code>’), in which case the first string is the
|
||||
abbreviation for the standard time name and the second string is the
|
||||
abbreviation for the daylight saving time name</li>
|
||||
|
||||
<li>a string containing “<code>%s</code>”, in which case
|
||||
the “<code>%s</code>” will be replaced by the text in the
|
||||
appropriate Rule’s <code>LETTER</code> column, and the resulting
|
||||
<li>a string containing “<code>%s</code>”, in which case
|
||||
the “<code>%s</code>” will be replaced by the text in the
|
||||
appropriate Rule’s <code>LETTER</code> column, and the resulting
|
||||
string should be a time zone abbreviation</li>
|
||||
</ul>
|
||||
|
||||
<p>The last two make sense only if there’s a named rule in effect.</p>
|
||||
<p>The last two make sense only if there’s a named rule in effect.</p>
|
||||
|
||||
<p>An example of a slash is:</p>
|
||||
<pre>
|
||||
@@ -552,9 +524,9 @@ database</a> gives abbreviations for time zones
|
||||
in popular English-language usage. For
|
||||
example, the last line in
|
||||
<code>Zone</code> <code>Pacific/Honolulu</code> (shown below) gives
|
||||
“HST” for “Hawaii standard time” even though the
|
||||
“HST” for “Hawaii standard time” even though the
|
||||
<a href="https://www.law.cornell.edu/uscode/text/15/263">legal</a>
|
||||
name for that time zone is “Hawaii-Aleutian standard time.”
|
||||
name for that time zone is “Hawaii–Aleutian standard time”.
|
||||
This author has read that there are also some places in Australia where
|
||||
popular time zone names differ from the legal ones.
|
||||
|
||||
@@ -562,10 +534,10 @@ popular time zone names differ from the legal ones.
|
||||
href="https://en.wikipedia.org/wiki/Internationalization_and_localization">localize</a>
|
||||
the abbreviations. They are intended to be the values returned through the
|
||||
<code>"%Z"</code> format specifier to
|
||||
<a href="https://en.wikipedia.org/wiki/C_(programming_language)">C</a>’s
|
||||
<a href="https://pubs.opengroup.org/onlinepubs/9699919799/functions/strftime.html"><code>strftime</code></a>
|
||||
<a href="https://en.wikipedia.org/wiki/C_(programming_language)">C</a>’s
|
||||
<a href="https://pubs.opengroup.org/onlinepubs/9799919799/functions/strftime.html"><code>strftime</code></a>
|
||||
function in the
|
||||
<a href="https://kirste.userpage.fu-berlin.de/chemnet/use/info/libc/libc_19.html#SEC324">“C” locale</a>.
|
||||
<a href="https://kirste.userpage.fu-berlin.de/chemnet/use/info/libc/libc_19.html#SEC324">“C” locale</a>.
|
||||
|
||||
<li>If there is no generally accepted abbreviation for a time zone,
|
||||
a numeric offset is used instead, e.g., <code>+07</code> for 7 hours
|
||||
@@ -574,33 +546,16 @@ zone while uninhabited, where the offset is zero but in some sense
|
||||
the true offset is undefined.
|
||||
</ul>
|
||||
|
||||
<p>As a final example, here’s the complete history for Hawaii:</p>
|
||||
<p>As a final example, here’s the complete history for Hawaii:</p>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th colspan="6">Relevant Excerpts from the US Rules</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="6">
|
||||
<table class="rule">
|
||||
<tr><td style="border:none;text-align:left">
|
||||
<pre class="td">
|
||||
<pre># Relevant Excerpts from the US Rules
|
||||
#Rule NAME FROM TO - IN ON AT SAVE LETTER/S
|
||||
Rule US 1918 1919 - Oct lastSun 2:00 0 S
|
||||
Rule US 1942 only - Feb 9 2:00 1:00 W # War
|
||||
Rule US 1945 only - Aug 14 23:00u 1:00 P # Peace
|
||||
Rule US 1945 only - Sep lastSun 2:00 0 S
|
||||
</pre>
|
||||
</td></tr></table></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="6">The Zone Record</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="6">
|
||||
<table class="rule">
|
||||
<tr><td style="border:none;text-align:left">
|
||||
<pre class="td">
|
||||
|
||||
# The Zone Record
|
||||
#Zone NAME STDOFF RULES FORMAT [UNTIL]
|
||||
Zone Pacific/Honolulu -10:31:26 - LMT 1896 Jan 13 12:00
|
||||
-10:30 - HST 1933 Apr 30 2:00
|
||||
@@ -608,8 +563,7 @@ Zone Pacific/Honolulu -10:31:26 - LMT 1896 Jan 13 12:00
|
||||
-10:30 US H%sT 1947 Jun 8 2:00
|
||||
-10:00 - HST
|
||||
</pre>
|
||||
</td></tr></table></td>
|
||||
</tr>
|
||||
<table>
|
||||
<tr>
|
||||
<th colspan="6">What We Infer</th>
|
||||
</tr>
|
||||
@@ -626,15 +580,15 @@ Zone Pacific/Honolulu -10:31:26 - LMT 1896 Jan 13 12:00
|
||||
<th>Time</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>−10:31:26</td>
|
||||
<td>—</td>
|
||||
<td>−10:31:26</td>
|
||||
<td>–</td>
|
||||
<td>LMT</td>
|
||||
<td>local mean time</td>
|
||||
<td>1896-01-13</td>
|
||||
<td>12:00</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>−10:30</td>
|
||||
<td>−10:30</td>
|
||||
<td>+0:01:26</td>
|
||||
<td>HST</td>
|
||||
<td>Hawaii standard time</td>
|
||||
@@ -642,7 +596,7 @@ Zone Pacific/Honolulu -10:31:26 - LMT 1896 Jan 13 12:00
|
||||
<td>02:00</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>−9:30</td>
|
||||
<td>−9:30</td>
|
||||
<td>+1:00</td>
|
||||
<td>HDT</td>
|
||||
<td>Hawaii daylight time</td>
|
||||
@@ -650,15 +604,15 @@ Zone Pacific/Honolulu -10:31:26 - LMT 1896 Jan 13 12:00
|
||||
<td>12:00</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>−10:30¹</td>
|
||||
<td>−1:00¹</td>
|
||||
<td>−10:30¹</td>
|
||||
<td>−1:00¹</td>
|
||||
<td>HST¹</td>
|
||||
<td>Hawaii standard time</td>
|
||||
<td>1942-02-09</td>
|
||||
<td>02:00</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td rowspan="2">−9:30</td>
|
||||
<td rowspan="2">−9:30</td>
|
||||
<td>+1:00</td>
|
||||
<td>HWT</td>
|
||||
<td>Hawaii war time</td>
|
||||
@@ -673,34 +627,34 @@ Zone Pacific/Honolulu -10:31:26 - LMT 1896 Jan 13 12:00
|
||||
<td rowspan="2">02:00</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>−10:30</td>
|
||||
<td>−1:00</td>
|
||||
<td>−10:30</td>
|
||||
<td>−1:00</td>
|
||||
<td rowspan="2">HST</td>
|
||||
<td rowspan="2">Hawaii standard time</td>
|
||||
<td>1947-06-08</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>−10:00³</td>
|
||||
<td>−10:00³</td>
|
||||
<td>+0:30³</td>
|
||||
<td colspan="2">—</td>
|
||||
<td colspan="2">–</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="6" class="footnote">
|
||||
¹Switching to US rules…most recent transition (in 1919) was to standard time
|
||||
¹Switching to US rules...most recent transition (in 1919) was to standard time
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="6" class="footnote">
|
||||
²23:00 <a href="https://en.wikipedia.org/wiki/Universal_Time">UT</a>
|
||||
+ (−9:30) = 13:30 local
|
||||
+ (−9:30) = 13:30 local
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="6" class="footnote">
|
||||
³Since <a href="https://en.wikipedia.org/wiki/ISO_8601">1947–06–08T12:30Z</a>,
|
||||
³Since <a href="https://en.wikipedia.org/wiki/ISO_8601">1947-06-08T12:30Z</a>,
|
||||
the civil time in Hawaii has been
|
||||
<a href="https://en.wikipedia.org/wiki/Universal_Time">UT</a>/<a href="https://en.wikipedia.org/wiki/Coordinated_Universal_Time">UTC</a>
|
||||
− 10:00 year-round.
|
||||
−10:00 year-round.
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
+206
-192
@@ -3,8 +3,11 @@
|
||||
<head>
|
||||
<title>Time zone and daylight saving time data</title>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<style>
|
||||
pre {margin-left: 2em; white-space: pre-wrap;}
|
||||
dd {margin-left: 1.3rem;}
|
||||
pre {margin-left: 1.3rem; overflow: auto;}
|
||||
ul {padding-left: 1.3rem;}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
@@ -18,7 +21,6 @@ histories and planned futures are often recorded only fitfully. Here
|
||||
is a summary of attempts to organize and record relevant data in this
|
||||
area.
|
||||
</p>
|
||||
<h3>Outline</h3>
|
||||
<nav>
|
||||
<ul>
|
||||
<li>The <code><abbr>tz</abbr></code> database product and process
|
||||
@@ -73,7 +75,7 @@ This database (known as <code><abbr>tz</abbr></code>,
|
||||
is used by several implementations,
|
||||
including
|
||||
<a href="https://www.gnu.org/software/libc/">the
|
||||
<abbr title="GNU's Not Unix">GNU</abbr>
|
||||
<abbr title="GNU’s Not Unix">GNU</abbr>
|
||||
C Library</a> (used in
|
||||
<a href="https://en.wikipedia.org/wiki/Linux"><abbr>GNU</abbr>/Linux</a>),
|
||||
<a href="https://www.android.com">Android</a>,
|
||||
@@ -84,21 +86,21 @@ title="Berkeley Software Distribution">BSD</abbr></a>,
|
||||
<a href="https://www.chromium.org/chromium-os/">ChromiumOS</a>,
|
||||
<a href="https://cygwin.com">Cygwin</a>,
|
||||
<a href="https://mariadb.org">MariaDB</a>,
|
||||
<a href="https://en.wikipedia.org/wiki/MINIX">MINIX</a>,
|
||||
<a href="https://musl.libc.org">musl libc</a>,
|
||||
<a href="https://www.mysql.com">MySQL</a>,
|
||||
<a href="https://en.wikipedia.org/wiki/WebOS"><abbr
|
||||
title="Web Operating System">webOS</abbr></a>,
|
||||
<a href="https://en.wikipedia.org/wiki/IBM_AIX"><abbr
|
||||
title="Advanced Interactive eXecutive">AIX</abbr></a>,
|
||||
<a href="https://www.apple.com/ios"><abbr
|
||||
<a href="https://www.apple.com/os/ios/"><abbr
|
||||
title="iPhone OS">iOS</abbr></a>,
|
||||
<a href="https://www.apple.com/macos">macOS</a>,
|
||||
<a href="https://www.apple.com/os/macos/">macOS</a>,
|
||||
<a href="https://www.microsoft.com/en-us/windows">Microsoft Windows</a>,
|
||||
<a href="https://www.vmssoftware.com">Open<abbr
|
||||
<a href="https://vmssoftware.com">Open<abbr
|
||||
title="Virtual Memory System">VMS</abbr></a>,
|
||||
<a href="https://www.oracle.com/database/">Oracle Database</a>, and
|
||||
<a href="https://www.oracle.com/solaris">Oracle Solaris</a>.</p>
|
||||
<a href="https://www.oracle.com/database/">Oracle Database</a>,
|
||||
<a href="https://www.oracle.com/solaris/solaris11/">Oracle Solaris</a>,
|
||||
and <a href="https://qnx.software/en">QNX</a>.</p>
|
||||
<p>
|
||||
Each main entry in the database represents a <dfn>timezone</dfn>
|
||||
for a set of civil-time clocks that have all agreed since 1970.
|
||||
@@ -117,7 +119,7 @@ To use the database on a <a
|
||||
href="https://en.wikipedia.org/wiki/POSIX"><abbr
|
||||
title="Portable Operating System Interface">POSIX</abbr>.1-2024</a>
|
||||
implementation set the <code><abbr>TZ</abbr></code>
|
||||
environment variable to the location's full name,
|
||||
environment variable to the location’s full name,
|
||||
e.g., <code><abbr>TZ</abbr>="America/New_York"</code>.</p>
|
||||
<p>
|
||||
Associated with each timezone is a history of offsets from
|
||||
@@ -138,7 +140,7 @@ for Eastern Standard Time in the <abbr>US</abbr>.</p>
|
||||
<p>
|
||||
The following <a
|
||||
href="https://en.wikipedia.org/wiki/Unix_shell">shell</a> commands download
|
||||
the latest release's two
|
||||
the latest release’s two
|
||||
<a href="https://en.wikipedia.org/wiki/Tar_(computing)">tarballs</a>
|
||||
to a <abbr>GNU</abbr>/Linux or similar host.</p>
|
||||
<pre><code>mkdir tzdb
|
||||
@@ -169,16 +171,19 @@ lower-case letter (<samp>a</samp> through <samp>z</samp>,
|
||||
then <samp>za</samp> through <samp>zz</samp>, then <samp>zza</samp>
|
||||
through <samp>zzz</samp>, and so on).
|
||||
Since version 2022a, each release has been distributed in
|
||||
<a href="https://pubs.opengroup.org/onlinepubs/9699919799/utilities/pax.html#tag_20_92_13_06">POSIX
|
||||
<a href="https://pubs.opengroup.org/onlinepubs/9799919799/utilities/pax.html#tag_20_94_13_06">POSIX
|
||||
ustar interchange format</a>, compressed as described above;
|
||||
older releases use a nearly compatible format.
|
||||
Since version 2016h, each release has contained a text file named
|
||||
"<code>version</code>" whose first (and currently only) line is the version.
|
||||
Older releases are <a href="https://ftp.iana.org/tz/releases/">archived</a>,
|
||||
and are also available in an
|
||||
<a href="ftp://ftp.iana.org/tz/releases/"><abbr
|
||||
title="File Transfer Protocol">FTP</abbr> directory</a> via a
|
||||
less secure protocol.</p>
|
||||
“<code>version</code>” whose first (and currently only) line is the version.
|
||||
<a href="https://ftp.iana.org/tz/releases/">Older archived releases are
|
||||
available</a> via
|
||||
<a href="https://en.wikipedia.org/wiki/HTTPS"><abbr
|
||||
title="Hypertext Transfer Protocol Secure">HTTPS</abbr></a>,
|
||||
<a href="https://en.wikipedia.org/wiki/Rsync"><abbr
|
||||
title="remote sync">rsync</abbr></a>, and
|
||||
<a href="https://en.wikipedia.org/wiki/FTP"><abbr
|
||||
title="File Transfer Protocol">FTP</abbr></a>.
|
||||
<p>Alternatively, a development repository of code and data can be
|
||||
retrieved from <a href="https://github.com">GitHub</a> via the shell
|
||||
command:</p>
|
||||
@@ -194,7 +199,7 @@ After obtaining the code and data files, see the
|
||||
The code lets you compile the <code><abbr>tz</abbr></code> source files into
|
||||
machine-readable binary files, one for each location. The binary files
|
||||
are in a special format specified by
|
||||
<a href="https://www.rfc-editor.org/rfc/9636">The
|
||||
<a href="https://www.rfc-editor.org/rfc/rfc9636">The
|
||||
Time Zone Information Format (<abbr>TZif</abbr>)</a>
|
||||
(Internet <abbr title="Request For Comments">RFC</abbr> 9636).
|
||||
The code also lets
|
||||
@@ -208,9 +213,12 @@ location.</p>
|
||||
The <code><abbr>tz</abbr></code> code and data
|
||||
are by no means authoritative. If you find errors, please
|
||||
email changes to <a href="mailto:tz@iana.org"><code>tz@iana.org</code></a>,
|
||||
the time zone mailing list. See
|
||||
the time zone mailing list.
|
||||
The mailing list and its archives are public,
|
||||
so please do not send confidential information.
|
||||
See
|
||||
<a href="https://lists.iana.org/postorius/lists/tz.iana.org/">the mailing
|
||||
list's main page</a> to subscribe or to browse its archive of old messages.
|
||||
list’s main page</a> to subscribe or to browse its archive of old messages.
|
||||
<a href="https://tzdata-meta.timtimeonline.com">Metadata for mailing list
|
||||
discussions</a> and corresponding data changes can be
|
||||
generated <a href="https://github.com/timparenti/tzdata-meta">automatically</a>.
|
||||
@@ -228,7 +236,7 @@ data yourself. System-specific instructions for installing the
|
||||
latest <code><abbr>tz</abbr></code> data have also been published
|
||||
for <a href="https://www.ibm.com/support/pages/aix-time-zone-olson-tzdata-updates"><abbr>AIX</abbr></a>,
|
||||
<a
|
||||
href="https://source.android.com/devices/tech/config/timezone-rules">Android</a>,
|
||||
href="https://source.android.com/docs/core/permissions/timezone-rules">Android</a>,
|
||||
<a
|
||||
href="https://unicode-org.github.io/icu/userguide/datetime/timezone/"><abbr
|
||||
title="International Components for Unicode">ICU</abbr></a>,
|
||||
@@ -248,7 +256,7 @@ with lines terminated by <a href="https://en.wikipedia.org/wiki/Newline"><abbr
|
||||
title="linefeed">LF</abbr></a>,
|
||||
which can be modified by common text editors such
|
||||
as <a href="https://www.gnu.org/software/emacs/">GNU Emacs</a>,
|
||||
<a href="https://gedit-technology.github.io/apps/gedit/">gedit</a>, and
|
||||
<a href="https://gedit-text-editor.org">gedit</a>, and
|
||||
<a href="https://www.vim.org">vim</a>.
|
||||
Specialized source-file editing can be done via the
|
||||
<a href="https://packagecontrol.io/packages/zoneinfo">Sublime
|
||||
@@ -274,14 +282,15 @@ displays changes between recent <code><abbr>tzdb</abbr></code> versions.
|
||||
<h2 id="coordinating">Coordinating with governments and distributors</h2>
|
||||
<p>
|
||||
As discussed in
|
||||
"<a href="https://www.icann.org/en/blogs/details/how-time-zones-are-coordinated-13-03-2023-en">How
|
||||
Time Zones Are Coordinated</a>", the time zone database relies on
|
||||
“<a href="https://www.icann.org/en/blogs/details/how-time-zones-are-coordinated-13-03-2023-en">How
|
||||
Time Zones Are Coordinated</a>”, the time zone database relies on
|
||||
collaboration among governments, the time zone database volunteer
|
||||
community, and data distributors downstream.
|
||||
<p>
|
||||
If your government plans to change its time zone boundaries or
|
||||
daylight saving rules, please send email to <a
|
||||
href="mailto:tz@iana.org"><code>tz@iana.org</code></a> well in advance,
|
||||
daylight saving rules, please send email as described in
|
||||
“<a href="#changes">Changes to the <code><abbr>tz</abbr></code> database</a>”.
|
||||
Do this well in advance,
|
||||
as this will lessen confusion and will coordinate updates to many cell phones,
|
||||
computers, and other devices around the world.
|
||||
In your email, please cite the legislation or regulation that specifies
|
||||
@@ -289,7 +298,7 @@ the change, so that it can be checked for details such as the exact times
|
||||
when clock transitions occur.
|
||||
It is OK if a rule change is planned to affect clocks
|
||||
far into the future, as a long-planned change can easily be reverted
|
||||
or otherwise altered with a year's notice before the change would have
|
||||
or otherwise altered with a year’s notice before the change would have
|
||||
affected clocks.</p>
|
||||
<p>
|
||||
There is no fixed schedule for <code><abbr>tzdb</abbr></code> releases.
|
||||
@@ -303,7 +312,7 @@ href="https://en.wikipedia.org/wiki/End_user">end users</a> see changes.
|
||||
These updates can be expensive, for both the <a
|
||||
href="https://en.wikipedia.org/wiki/Quality_assurance">quality
|
||||
assurance</a> process and the overall cost of shipping and installing
|
||||
updates to each device's copy of <code><abbr>tzdb</abbr></code>.
|
||||
updates to each device’s copy of <code><abbr>tzdb</abbr></code>.
|
||||
Updates may be batched with other updates and may take substantial
|
||||
time to reach end users after a release.
|
||||
Older devices may no longer be supported and thus may never be updated,
|
||||
@@ -313,9 +322,9 @@ For these reasons any rule change should be promulgated at least a
|
||||
year before it affects how clocks operate; otherwise, there is a good
|
||||
chance that many clocks will be wrong due to delays in propagating updates,
|
||||
and that residents will be confused or even actively resist the change.
|
||||
The shorter the notice, the more likely clock problems will arise; see "<a
|
||||
href="https://codeofmatt.com/2016/04/23/on-the-timing-of-time-zone-changes/">On
|
||||
the Timing of Time Zone Changes</a>" for examples.
|
||||
The shorter the notice, the more likely clock problems will arise; see “<a
|
||||
href="https://codeofmatt.com/on-the-timing-of-time-zone-changes/">On
|
||||
the Timing of Time Zone Changes</a>” for examples.
|
||||
</p>
|
||||
</section>
|
||||
|
||||
@@ -331,7 +340,7 @@ database format.</li>
|
||||
<li><a
|
||||
href="https://blog.jonudell.net/2009/10/23/a-literary-appreciation-of-the-olsonzoneinfotz-database/">A
|
||||
literary appreciation of the Olson/Zoneinfo/tz database</a> comments on the
|
||||
database's style.</li>
|
||||
database’s style.</li>
|
||||
<li><a href="https://doi.org/10.1145/3340301.3341125">What time is it:
|
||||
managing time in the internet</a> analyzes the database longitudinally.</li>
|
||||
</ul>
|
||||
@@ -344,7 +353,7 @@ managing time in the internet</a> analyzes the database longitudinally.</li>
|
||||
These are listed roughly in ascending order of complexity and fanciness.
|
||||
</p>
|
||||
<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.</li>
|
||||
<li><a href="https://www.timejones.com">TimeJones.com</a>,
|
||||
<a href="https://timezoneconverterapp.com">Time Zone Converter</a> and
|
||||
@@ -362,7 +371,7 @@ lets you see the <code><abbr>TZ</abbr></code> values directly.</li>
|
||||
<li><a
|
||||
href="https://www.convertit.com/Go/ConvertIt/World_Time/Current_Time.ASP">Current
|
||||
Time in 1000 Places</a> uses descriptions of the values.</li>
|
||||
<li><a href="https://www.timeanddate.com/worldclock/">The World Clock –
|
||||
<li><a href="https://www.timeanddate.com/worldclock/">The World Clock –
|
||||
Worldwide</a> lets you sort zone names and convert times.</li>
|
||||
<li><a href="https://24timezones.com">24TimeZones</a> has a world
|
||||
time map and a time converter.</li>
|
||||
@@ -376,21 +385,16 @@ calculates the current time difference between locations.</li>
|
||||
<section>
|
||||
<h2 id="protocols">Network protocols for <code><abbr>tz</abbr></code> data</h2>
|
||||
<ul>
|
||||
<li>The <a href="https://www.ietf.org">Internet Engineering Task Force</a>'s
|
||||
<a href="https://datatracker.ietf.org/wg/tzdist/charter/">Time Zone Data
|
||||
Distribution Service (tzdist) working group</a> defined <a
|
||||
href="https://www.rfc-editor.org/rfc/rfc7808">TZDIST</a>
|
||||
(Internet <abbr>RFC</abbr> 7808), a time zone data distribution service,
|
||||
along with <a href="https://www.rfc-editor.org/rfc/rfc7809">CalDAV</a>
|
||||
<li><a href="https://www.rfc-editor.org/rfc/rfc7808">Time Zone
|
||||
Data Distribution Service</a> (TZDIST, Internet <abbr>RFC</abbr> 7808)
|
||||
is associated with
|
||||
<a href="https://www.rfc-editor.org/rfc/rfc7809">CalDAV</a>
|
||||
(Internet <abbr>RFC</abbr> 7809), a calendar access protocol for
|
||||
transferring time zone data by reference.
|
||||
<a href="https://devguide.calconnect.org/Time-Zones/TZDS/">TZDIST
|
||||
implementations</a> are available.
|
||||
The <a href="https://www.ietf.org/mailman/listinfo/tzdist-bis">tzdist-bis
|
||||
mailing list</a> discusses possible extensions.</li>
|
||||
<li>The <a href="https://www.rfc-editor.org/rfc/rfc5545">
|
||||
Internet Calendaring and Scheduling Core Object Specification
|
||||
(iCalendar)</a> (Internet <abbr>RFC</abbr> 5445)
|
||||
implementations</a> are available.</li>
|
||||
<li>The <a href="https://www.rfc-editor.org/rfc/rfc5545">iCalendar format</a>
|
||||
(Internet <abbr>RFC</abbr> 5445)
|
||||
covers time zone
|
||||
data; see its VTIMEZONE calendar component.
|
||||
The iCalendar format requires specialized parsers and generators; a
|
||||
@@ -422,10 +426,6 @@ available under the <a
|
||||
href="https://www.gnu.org/copyleft/gpl.html"><abbr>GNU</abbr>
|
||||
General Public License (<abbr
|
||||
title="General Public License">GPL</abbr>)</a>.</li>
|
||||
<li><a href="https://sourceforge.net/projects/tzical/">tziCal – tz
|
||||
database conversion utility</a> is like Vzic, except for the <a
|
||||
href="https://dotnet.microsoft.com">.NET framework</a>
|
||||
and with a <abbr>BSD</abbr>-style license.</li>
|
||||
<li><a
|
||||
href="https://metacpan.org/release/DateTime-TimeZone">DateTime::TimeZone</a>
|
||||
contains a script <code>parse_olson</code> that compiles
|
||||
@@ -441,7 +441,7 @@ transition in the <code><abbr>tz</abbr></code> database.</li>
|
||||
Database Parser</a> is a
|
||||
<a href="https://en.wikipedia.org/wiki/C++">C++</a> parser and
|
||||
runtime library with a <a
|
||||
href="https://en.cppreference.com/w/cpp/chrono"><code>std::chrono</code> API</a>
|
||||
href="https://en.cppreference.com/w/cpp/chrono.html"><code>std::chrono</code> API</a>
|
||||
that is a standard part of C++.
|
||||
It is freely available under the
|
||||
<abbr title="Massachusetts Institute of Technology">MIT</abbr> license.</li>
|
||||
@@ -471,11 +471,11 @@ Although its source code is proprietary, its executable is available under the
|
||||
<a href="https://www.oracle.com/a/tech/docs/tzupdater-lic.html">Java SE
|
||||
Timezone Updater License Agreement</a>.</li>
|
||||
<li>The <a
|
||||
href="https://www.oracle.com/technetwork/articles/java/jf14-date-time-2125367.html">Java
|
||||
href="https://www.oracle.com/technical-resources/articles/java/jf14-date-time.html">Java
|
||||
SE 8 Date and Time</a> <abbr>API</abbr> can be supplemented by <a
|
||||
href="https://www.threeten.org/threeten-extra/">ThreeTen-Extra</a>,
|
||||
which is freely available under a <abbr>BSD</abbr>-style license.</li>
|
||||
<li><a href="https://www.joda.org/joda-time/">Joda-Time – Java date
|
||||
<li><a href="https://www.joda.org/joda-time/">Joda-Time – Java date
|
||||
and time <abbr>API</abbr></a> contains a class
|
||||
<code>org.joda.time.tz.ZoneInfoCompiler</code> that compiles
|
||||
<code><abbr>tz</abbr></code> source into a binary format. It inspired
|
||||
@@ -483,8 +483,8 @@ Java 8 <code>java.time</code>, which its users should migrate to once
|
||||
they can assume Java 8 or later. It is available under the <a
|
||||
href="https://www.apache.org/licenses/LICENSE-2.0">Apache License</a>.</li>
|
||||
<li><a href="https://bell-sw.com/pages/iana-updater/">IANA Updater</a> and <a
|
||||
href="https://www.azul.com/products/open-source-tools/ziupdater-time-zone-tool/">ZIUpdater</a>
|
||||
are alternatives to TZUpdater. IANA Updater's license is unclear;
|
||||
href="https://www.azul.com/products/components/ziupdater-time-zone-tool/">ZIUpdater</a>
|
||||
are alternatives to TZUpdater. IANA Updater’s license is unclear;
|
||||
ZIUpdater is licensed under the <abbr>GPL</abbr>.</li>
|
||||
<li><a href="https://github.com/MenoData/Time4A">Time4A: Advanced date and
|
||||
time library for Android</a> and
|
||||
@@ -499,7 +499,7 @@ License">LGPL</abbr>)</a>.</li>
|
||||
<li><abbr>ICU</abbr> (mentioned <a href="#ICU">above</a>) contains compilers and
|
||||
Java-based libraries.</li>
|
||||
</ul>
|
||||
<li><a href="https://nodatime.org">Noda Time – Date and
|
||||
<li><a href="https://nodatime.org">Noda Time – Date and
|
||||
time <abbr>API</abbr> for .NET</a>
|
||||
is like Joda-Time and Time4J, but for the .NET framework instead of Java.
|
||||
It is freely available under the Apache License.</li>
|
||||
@@ -548,13 +548,13 @@ The proposed <a
|
||||
href="https://github.com/tc39/proposal-temporal"><code>Temporal</code>
|
||||
objects</a> let programs access an abstract view of
|
||||
<code><abbr>tzdb</abbr></code> data, and are designed to replace <a
|
||||
href="https://codeofmatt.com/javascript-date-type-is-horribly-broken/">JavaScript's
|
||||
href="https://codeofmatt.com/javascript-date-type-is-horribly-broken/">JavaScript’s
|
||||
problematic <code>Date</code> objects</a> when working with dates and times.
|
||||
<li><a href="https://github.com/JuliaTime">JuliaTime</a> contains a
|
||||
compiler from <code><abbr>tz</abbr></code> source into
|
||||
<a href="https://julialang.org">Julia</a>. It is freely available
|
||||
under the <abbr>MIT</abbr> license.</li>
|
||||
<li><a href="https://github.com/pavkam/tzdb"><abbr>TZDB</abbr> –
|
||||
<li><a href="https://github.com/pavkam/tzdb"><abbr>TZDB</abbr> –
|
||||
<abbr>IANA</abbr> Time Zone Database for Delphi/<abbr
|
||||
title="Free Pascal Compiler">FPC</abbr></a>
|
||||
compiles from <code><abbr>tz</abbr></code> source into
|
||||
@@ -563,14 +563,14 @@ as compiled by <a href="https://en.wikipedia.org/wiki/Delphi_(IDE)">Delphi</a>
|
||||
and <a
|
||||
href="https://en.wikipedia.org/wiki/Free_Pascal"><abbr>FPC</abbr></a>.
|
||||
It is freely available under a <abbr>BSD</abbr>-style license.</li>
|
||||
<li><a href="https://pythonhosted.org/pytz/">pytz – World Timezone
|
||||
<li><a href="https://pythonhosted.org/pytz/">pytz – World Timezone
|
||||
Definitions for Python</a> compiles <code><abbr>tz</abbr></code> source into
|
||||
<a href="https://www.python.org">Python</a>.
|
||||
It is freely available under a <abbr>BSD</abbr>-style license.
|
||||
In code that can assume Python 3.6 or later it is largely superseded; see <a
|
||||
href="https://blog.ganssle.io/articles/2018/03/pytz-fastest-footgun.html">pytz:
|
||||
The Fastest Footgun in the West</a>.</li>
|
||||
<li><a href="https://tzinfo.github.io">TZInfo –
|
||||
<li><a href="https://tzinfo.github.io">TZInfo –
|
||||
Ruby Timezone Library</a>
|
||||
compiles <code><abbr>tz</abbr></code> source into
|
||||
<a href="https://www.ruby-lang.org/en/">Ruby</a>.
|
||||
@@ -582,7 +582,7 @@ library that compiles <code><abbr>tz</abbr></code> source into a time
|
||||
zone repository whose format
|
||||
is either proprietary or an <abbr>XML</abbr>-encoded
|
||||
representation.</li>
|
||||
<li><a id="Tcl" href="https://tcl.tk">Tcl</a>
|
||||
<li><a id="Tcl" href="https://www.tcl-lang.org">Tcl</a>
|
||||
contains a developer-oriented parser that compiles <code><abbr>tz</abbr></code>
|
||||
source into text files, along with a runtime that can read those
|
||||
files. Tcl is freely available under a <abbr>BSD</abbr>-style
|
||||
@@ -600,14 +600,14 @@ has an independent, thread-safe implementation of
|
||||
a <abbr>TZif</abbr> file reader.
|
||||
This library is freely available under the LGPL
|
||||
and is widely used in <abbr>GNU</abbr>/Linux systems.</li>
|
||||
<li><a href="https://www.gnome.org">GNOME</a>'s
|
||||
<a href="https://developer.gnome.org/glib/">GLib</a> has
|
||||
<li><a href="https://www.gnome.org">GNOME</a>’s
|
||||
<a href="https://docs.gtk.org/glib/">GLib</a> has
|
||||
a <abbr>TZif</abbr> file reader written in C that
|
||||
creates a <code>GTimeZone</code> object representing sets
|
||||
of <abbr>UT</abbr> offsets.
|
||||
It is freely available under the <abbr>LGPL</abbr>.</li>
|
||||
<li>The
|
||||
<a href="https://github.com/bloomberg/bde/wiki">BDE Standard Library</a>'s
|
||||
<a href="https://github.com/bloomberg/bde/wiki">BDE Standard Library</a>’s
|
||||
<code>baltzo::TimeZoneUtil</code> component contains a C++
|
||||
implementation of a <abbr>TZif</abbr> file reader. It is freely available under
|
||||
the Apache License.</li>
|
||||
@@ -615,6 +615,9 @@ the Apache License.</li>
|
||||
library that translates between <abbr>UT</abbr> and civil time and
|
||||
can read <abbr>TZif</abbr> files. It is freely available under the Apache
|
||||
License.</li>
|
||||
<li>The <a href="https://go.dev">Go programming language</a>
|
||||
has a <abbr>TZif</abbr> file reader <a
|
||||
href="https://pkg.go.dev/time#LoadLocationFromTZData"><code>LoadLocationFromTZData</code></a>.</li>
|
||||
<li>The
|
||||
<a href="https://github.com/nayarsystems/posix_tz_db"><code>posix_tz_db</code>
|
||||
package</a> contains Python code
|
||||
@@ -628,7 +631,7 @@ The package is freely available under the MIT license.</li>
|
||||
<li><a href="https://github.com/derickr/timelib">Timelib</a> is a C
|
||||
library that reads <abbr>TZif</abbr> files and converts
|
||||
timestamps from one time zone or format to another.
|
||||
It is used by <a href="https://secure.php.net"><abbr
|
||||
It is used by <a href="https://www.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>.
|
||||
@@ -672,38 +675,36 @@ available under a <abbr>BSD</abbr>-style license.</li>
|
||||
<li><a href="https://foxclocks.org">FoxClocks</a>
|
||||
is an extension for <a href="https://www.google.com/chrome/">Google
|
||||
Chrome</a>, <a
|
||||
href="https://www.mozilla.org/en-US/firefox/new/">Firefox</a> and <a
|
||||
href="https://www.mozilla.org/en-US/thunderbird/">Thunderbird</a>.
|
||||
href="https://www.firefox.com/en-US/">Firefox</a> and <a
|
||||
href="https://www.thunderbird.net/en-US/">Thunderbird</a>.
|
||||
It displays multiple clocks in the application window, and has a mapping
|
||||
interface to <a href="https://www.google.com/earth/">Google Earth</a>.
|
||||
interface to <a href="https://earth.google.com/web/">Google Earth</a>.
|
||||
It is freely available under the <abbr>GPL</abbr>.</li>
|
||||
<li><a href="https://golang.org">Go programming language</a>
|
||||
implementations contain a copy of a 32-bit subset of a recent
|
||||
<code><abbr>tz</abbr></code> database in a
|
||||
Go-specific format.</li>
|
||||
<li>Microsoft Windows 8.1
|
||||
and later has <code><abbr>tz</abbr></code> data and <abbr>CLDR</abbr>
|
||||
data (mentioned <a href="#CLDR">below</a>) used by the
|
||||
<a href="https://en.wikipedia.org/wiki/Windows_Runtime">Windows Runtime</a> /
|
||||
<a href="https://en.wikipedia.org/wiki/Universal_Windows_Platform">Universal Windows Platform</a> classes
|
||||
<a href="https://docs.microsoft.com/uwp/api/Windows.Globalization.DateTimeFormatting.DateTimeFormatter"><code>DateTimeFormatter</code></a> and
|
||||
<a href="https://docs.microsoft.com/uwp/api/windows.globalization.calendar"><code>Calendar</code></a>.
|
||||
<a href="https://learn.microsoft.com/en-us/uwp/api/Windows.Globalization.DateTimeFormatting.DateTimeFormatter"><code>DateTimeFormatter</code></a> and
|
||||
<a href="https://learn.microsoft.com/en-us/uwp/api/windows.globalization.calendar"><code>Calendar</code></a>.
|
||||
<a id="System.TimeZoneInfo"
|
||||
href="https://blogs.msdn.microsoft.com/bclteam/2007/06/07/exploring-windows-time-zones-with-system-timezoneinfo-josh-free/">Exploring
|
||||
href="https://learn.microsoft.com/en-us/archive/blogs/bclteam/exploring-windows-time-zones-with-system-timezoneinfo-josh-free">Exploring
|
||||
Windows Time Zones with <code>System.TimeZoneInfo</code></a> describes
|
||||
the older, proprietary method of Microsoft Windows 2000 and later,
|
||||
which stores time zone data in the
|
||||
<a href="https://en.wikipedia.org/wiki/Windows_Registry">Windows Registry</a>. The
|
||||
<a
|
||||
href="https://unicode.org/cldr/charts/latest/supplemental/zone_tzid.html">Zone →
|
||||
Tzid table</a> or <a
|
||||
href="https://github.com/unicode-org/cldr/blob/master/common/supplemental/windowsZones.xml"><abbr>XML</abbr>
|
||||
href="https://unicode.org/cldr/charts/latest/supplemental/zone_tzid.html">Zone
|
||||
→ Tzid table</a> or <a
|
||||
href="https://github.com/unicode-org/cldr/blob/main/common/supplemental/windowsZones.xml"><abbr>XML</abbr>
|
||||
file</a> of the <abbr>CLDR</abbr> data maps proprietary zone IDs
|
||||
to <code><abbr>tz</abbr></code> names.
|
||||
These mappings can be performed programmatically via the <a href="https://github.com/mj1856/TimeZoneConverter">TimeZoneConverter</a> .NET library,
|
||||
These mappings can be performed programmatically via the
|
||||
<a href="https://github.com/mattjohnsonpint/TimeZoneConverter">TimeZoneConverter</a>
|
||||
.NET library,
|
||||
or the ICU Java and C++ libraries mentioned <a href="#ICU">above</a>.
|
||||
<li><a
|
||||
href="https://www.oracle.com/java/index.html">Oracle
|
||||
href="https://www.oracle.com/java/">Oracle
|
||||
Java</a> contains a copy of a subset of a recent
|
||||
<code><abbr>tz</abbr></code> database in a
|
||||
Java-specific format.</li>
|
||||
@@ -714,10 +715,10 @@ Java-specific format.</li>
|
||||
<h2 id="other-dbs">Other time zone databases</h2>
|
||||
<ul>
|
||||
<li><a href="https://www.astro.com/atlas">Time-zone Atlas</a>
|
||||
is Astrodienst's Web version of Shanks and Pottenger's out-of-print
|
||||
is Astrodienst’s Web version of Shanks and Pottenger’s out-of-print
|
||||
time zone history atlases
|
||||
<a href="https://www.worldcat.org/oclc/468828649">for the US</a> and
|
||||
<a href="https://www.worldcat.org/oclc/76950459">for the world</a>.
|
||||
<a href="https://search.worldcat.org/title/468828649">for the US</a> and
|
||||
<a href="https://search.worldcat.org/title/76950459">for the world</a>.
|
||||
Although these extensive atlases
|
||||
<a href="https://astrologynewsservice.com/opinion/how-astrologers-contributed-to-the-information-age-a-brief-history-of-time/">were
|
||||
sources for much of the older <code><abbr>tz</abbr></code> data</a>,
|
||||
@@ -731,7 +732,7 @@ its own <code>tztab</code>(4) format.</li>
|
||||
<li><a href="https://www.worldtimeserver.com">World Time Server</a>
|
||||
is another time zone database.</li>
|
||||
<li>The <a
|
||||
href="https://www.iata.org/publications/store/Pages/standard-schedules-information.aspx">Standard
|
||||
href="https://www.iata.org/en/publications/manuals/standard-schedules-information">Standard
|
||||
Schedules Information Manual</a> of the
|
||||
International Air Transport Association
|
||||
gives current time zone rules for airports served by commercial aviation.</li>
|
||||
@@ -741,32 +742,24 @@ gives current time zone rules for airports served by commercial aviation.</li>
|
||||
<section>
|
||||
<h2 id="maps">Maps</h2>
|
||||
<ul>
|
||||
<li>The <a
|
||||
href="https://www.cia.gov/the-world-factbook/maps/world-regional/">World
|
||||
and Regional Maps section</a> of <em>The World Factbook</em>, published by the
|
||||
<a href="https://www.cia.gov">US Central Intelligence
|
||||
Agency (<abbr
|
||||
title="Central Intelligence Agency">CIA</abbr>)</a>, contains a time
|
||||
zone map; the
|
||||
<a
|
||||
href="https://legacy.lib.utexas.edu/maps/world.html">Perry–Castañeda
|
||||
Library Map Collection</a>
|
||||
of the University of Texas at Austin has copies of
|
||||
recent editions.
|
||||
The pictorial quality is good,
|
||||
but the maps do not indicate daylight saving time,
|
||||
and parts of the data are a few years out of date.</li>
|
||||
<li><a href="https://www.worldtimezone.com">World Time Zone Map
|
||||
with current time</a>
|
||||
has several fancy time zone maps; it covers Russia particularly well.
|
||||
The maps' pictorial quality is not quite as good as the
|
||||
<abbr>CIA</abbr>'s
|
||||
but the maps are more up to date.</li>
|
||||
has several fancy time zone maps; it covers Russia particularly well.</li>
|
||||
<li><a
|
||||
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
|
||||
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>
|
||||
<li>The
|
||||
<a
|
||||
href="https://maps.lib.utexas.edu/maps/world.html">Perry–Castañeda
|
||||
Library Map Collection</a> of the University of Texas at Austin has
|
||||
copies of old maps taken from <a
|
||||
href="https://en.wikipedia.org/wiki/The_World_Factbook"><em>The
|
||||
World Factbook</em></a>, formerly published by the
|
||||
<a href="https://www.cia.gov">US Central Intelligence Agency</a>.
|
||||
Although the maps’ pictorial quality is good,
|
||||
the maps do not indicate daylight saving time.</li>
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
@@ -792,32 +785,32 @@ for looking up a timezone name from a GPS coordinate.</li>
|
||||
the <a
|
||||
href="https://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
|
||||
href="https://developers.google.com/maps/documentation/timezone/overview">Google
|
||||
Maps Time Zone API</a>, and
|
||||
the <a href="https://timezonedb.com/api">TimeZoneDB API</a>.
|
||||
Commercial network API access is provided
|
||||
by <a href="https://askgeo.com">AskGeo</a>
|
||||
and <a href="https://www.geogarage.com/blog/news-1/post/geogarage-time-zone-api-31">GeoGarage</a>.
|
||||
</li>
|
||||
<li>"<a
|
||||
<li>“<a
|
||||
href="https://stackoverflow.com/questions/16086962/how-to-get-a-time-zone-from-a-location-using-latitude-and-longitude-coordinates/16086964">How
|
||||
to get a time zone from a location using latitude and longitude
|
||||
coordinates?</a>" discusses other geolocation possibilities.</li>
|
||||
<li><a href="http://statoids.com/statoids.html">Administrative
|
||||
Divisions of Countries ("Statoids")</a> lists
|
||||
coordinates?</a>” discusses other geolocation possibilities.</li>
|
||||
<li><a href="https://statoids.com/statoids.html">Administrative
|
||||
Divisions of Countries (“Statoids”)</a> lists
|
||||
political subdivision data related to time zones.</li>
|
||||
<li><a href="https://manifold.net/info/freestuff.shtml">Manifold Software
|
||||
– GIS and Database Tools</a> includes a Manifold-format map of
|
||||
– GIS and Database Tools</a> includes a Manifold-format map of
|
||||
world time zone boundaries circa 2007, distributed under the
|
||||
<abbr>GPL</abbr>.</li>
|
||||
<li>A ship within the <a
|
||||
href="https://en.wikipedia.org/wiki/Territorial_waters">territorial
|
||||
waters</a> of any nation uses that nation's time. In international
|
||||
waters, time zone boundaries are meridians 15° apart, except that
|
||||
<abbr>UT</abbr>−12 and <abbr>UT</abbr>+12 are each 7.5°
|
||||
waters</a> of any nation uses that nation’s time. In international
|
||||
waters, time zone boundaries are meridians 15° apart, except that
|
||||
<abbr>UT</abbr>−12 and <abbr>UT</abbr>+12 are each 7.5°
|
||||
wide and are separated by
|
||||
the 180° meridian (not by the International Date Line, which is
|
||||
for land and territorial waters only). A captain can change ship's
|
||||
the 180° meridian (not by the International Date Line, which is
|
||||
for land and territorial waters only). A captain can change ship’s
|
||||
clocks any time after entering a new time zone; midnight changes are
|
||||
common.</li>
|
||||
</ul>
|
||||
@@ -830,19 +823,20 @@ common.</li>
|
||||
Walk through Time</a>
|
||||
surveys the evolution of timekeeping.</li>
|
||||
<li>The history of daylight saving time is surveyed in <a
|
||||
href="http://www.webexhibits.org/daylightsaving/">About Daylight
|
||||
Saving Time – History, rationale, laws & dates</a> and summarized in
|
||||
href="https://www.webexhibits.org/daylightsaving/">About Daylight
|
||||
Saving Time – History, rationale, laws & dates</a> and summarized in
|
||||
<a href="http://seizethedaylight.com/dst/">A Brief
|
||||
History of Daylight Saving Time</a>.</li>
|
||||
<li><a href="https://www.laphamsquarterly.org/roundtable/time-lords">Time
|
||||
Lords</a> discusses how authoritarians manipulate civil time.</li>
|
||||
<li><a href="https://www.w3.org/TR/timezone/">Working with Time Zones</a>
|
||||
<li><a href="https://www.w3.org/TR/timezone/">Working with Time
|
||||
and Time Zones</a>
|
||||
contains guidelines and best practices for software applications that
|
||||
deal with civil time.</li>
|
||||
<li><a href="https://webspace.science.uu.nl/~gent0113/idl/idl.htm">A History of
|
||||
the International Date Line</a> tells the story of the most important
|
||||
time zone boundary.</li>
|
||||
<li><a href="http://statoids.com/tconcept.html">Basic Time
|
||||
<li><a href="https://statoids.com/tconcept.html">Basic Time
|
||||
Zone Concepts</a> discusses terminological issues behind time zones.</li>
|
||||
</ul>
|
||||
</section>
|
||||
@@ -851,10 +845,7 @@ Zone Concepts</a> discusses terminological issues behind time zones.</li>
|
||||
<h2 id="national">National histories of legal time</h2>
|
||||
<dl>
|
||||
<dt>Australia</dt>
|
||||
<dd>The Parliamentary Library commissioned a <a
|
||||
href="https://parlinfo.aph.gov.au/parlInfo/download/library/prspub/359V6/upload_binary/359v60.pdf">research
|
||||
paper on daylight saving time in Australia</a>.
|
||||
The Bureau of Meteorology publishes a list of <a
|
||||
<dd>The Bureau of Meteorology publishes a list of <a
|
||||
href="http://www.bom.gov.au/climate/averages/tables/dst_times.shtml">Implementation
|
||||
Dates of Daylight Savings Time within Australia</a>.</dd>
|
||||
<dt>Belgium</dt>
|
||||
@@ -867,7 +858,7 @@ hreflang="fr">French</a>).</dd>
|
||||
<dt>Brazil</dt>
|
||||
<dd>The Time Service Department of the National Observatory
|
||||
records <a href="http://pcdsh01.on.br/DecHV.html"
|
||||
hreflang="pt-BR">Brazil's daylight saving time decrees (in
|
||||
hreflang="pt-BR">Brazil’s daylight saving time decrees (in
|
||||
Portuguese)</a>.</dd>
|
||||
<dt>Canada</dt>
|
||||
<dd>National Research Council Canada publishes current
|
||||
@@ -877,12 +868,12 @@ zones and daylight saving time</a>.</dd>
|
||||
<dt>Chile</dt>
|
||||
<dd>The Hydrographic and Oceanographic Service of the Chilean Navy publishes a
|
||||
<a href="https://www.horaoficial.cl/historia_hora.php" hreflang="es">history of
|
||||
Chile's official time (in Spanish)</a>.</dd>
|
||||
Chile’s official time (in Spanish)</a>.</dd>
|
||||
<dt>China</dt>
|
||||
<dd>The Hong Kong Observatory maintains a
|
||||
<a href="https://www.hko.gov.hk/en/gts/time/Summertime.htm">history of
|
||||
summer time in Hong Kong</a>,
|
||||
and Macau's Meteorological and Geophysical Bureau maintains a <a
|
||||
and Macau’s Meteorological and Geophysical Bureau maintains a <a
|
||||
href="https://www.smg.gov.mo/en/subpage/224/page/174">similar
|
||||
history for Macau</a>.
|
||||
Unfortunately the latter is incomplete and has errors.</dd>
|
||||
@@ -892,7 +883,7 @@ hreflang="cs">When daylight saving time starts and ends (in Czech)</a>
|
||||
summarizes and cites historical <abbr>DST</abbr> regulations.</dd>
|
||||
<dt>Germany</dt>
|
||||
<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/ptb/fachabteilungen/abt4/fb-44/ag-441/realisation-of-legal-time-in-germany.html">Realisation
|
||||
of Legal Time in Germany</a>.</dd>
|
||||
<dt>Israel</dt>
|
||||
<dd><a
|
||||
@@ -912,11 +903,11 @@ hreflang="nl">Legal time in the Netherlands (in Dutch)</a>
|
||||
covers the history of local time in the Netherlands from ancient times.</dd>
|
||||
<dt>New Zealand</dt>
|
||||
<dd>The Department of Internal Affairs maintains a brief <a
|
||||
href="https://www.dia.govt.nz/Daylight-Saving-History">History of
|
||||
Daylight Saving</a>.</dd>
|
||||
href="https://www.govt.nz/browse/recreation-and-the-environment/daylight-saving/history-of-daylight-saving-in-nz/">History
|
||||
of Daylight Saving in NZ</a>.</dd>
|
||||
<dt>Palestine</dt>
|
||||
<dd>The Ministry of Telecom and IT publishes a <a
|
||||
href="https://mtit.pna.ps/home/TimeZone"
|
||||
<dd>The Ministry of Telecom and Digital Economy publishes a <a
|
||||
href="https://mtde.gov.ps/home/TimeZone"
|
||||
hreflang="ar">history of clock changes (in Arabic)</a>.</dd>
|
||||
<dt>Portugal</dt>
|
||||
<dd>The Lisbon Astronomical Observatory publishes a
|
||||
@@ -925,7 +916,7 @@ legal time (in Portuguese)</a>.</dd>
|
||||
<dt>Singapore</dt>
|
||||
<dd><a id="Singapore"
|
||||
href="https://web.archive.org/web/20190822231045/http://www.math.nus.edu.sg/~mathelmr/teaching/timezone.html">Why
|
||||
is Singapore in the "Wrong" Time Zone?</a> details the
|
||||
is Singapore in the “Wrong” Time Zone?</a> details the
|
||||
history of legal time in Singapore and Malaysia.</dd>
|
||||
<dt>United Kingdom</dt>
|
||||
<dd><a
|
||||
@@ -933,7 +924,7 @@ href="https://www.polyomino.org.uk/british-time/">History of
|
||||
legal time in Britain</a> discusses in detail the country
|
||||
with perhaps the best-documented history of clock adjustments.</dd>
|
||||
<dt>United States</dt>
|
||||
<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
|
||||
Time Zone Proceedings</a> lists changes to
|
||||
official written time zone boundaries, and its <a
|
||||
@@ -957,9 +948,6 @@ zone shifts, and many scientific studies have been conducted. This
|
||||
section summarizes reviews and position statements based on
|
||||
scientific literature in the area.</p>
|
||||
<ul>
|
||||
<li>In 2022 the American Medical Association issued a
|
||||
<a href="https://www.ama-assn.org/press-center/press-releases/ama-calls-permanent-standard-time">statement
|
||||
supporting permanent standard time</a> on health grounds.</li>
|
||||
<li>Carey RN, Sarma KM.
|
||||
<a href="https://bmjopen.bmj.com/content/7/6/e014319.long">Impact of
|
||||
daylight saving time on road traffic collision risk: a systematic
|
||||
@@ -969,13 +957,41 @@ This reviews research literature and concludes that the evidence
|
||||
neither supports nor refutes road safety benefits from
|
||||
shifts in time zones.</li>
|
||||
<li>Havranek T, Herman D, Irsova D.
|
||||
<a href="https://www.iaee.org/en/publications/ejarticle.aspx?id=3051">Does
|
||||
daylight saving save electricity? A meta-analysis</a>.
|
||||
<em>Energy J.</em> 2018;39(2):35–61.
|
||||
Does daylight saving save electricity? A meta-analysis.
|
||||
<em>Energy J.</em> 2018;39(2):35–61.
|
||||
doi:<a href="https://doi.org/10.5547/01956574.39.2.thav">10.5547/01956574.39.2.thav</a>.
|
||||
This analyzes research literature and concludes, "Electricity savings
|
||||
This analyzes research literature and concludes, “Electricity savings
|
||||
are larger for countries farther away from the equator, while
|
||||
subtropical regions consume more electricity because of <abbr>DST</abbr>."</li>
|
||||
subtropical regions consume more electricity because of <abbr>DST</abbr>.”</li>
|
||||
<li>Neumann P, von Blanckenburg K. <a
|
||||
href="https://journals.sagepub.com/doi/full/10.1177/0961463X241310562">What
|
||||
time will it be? A comprehensive literature review on daylight saving time</a>.
|
||||
<em>Time Soc</em>. 2025;34(4):684–745.
|
||||
doi:<a href="https://doi.org/10.1177/0961463X241310562">10.1177/0961463X241310562</a>.
|
||||
This reviews <abbr>DST</abbr>’s effects on electricity, health, crime, road
|
||||
safety, and the economy, focusing on research since 2010, and concludes that
|
||||
year-round standard time is preferable overall.</li>
|
||||
<li>Romigi A, Franco V, Scoditti E <em>et al</em>.
|
||||
The effects of daylight saving time and clock time transitions on sleep and
|
||||
sleepiness: a systematic review. <em>Sleep Med Rev.</em> 2025;84:102161. doi:<a
|
||||
href="https://doi.org/10.1016/j.smrv.2025.102161">10.1016/j.smrv.2025.102161</a>.
|
||||
This reviews <abbr>DST</abbr> and <abbr>DST</abbr> transitions,
|
||||
and concludes that they both harm sleep, health and behavior.</li>
|
||||
</ul>
|
||||
|
||||
<p>The following medical societies have taken positions on the
|
||||
advisability of clock shifts:</p>
|
||||
|
||||
<ul>
|
||||
<li>In 2022 the American Medical Association issued a
|
||||
<a href="https://www.ama-assn.org/press-center/ama-press-releases/ama-calls-permanent-standard-time">statement
|
||||
supporting permanent standard time</a> on health grounds.</li>
|
||||
<li>Crawford MR, Winnebeck EC, von Schantz M <em>et al</em>.
|
||||
<a href="https://onlinelibrary.wiley.com/doi/10.1111/jsr.14352">The
|
||||
British Sleep Society position statement on Daylight Saving Time in the UK</a>.
|
||||
<em>J Sleep Res.</em> 2025;34(3):e14352.
|
||||
doi:<a href="https://doi.org/10.1111/jsr.14352">10.1111/jsr.14352</a>.
|
||||
This recommends that the UK abolish <abbr>DST</abbr> for health reasons.</li>
|
||||
<li>Malow BA. <a
|
||||
href="https://academic.oup.com/sleep/article/45/12/zsac236/6717940">It is time
|
||||
to abolish the clock change and adopt permanent
|
||||
@@ -983,21 +999,13 @@ standard time in the United States:
|
||||
a Sleep Research Society position statement</a>.
|
||||
<em>Sleep.</em> 2022;45(12):zsac236.
|
||||
doi:<a href="https://doi.org/10.1093/sleep/zsac236">10.1093/sleep/zsac236</a>.
|
||||
After reviewing the scientific literature, the Sleep Research Society
|
||||
advocates permanent standard time due to its health benefits.
|
||||
<li>Neumann P, von Blanckenburg K. <a
|
||||
href="https://journals.sagepub.com/doi/full/10.1177/0961463X241310562">What
|
||||
time will it be? A comprehensive literature review on daylight saving time</a>.
|
||||
<em>Time Soc</em>. 2025-01-21.
|
||||
doi:<a href="https://doi.org/10.1177/0961463X241310562">10.1177/0961463X241310562</a>.
|
||||
This reviews DST's effects on electricity, health, crime, road safety,
|
||||
and the economy, focusing on research since 2010, and concludes that
|
||||
year-round standard time is preferable overall.
|
||||
The Sleep Research Society
|
||||
advocates permanent standard time due to its health benefits.</li>
|
||||
<li>Rishi MA, Cheng JY, Strang AR <em>et al</em>.
|
||||
<a href="https://jcsm.aasm.org/doi/10.5664/jcsm.10898">Permanent standard time
|
||||
is the optimal choice for health and safety:
|
||||
an American Academy of Sleep Medicine position statement</a>.
|
||||
<em>J Clin Sleep Med.</em> 2024;20(1):121–125.
|
||||
<em>J Clin Sleep Med.</em> 2024;20(1):121–125.
|
||||
doi:<a href="https://doi.org/10.5664/jcsm.10898">10.5664/jcsm.10898</a>.
|
||||
The AASM argues for permanent standard time due to health and safety risks
|
||||
and economic costs of both <abbr>DST</abbr> transitions and
|
||||
@@ -1005,12 +1013,12 @@ permanent <abbr>DST</abbr>.</li>
|
||||
<li>Roenneberg T, Wirz-Justice A, Skene DJ <em>et al</em>.
|
||||
<a href="https://journals.sagepub.com/doi/10.1177/0748730419854197">Why
|
||||
should we abolish Daylight Saving Time?</a>
|
||||
<em>J Biol Rhythms.</em> 2019;34(3):227–230.
|
||||
<em>J Biol Rhythms.</em> 2019;34(3):227–230.
|
||||
doi:<a href="https://doi.org/10.1177/0748730419854197">10.1177/0748730419854197</a>.
|
||||
The Society for Research on Biological Rhythms
|
||||
opposes <abbr>DST</abbr> changes and permanent <abbr>DST</abbr>,
|
||||
and advocates that governments adopt
|
||||
"permanent Standard Time for the health and safety of their citizens".</li>
|
||||
“permanent Standard Time for the health and safety of their citizens”.</li>
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
@@ -1032,7 +1040,7 @@ Internet hosts.</li>
|
||||
family of software algorithms can achieve accuracy to a few tens of
|
||||
nanoseconds in scalable server farms without special hardware.</li>
|
||||
<li>The <a
|
||||
href="https://www.nist.gov/intelligent-systems-division/ieee-1588">Precision
|
||||
href="https://www.nist.gov/el/intelligent-systems-division-73500/ieee-1588">Precision
|
||||
Time Protocol</a> (<abbr
|
||||
title="Institute of Electrical and Electronics Engineers">IEEE</abbr> 1588)
|
||||
can achieve submicrosecond clock accuracy on a local area network
|
||||
@@ -1044,14 +1052,14 @@ Options for <abbr title="Dynamic Host Configuration Protocol">DHCP</abbr></a>
|
||||
specifies a <a
|
||||
href="https://en.wikipedia.org/wiki/Dynamic_Host_Configuration_Protocol"><abbr>DHCP</abbr></a>
|
||||
option for a server to configure
|
||||
a client's time zone and daylight saving settings automatically.</li>
|
||||
a client’s time zone and daylight saving settings automatically.</li>
|
||||
<li><a href="https://www.ucolick.org/~sla/leapsecs/timescales.html">Time
|
||||
Scales</a> describes astronomical time scales like
|
||||
<abbr title="Terrestrial Dynamic Time">TDT</abbr>,
|
||||
<abbr title="Geocentric Coordinate Time">TCG</abbr>, and
|
||||
<abbr title="Barycentric Dynamic Time">TDB</abbr>.
|
||||
<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
|
||||
href="https://www.iausofa.org"><abbr
|
||||
title="Standards Of Fundamental Astronomy">SOFA</abbr></a>
|
||||
collection contains C and <a
|
||||
@@ -1060,10 +1068,10 @@ code for converting among time scales like
|
||||
<abbr title="International Atomic Time">TAI</abbr>,
|
||||
<abbr>TDB</abbr>, <abbr>TDT</abbr> and
|
||||
<abbr>UTC</abbr>. It is freely available under the
|
||||
<a href="https://www.iausofa.org/tandc.html">SOFA license</a>.</li>
|
||||
<a href="https://www.iausofa.org/terms-and-conditions">SOFA license</a>.</li>
|
||||
<li><a
|
||||
href="https://www.giss.nasa.gov/tools/mars24/help/notes.html">Mars24 Sunclock
|
||||
– Time on Mars</a> describes Airy Mean Time (<abbr>AMT</abbr>) and the
|
||||
– Time on Mars</a> describes Airy Mean Time (<abbr>AMT</abbr>) and the
|
||||
diverse local time
|
||||
scales used by each landed mission on Mars.</li>
|
||||
<li><a href="http://leapsecond.com">LeapSecond.com</a> is
|
||||
@@ -1072,25 +1080,26 @@ in general. It covers the state of the art in amateur timekeeping, and
|
||||
how the art has progressed over the past few decades.</li>
|
||||
<li>The rules for leap seconds are specified in Annex 1 (Time scales) of <a
|
||||
href="https://www.itu.int/rec/R-REC-TF.460-6-200202-I/">Standard-frequency
|
||||
and time-signal emissions</a>, International Telecommunication Union –
|
||||
and time-signal emissions</a>, International Telecommunication Union –
|
||||
Radiocommunication Sector (ITU-R) Recommendation TF.460-6 (02/2002).</li>
|
||||
<li><a
|
||||
href="https://www.iers.org/IERS/EN/Publications/Bulletins/bulletins.html"><abbr
|
||||
title="International Earth Rotation and Reference Systems Service">IERS</abbr>
|
||||
Bulletins</a> contains official publications of the International
|
||||
Earth Rotation and Reference Systems Service, which decides when leap
|
||||
seconds occur. The <code><abbr>tz</abbr></code> code and data support leap seconds
|
||||
via an optional "<code>right</code>" configuration where a computer's internal
|
||||
seconds occur.
|
||||
The <code><abbr>tz</abbr></code> code and data support leap seconds
|
||||
via an optional <code>"right"</code> configuration where a computer’s internal
|
||||
<code>time_t</code> integer clock counts every <abbr>TAI</abbr> second,
|
||||
as opposed to the default "<code>posix</code>" configuration
|
||||
as opposed to the default <code>"posix"</code> configuration
|
||||
where the internal clock ignores leap seconds.
|
||||
The two configurations agree for timestamps starting with 1972-01-01 00:00:00
|
||||
<abbr>UTC</abbr> (<code>time_t</code> 63 072 000) and diverge for
|
||||
timestamps starting with <code>time_t</code> 78 796 800,
|
||||
which corresponds to the first leap second
|
||||
1972-06-30 23:59:60 <abbr>UTC</abbr> in the "<code>right</code>" configuration,
|
||||
1972-06-30 23:59:60 <abbr>UTC</abbr> in the <code>"right"</code> configuration,
|
||||
and to
|
||||
1972-07-01 00:00:00 <abbr>UTC</abbr> in the "<code>posix</code>" configuration.
|
||||
1972-07-01 00:00:00 <abbr>UTC</abbr> in the <code>"posix"</code> configuration.
|
||||
In practice the two configurations also agree for timestamps before
|
||||
1972 even though the historical situation is messy, partly because
|
||||
neither <abbr>UTC</abbr> nor <abbr>TAI</abbr>
|
||||
@@ -1105,7 +1114,7 @@ The <abbr>IERS</abbr> maintains this file, and a copy is distributed by
|
||||
and <a href="https://ntpsec.org">NTPsec</a>.
|
||||
The <code><abbr>tz</abbr></code> database also distributes leap second
|
||||
information in a differently-formatted <code>leapseconds</code> text file,
|
||||
as well as in the "<code>right</code>" configuration in binary form; for
|
||||
as well as in the <code>"right"</code> configuration in binary form; for
|
||||
example, <code>right/UTC</code> can be used
|
||||
by <a href="https://chrony-project.org"><code>chrony</code></a>,
|
||||
another <abbr>NTP</abbr> implementation.</li>
|
||||
@@ -1114,13 +1123,13 @@ discusses how to gradually adjust <abbr>POSIX</abbr> clocks near a
|
||||
leap second so that they disagree with <abbr>UTC</abbr> by at most a
|
||||
half second, even though every <abbr>POSIX</abbr> minute has exactly
|
||||
sixty seconds. This approach works with the default <code><abbr>tz</abbr></code>
|
||||
"<code>posix</code>" configuration, is <a
|
||||
href="http://bk1.ntp.org/ntp-stable/README.leapsmear">supported</a> by
|
||||
the abovementioned <abbr>NTP</abbr> implementations, <a
|
||||
<code>"posix"</code> configuration, is <a
|
||||
href="https://gitlab.com/NTPsec/ntpsec/-/blob/master/docs/leapsmear.adoc">supported</a>
|
||||
by the abovementioned <abbr>NTP</abbr> implementations, <a
|
||||
href="https://github.com/google/unsmear">supports</a> conversion between
|
||||
<abbr>UTC</abbr> and smeared <abbr>POSIX</abbr> timestamps, and is used by major
|
||||
cloud service providers. However, according to
|
||||
<a href="https://www.rfc-editor.org/rfc/rfc8633#section-3.7.1">§3.7.1 of
|
||||
<a href="https://www.rfc-editor.org/rfc/rfc8633#section-3.7.1">§3.7.1 of
|
||||
Network Time Protocol Best Current Practices</a>
|
||||
(Internet <abbr>RFC</abbr> 8633), leap smearing is not suitable for
|
||||
applications requiring accurate <abbr>UTC</abbr> or civil time,
|
||||
@@ -1128,8 +1137,8 @@ and is intended for use only in single, well-controlled environments.</li>
|
||||
<li>The <a
|
||||
href="https://pairlist6.pair.net/mailman/listinfo/leapsecs">Leap
|
||||
Second Discussion List</a> covers <a
|
||||
href="https://www2.unb.ca/gge/Resources/gpsworld.november99.pdf">McCarthy
|
||||
and Klepczynski's 1999 proposal to discontinue leap seconds</a>,
|
||||
href="https://gge.ext.unb.ca/Resources/gpsworld.november99.pdf">McCarthy
|
||||
and Klepczynski’s 1999 proposal to discontinue leap seconds</a>,
|
||||
discussed further in
|
||||
<a href="https://www.cl.cam.ac.uk/~mgk25/time/metrologia-leapsecond.pdf">The
|
||||
leap second: its history and possible future</a>.
|
||||
@@ -1143,12 +1152,16 @@ to discontinue the use of leap seconds by 2035, and requested that no
|
||||
discontinuous adjustments be made to UTC for at least a century.
|
||||
The World Radiocommunication Conference <a
|
||||
href="https://www.itu.int/dms_pub/itu-r/opb/act/R-ACT-WRC.15-2023-PDF-E.pdf">resolved
|
||||
in 2023</a> to cooperate with this process.
|
||||
<a href="https://www.preprints.org/manuscript/202406.0043/v1">A proposal
|
||||
to change the leap-second adjustments to Coordinated Universal Time</a>
|
||||
(doi:<a href="https://doi.org/10.1088/1681-7575/ad6266">10.1088/1681-7575/ad6266</a>)
|
||||
would replace leap seconds with 13-second leap smears occurring once per
|
||||
in 2023</a> to cooperate with this process. One proposal to implement this
|
||||
would replace leap seconds with seven 13-second leap smears occurring once per
|
||||
decade until 2100, with leap smears after that gradually increasing in size.
|
||||
See:
|
||||
<ul>
|
||||
<li>Levine J. <a href="https://www.preprints.org/manuscript/202406.0043">A
|
||||
proposal to change the leap-second adjustments to
|
||||
coordinated universal time</a>. <em>Metrologia.</em> 2024;61(5):055002. doi:<a
|
||||
href="https://doi.org/10.1088/1681-7575/ad6266">10.1088/1681-7575/ad6266</a>.</li>
|
||||
</ul>
|
||||
However, there is still no consensus on whether this is the best way
|
||||
to replace leap seconds.
|
||||
</li>
|
||||
@@ -1161,9 +1174,8 @@ to replace leap seconds.
|
||||
<li>The <a id="CLDR" href="https://cldr.unicode.org">Unicode Common Locale Data
|
||||
Repository (<abbr>CLDR</abbr>) Project</a> has localizations for time
|
||||
zone names, abbreviations, identifiers, and formats. For example, it
|
||||
contains French translations for "Eastern European Summer Time",
|
||||
"<abbr title="Eastern European Summer Time">EEST</abbr>", and
|
||||
"Bucharest". Its
|
||||
contains French translations for “Eastern European Summer Time”,
|
||||
“<abbr title="Eastern European Summer Time">EEST</abbr>”, and “Bucharest”. Its
|
||||
<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
|
||||
both <abbr title="Locale Data Markup Language">LDML</abbr>
|
||||
@@ -1174,13 +1186,13 @@ the international standard date and time notation</a> covers
|
||||
<a
|
||||
href="https://www.iso.org/standard/70907.html"><em><abbr
|
||||
title="International Organization for Standardization">ISO</abbr>
|
||||
8601-1:2019 – Date and time – Representations for information
|
||||
interchange – Part 1: Basic rules</em></a>.</li>
|
||||
8601-1:2019 – Date and time – Representations for information
|
||||
interchange – Part 1: Basic rules</em></a>.</li>
|
||||
<li>
|
||||
<a href="https://www.w3.org/TR/xmlschema/#dateTime"><abbr>XML</abbr>
|
||||
Schema: Datatypes – dateTime</a> specifies a format inspired by
|
||||
Schema: Datatypes – dateTime</a> specifies a format inspired by
|
||||
<abbr>ISO</abbr> 8601 that is in common use in <abbr>XML</abbr> data.</li>
|
||||
<li><a href="https://www.rfc-editor.org/rfc/rfc5322#section-3.3">§3.3 of
|
||||
<li><a href="https://www.rfc-editor.org/rfc/rfc5322#section-3.3">§3.3 of
|
||||
Internet Message Format</a> (Internet <abbr>RFC</abbr> 5322)
|
||||
specifies the time notation used in email and <a
|
||||
href="https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol"><abbr>HTTP</abbr></a>
|
||||
@@ -1193,7 +1205,7 @@ An extension, <a href="https://www.rfc-editor.org/rfc/rfc9557">Date
|
||||
and Time on the Internet: Timestamps with Additional Information</a>
|
||||
(Internet <abbr>RFC</abbr> 9557) extends this profile
|
||||
to let you specify the <code><abbr>tzdb</abbr></code> timezone of a timestamp
|
||||
via suffixes like "<code>[Asia/Tokyo]</code>".
|
||||
via suffixes like <code>[Asia/Tokyo]</code>.
|
||||
<li>
|
||||
<a href="https://web.archive.org/web/20190130042457/https://www.hackcraft.net/web/datetime/">Date & Time
|
||||
Formats on the Web</a> surveys web- and Internet-oriented date and time
|
||||
@@ -1201,17 +1213,17 @@ formats.</li>
|
||||
<li>Alphabetic time zone abbreviations should not be used as unique
|
||||
identifiers for <abbr>UT</abbr> offsets as they are ambiguous in
|
||||
practice. For example, in English-speaking North America
|
||||
"<abbr>CST</abbr>" denotes 6 hours behind <abbr>UT</abbr>,
|
||||
“<abbr>CST</abbr>” denotes 6 hours behind <abbr>UT</abbr>,
|
||||
but in China it denotes 8 hours ahead of <abbr>UT</abbr>,
|
||||
and French-speaking North Americans prefer
|
||||
"<abbr title="Heure Normale du Centre">HNC</abbr>" to
|
||||
"<abbr>CST</abbr>". The <code><abbr>tz</abbr></code>
|
||||
“<abbr title="Heure Normale du Centre">HNC</abbr>” to
|
||||
“<abbr>CST</abbr>”. The <code><abbr>tz</abbr></code>
|
||||
database contains English abbreviations for many timestamps;
|
||||
unfortunately some of these abbreviations were merely the database maintainers'
|
||||
unfortunately some of these abbreviations were merely the database maintainers’
|
||||
inventions, and these have been removed when possible.</li>
|
||||
<li>Numeric time zone abbreviations typically count hours east of
|
||||
<abbr>UT</abbr>, e.g., +09 for Japan and
|
||||
−10 for Hawaii. However, <abbr>POSIX</abbr> proleptic
|
||||
−10 for Hawaii. However, <abbr>POSIX</abbr> proleptic
|
||||
<code><abbr>TZ</abbr></code> settings use the opposite convention.
|
||||
For example, one might use <code><abbr>TZ</abbr>="<abbr
|
||||
title="Japan Standard Time">JST</abbr>-9"</code> and
|
||||
@@ -1225,7 +1237,7 @@ any future changes to the rules. One should never set
|
||||
<abbr>POSIX</abbr> <code><abbr>TZ</abbr></code> to a value like
|
||||
<code>"GMT-9"</code>, though, since this would incorrectly imply that
|
||||
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>
|
||||
</section>
|
||||
|
||||
@@ -1245,6 +1257,8 @@ This web page is in the public domain, so clarified as of
|
||||
<br>
|
||||
Please send corrections to this web page to the
|
||||
<a href="mailto:tz@iana.org">time zone mailing list</a>.
|
||||
The mailing list and its archives are public,
|
||||
so please do not send confidential information.
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
+24
-12
@@ -1,19 +1,31 @@
|
||||
#ifndef TZCONFIG_H_INCLUDED
|
||||
#define TZCONFIG_H_INCLUDED
|
||||
|
||||
#define TM_GMTOFF tm_gmtoff
|
||||
#define TM_ZONE tm_zone
|
||||
#define TM_GMTOFF tm_gmtoff
|
||||
#define TM_ZONE tm_zone
|
||||
|
||||
#define HAVE_GETTEXT false
|
||||
#define HAVE_SYS_STAT_H true
|
||||
#define HAVE_UNISTD_H true
|
||||
#define HAVE_STDINT_H true
|
||||
#define FREE_PRESERVES_ERRNO false
|
||||
#define HAVE_GETTEXT false
|
||||
#define HAVE_ISSETUGID true
|
||||
#define HAVE___ISTHREADED true
|
||||
#define HAVE_MEMPCPY true
|
||||
#define HAVE_PWD_H true
|
||||
#define HAVE_SETMODE true
|
||||
#define HAVE_STRUCT_STAT_ST_CTIM true
|
||||
#define HAVE_SYS_STAT_H true
|
||||
#define HAVE_UNISTD_H true
|
||||
#define HAVE_STDINT_H true
|
||||
#define OPENAT_TZDIR true
|
||||
#define THREAD_PREFER_SINGLE true
|
||||
#define THREAD_TM_MULTI true
|
||||
|
||||
#define PCTS 1
|
||||
#define NETBSD_INSPIRED 0
|
||||
#define STD_INSPIRED 1
|
||||
#define HAVE_TZNAME 2
|
||||
#define USG_COMPAT 2
|
||||
#define ALTZONE 0
|
||||
#define PCTS 1
|
||||
#define NETBSD_INSPIRED 0
|
||||
#define STD_INSPIRED 1
|
||||
#define HAVE_TZNAME 2
|
||||
#define USG_COMPAT 2
|
||||
#define ALTZONE 0
|
||||
|
||||
#define GRANDPARENTED "Local time zone must be set--use tzsetup"
|
||||
|
||||
#endif /* !TZCONFIG_H_INCLUDED */
|
||||
|
||||
+24
-6
@@ -1,6 +1,6 @@
|
||||
.\" This file is in the public domain, so clarified as of
|
||||
.\" 1996-06-05 by Arthur David Olson.
|
||||
.Dd December 15, 2022
|
||||
.Dd March 8, 2026
|
||||
.Dt TZFILE 5
|
||||
.Os
|
||||
.Sh NAME
|
||||
@@ -123,7 +123,7 @@ already support the POSIX-required range [\-24:59:59, 25:59:59].
|
||||
bytes that represent time zone designations,
|
||||
which are null-terminated byte strings, each indexed by the
|
||||
.Va tt_desigidx
|
||||
values mentioned above.
|
||||
values mentioned above, and each corresponding to a time zone abbreviation.
|
||||
The byte strings can overlap if one is a suffix of the other.
|
||||
The encoding of these strings is not specified.
|
||||
.It Va tzh_leapcnt
|
||||
@@ -170,14 +170,15 @@ for another time zone specified via
|
||||
a proleptic TZ string that lacks rules.
|
||||
For example, when TZ="EET\-2EEST" and there is no TZif file "EET\-2EEST",
|
||||
the idea was to adapt the transition times from a TZif file with the
|
||||
well-known name "posixrules" that is present only for this purpose and
|
||||
is a copy of the file "Europe/Brussels", a file with a different UT offset.
|
||||
well-known name "posixrules" that was present only for this purpose and
|
||||
was a copy of the file "Europe/Brussels", a file with a different UT offset.
|
||||
POSIX does not specify the details of this obsolete transformational behavior,
|
||||
the default rules are installation-dependent, and no implementation
|
||||
is known to support this feature for timestamps past 2037,
|
||||
so users desiring (say) Greek time should instead specify
|
||||
TZ="Europe/Athens" for better historical coverage, falling back on
|
||||
TZ="EET\-2EEST,M3.5.0/3,M10.5.0/4" if POSIX conformance is required
|
||||
TZ="EET\-2EEST,M3.5.0/3,M10.5.0/4"
|
||||
if conformance to POSIX.1-2017 or earlier is required
|
||||
and older timestamps need not be handled accurately.
|
||||
.Pp
|
||||
The
|
||||
@@ -203,6 +204,7 @@ after the last transition time stored in the file
|
||||
or for all instants if the file has no transitions.
|
||||
The TZ string is empty (i.e., nothing between the newlines)
|
||||
if there is no proleptic representation for such instants.
|
||||
.PP
|
||||
If non-empty, the TZ string must agree with the local time
|
||||
type after the last transition time if present in the eight-byte data;
|
||||
for example, given the string
|
||||
@@ -211,6 +213,10 @@ then if a last transition time is in July, the transition's local time
|
||||
type must specify a daylight-saving time abbreviated
|
||||
.Dq "WEST"
|
||||
that is one hour east of UT.
|
||||
.PP
|
||||
The TZ string can contain time zone abbreviations and UT offsets that
|
||||
do not appear elsewhere in the TZif file.
|
||||
.PP
|
||||
Also, if there is at least one transition, time type 0 is associated
|
||||
with the time period from the indefinite past up to but not including
|
||||
the earliest transition time.
|
||||
@@ -272,7 +278,7 @@ time, TZif readers should either refuse to process
|
||||
post-expiration timestamps, or process them as if the expiration
|
||||
time did not exist (possibly with an error indication).
|
||||
.Pp
|
||||
Time zone designations should consist of at least three (3)
|
||||
Time zone abbreviations should consist of at least three (3)
|
||||
and no more than six (6) ASCII characters from the set of
|
||||
alphanumerics,
|
||||
.Dq "\-" ,
|
||||
@@ -281,6 +287,10 @@ and
|
||||
This is for compatibility with POSIX requirements for
|
||||
time zone abbreviations.
|
||||
.Pp
|
||||
A numeric time zone abbreviation should match the UT offset.
|
||||
For example, "+0530" should be used only if the UT offset is 5.5 hours
|
||||
ahead of UT, and "\-00" should be used only if the UT offset is zero.
|
||||
.Pp
|
||||
When reading a version 2 or higher file, readers
|
||||
should ignore the version 1 header and data block except for
|
||||
the purpose of skipping over them.
|
||||
@@ -343,6 +353,14 @@ As a partial workaround, a writer can output more transitions
|
||||
than necessary, so that only far-future timestamps are
|
||||
mishandled by version 2 readers.
|
||||
.It
|
||||
Some readers might mishandle timestamps after a file's last transition,
|
||||
because they require that all abbreviations or UT offsets
|
||||
in the proleptic TZ string must also occur somewhere in the file's tables
|
||||
of time zone designations and local time type records.
|
||||
As a workaround, a writer can output more transitions than necessary,
|
||||
so that the other tables contain duplicates of the proleptic TZ string's
|
||||
abbreviations and offsets.
|
||||
.It
|
||||
Some readers designed for version 2 do not support
|
||||
permanent daylight saving time with transitions after 24:00
|
||||
\(en e.g., a TZ string
|
||||
|
||||
+11
-19
@@ -1,14 +1,12 @@
|
||||
/* Layout and location of TZif files. */
|
||||
|
||||
#ifndef TZFILE_H
|
||||
#define TZFILE_H
|
||||
|
||||
#define TZFILE_H
|
||||
|
||||
/*
|
||||
** This file is in the public domain, so clarified as of
|
||||
** 1996-06-05 by Arthur David Olson.
|
||||
**
|
||||
** $FreeBSD$
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -19,22 +17,14 @@
|
||||
** Thank you!
|
||||
*/
|
||||
|
||||
/*
|
||||
** Information about time zone files.
|
||||
*/
|
||||
|
||||
#ifndef TZDEFRULES
|
||||
# define TZDEFRULES "posixrules"
|
||||
#endif /* !defined TZDEFRULES */
|
||||
|
||||
|
||||
/* See Internet RFC 9636 for more details about the following format. */
|
||||
/* Information about time zone files.
|
||||
See Internet RFC 9636 for more details about the following format. */
|
||||
|
||||
/*
|
||||
** Each file begins with. . .
|
||||
*/
|
||||
|
||||
#define TZ_MAGIC "TZif"
|
||||
#define TZ_MAGIC "TZif"
|
||||
|
||||
struct tzhead {
|
||||
char tzh_magic[4]; /* TZ_MAGIC */
|
||||
@@ -99,23 +89,25 @@ struct tzhead {
|
||||
*/
|
||||
|
||||
#ifndef TZ_MAX_TIMES
|
||||
/* This must be at least 242 for Europe/London with 'zic -b fat'. */
|
||||
/* The following limit applies to localtime.c; zic has no such limit.
|
||||
The limit must be at least 310 for Asia/Hebron with 'zic -b fat'. */
|
||||
# define TZ_MAX_TIMES 2000
|
||||
#endif /* !defined TZ_MAX_TIMES */
|
||||
|
||||
#ifndef TZ_MAX_TYPES
|
||||
/* This must be at least 18 for Europe/Vilnius with 'zic -b fat'. */
|
||||
# define TZ_MAX_TYPES 256 /* Limited by what (unsigned char)'s can hold */
|
||||
# define TZ_MAX_TYPES 256 /* Limited to 256 by Internet RFC 9636. */
|
||||
#endif /* !defined TZ_MAX_TYPES */
|
||||
|
||||
#ifndef TZ_MAX_CHARS
|
||||
/* This must be at least 40 for America/Anchorage. */
|
||||
# define TZ_MAX_CHARS 50 /* Maximum number of abbreviation characters */
|
||||
/* (limited by what unsigned chars can hold) */
|
||||
# define TZ_MAX_CHARS 256 /* Maximum number of abbreviation characters */
|
||||
/* (limited to 256 by Internet RFC 9636) */
|
||||
#endif /* !defined TZ_MAX_CHARS */
|
||||
|
||||
#ifndef TZ_MAX_LEAPS
|
||||
/* This must be at least 27 for leap seconds from 1972 through mid-2023.
|
||||
/* The following limit applies to localtime.c; zic has no such limit.
|
||||
The limit must be at least 27 for leap seconds from 1972 through mid-2023.
|
||||
There's a plan to discontinue leap seconds by 2035. */
|
||||
# define TZ_MAX_LEAPS 50 /* Maximum number of leap second corrections */
|
||||
#endif /* !defined TZ_MAX_LEAPS */
|
||||
|
||||
@@ -145,9 +145,11 @@ do
|
||||
t*) # Undocumented option, used for developer testing.
|
||||
zonetabtype=$OPTARG;;
|
||||
-help)
|
||||
exec echo "$usage";;
|
||||
say "$usage"
|
||||
exit;;
|
||||
-version)
|
||||
exec echo "tzselect $PKGVERSION$TZVERSION";;
|
||||
say "tzselect $PKGVERSION$TZVERSION"
|
||||
exit;;
|
||||
-*)
|
||||
say >&2 "$0: -$opt$OPTARG: unknown option; try '$0 --help'"; exit 1;;
|
||||
*)
|
||||
@@ -161,15 +163,15 @@ case $# in
|
||||
*) say >&2 "$0: $1: unknown argument"; exit 1
|
||||
esac
|
||||
|
||||
# translit=true to try transliteration.
|
||||
# translit=: to try transliteration.
|
||||
# This is false if U+12345 CUNEIFORM SIGN URU TIMES KI has length 1
|
||||
# which means the shell and (presumably) awk do not need transliteration.
|
||||
# It is true if the byte string has some other length in characters, or
|
||||
# It is ':' if the byte string has some other length in characters, or
|
||||
# if this is a POSIX.1-2017 or earlier shell that does not support $'...'.
|
||||
CUNEIFORM_SIGN_URU_TIMES_KI=$'\360\222\215\205'
|
||||
if test ${#CUNEIFORM_SIGN_URU_TIMES_KI} = 1
|
||||
then translit=false
|
||||
else translit=true
|
||||
else translit=:
|
||||
fi
|
||||
|
||||
# Read into shell variable $1 the contents of file $2.
|
||||
@@ -516,8 +518,7 @@ while
|
||||
' ="$distance_table"
|
||||
)
|
||||
echo >&2 'Please select one of the following timezones,'
|
||||
echo >&2 'listed roughly in increasing order' \
|
||||
"of distance from $coord".
|
||||
say >&2 "listed roughly in increasing order of distance from $coord."
|
||||
doselect $regions
|
||||
region=$select_result
|
||||
tz=$(
|
||||
|
||||
@@ -1 +1 @@
|
||||
2025b
|
||||
2026a
|
||||
|
||||
+26
-10
@@ -4,17 +4,35 @@
|
||||
# This file is in the public domain, so clarified as of
|
||||
# 2009-05-17 by Arthur David Olson.
|
||||
|
||||
if (type nroff && type perl) >/dev/null 2>&1; then
|
||||
manflags=
|
||||
while
|
||||
case $1 in
|
||||
-*) :;;
|
||||
*) false;;
|
||||
esac
|
||||
do
|
||||
manflags="$manflags $1"
|
||||
shift
|
||||
done
|
||||
|
||||
# Tell groff not to emit SGR escape sequences (ANSI color escapes).
|
||||
export GROFF_NO_SGR=1
|
||||
|
||||
echo ".am TH
|
||||
.hy 0
|
||||
groff="groff -dAD=l -rHY=0 $manflags -mtty-char -man -ww -P-bcou"
|
||||
if ($groff) </dev/null >/dev/null 2>&1; then
|
||||
$groff "$@"
|
||||
elif (type mandoc && type col) >/dev/null 2>&1; then
|
||||
mandoc $manflags -man "$@" | col -bx
|
||||
elif (type nroff && type perl) >/dev/null 2>&1; then
|
||||
printf '%s\n' '.
|
||||
.\" Left-adjust and do not hyphenate.
|
||||
.am TH
|
||||
.na
|
||||
.hy 0
|
||||
..
|
||||
.\" Omit internal page headers and footers.
|
||||
.\" Unfortunately this also omits the starting header and ending footer,
|
||||
.\" but that is the best old nroff can easily do.
|
||||
.rm }H
|
||||
.rm }F" | nroff -man - ${1+"$@"} | perl -ne '
|
||||
.rm }F
|
||||
.' | nroff -man - "$@" | perl -ne '
|
||||
binmode STDIN, '\'':encoding(utf8)'\'';
|
||||
binmode STDOUT, '\'':encoding(utf8)'\'';
|
||||
chomp;
|
||||
@@ -32,9 +50,7 @@ if (type nroff && type perl) >/dev/null 2>&1; then
|
||||
$didprint = 1;
|
||||
}
|
||||
'
|
||||
elif (type mandoc && type col) >/dev/null 2>&1; then
|
||||
mandoc -man -T ascii "$@" | col -bx
|
||||
else
|
||||
echo >&2 "$0: please install nroff and perl, or mandoc and col"
|
||||
printf >&2 '%s\n' "$0: please install groff, or mandoc and col"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
+9
-12
@@ -61,13 +61,6 @@ enum { SECSPER400YEARS_FITS = SECSPERLYEAR <= INTMAX_MAX / 400 };
|
||||
# define timezone_t char **
|
||||
#endif
|
||||
|
||||
#if !HAVE_POSIX_DECLS
|
||||
extern int getopt(int argc, char * const argv[],
|
||||
const char * options);
|
||||
extern char * optarg;
|
||||
extern int optind;
|
||||
#endif
|
||||
|
||||
/* The minimum and maximum finite time values. */
|
||||
enum { atime_shift = CHAR_BIT * sizeof(time_t) - 2 };
|
||||
static time_t const absolute_min_time =
|
||||
@@ -130,7 +123,8 @@ size_overflow(void)
|
||||
|
||||
/* Return A + B, exiting if the result would overflow either ptrdiff_t
|
||||
or size_t. A and B are both nonnegative. */
|
||||
ATTRIBUTE_PURE_114833 static ptrdiff_t
|
||||
ATTRIBUTE_PURE_114833_HACK
|
||||
static ptrdiff_t
|
||||
sumsize(ptrdiff_t a, ptrdiff_t b)
|
||||
{
|
||||
#ifdef ckd_add
|
||||
@@ -929,6 +923,7 @@ my_snprintf(char *s, size_t size, char const *format, ...)
|
||||
int n;
|
||||
va_list args;
|
||||
char const *arg;
|
||||
char *cp;
|
||||
size_t arglen, slen;
|
||||
char buf[1024];
|
||||
va_start(args, format);
|
||||
@@ -945,8 +940,9 @@ my_snprintf(char *s, size_t size, char const *format, ...)
|
||||
arglen = n;
|
||||
}
|
||||
slen = arglen < size ? arglen : size - 1;
|
||||
memcpy(s, arg, slen);
|
||||
s[slen] = '\0';
|
||||
cp = s;
|
||||
cp = mempcpy(cp, arg, slen);
|
||||
*cp = '\0';
|
||||
n = arglen <= INT_MAX ? arglen : -1;
|
||||
va_end(args);
|
||||
return n;
|
||||
@@ -1075,8 +1071,9 @@ istrftime(char *buf, ptrdiff_t size, char const *time_fmt,
|
||||
char fbuf[100];
|
||||
bool oversized = sizeof fbuf <= (size_t)f_prefix_copy_size;
|
||||
char *f_prefix_copy = oversized ? xmalloc(f_prefix_copy_size) : fbuf;
|
||||
memcpy(f_prefix_copy, f, f_prefix_len);
|
||||
strcpy(f_prefix_copy + f_prefix_len, "X");
|
||||
char *cp = f_prefix_copy;
|
||||
cp = mempcpy(cp, f, f_prefix_len);
|
||||
strcpy(cp, "X");
|
||||
formatted_len = strftime(b, s, f_prefix_copy, tm);
|
||||
if (oversized)
|
||||
free(f_prefix_copy);
|
||||
|
||||
+59
-26
@@ -1,6 +1,6 @@
|
||||
.\" This file is in the public domain, so clarified as of
|
||||
.\" 2009-05-17 by Arthur David Olson.
|
||||
.Dd January 21, 2023
|
||||
.Dd March 8, 2026
|
||||
.Dt ZIC 8
|
||||
.Os
|
||||
.Sh NAME
|
||||
@@ -13,7 +13,6 @@
|
||||
.Op Fl Dsv
|
||||
.Op Fl b Ar slim | fat
|
||||
.Op Fl d Ar directory
|
||||
.Op Fl g Ar gid
|
||||
.Op Fl l Ar localtime
|
||||
.Op Fl L Ar leapseconds
|
||||
.Op Fl m Ar mode
|
||||
@@ -25,7 +24,7 @@
|
||||
.Oc
|
||||
.Op Fl R @ Ns Ar hi
|
||||
.Op Fl t Ar localtime-link
|
||||
.Op Fl u Ar uid
|
||||
.Op Fl u Ar owner Ns Op Li : Ns Ar group
|
||||
.Op Ar filename ...
|
||||
.Sh DESCRIPTION
|
||||
The
|
||||
@@ -54,7 +53,7 @@ is
|
||||
.Cm fat ,
|
||||
generate additional data entries that work around potential bugs or
|
||||
incompatibilities in older software, such as software that mishandles
|
||||
the 64-bit generated data.
|
||||
a TZif file's 64-bit data or proleptic TZ string.
|
||||
If
|
||||
.Ar bloat
|
||||
is
|
||||
@@ -63,13 +62,18 @@ keep the output files small; this can help check for the bugs
|
||||
and incompatibilities.
|
||||
The default is
|
||||
.Cm slim ,
|
||||
as software that mishandles 64-bit data typically
|
||||
mishandles timestamps after the year 2038 anyway.
|
||||
as the
|
||||
.Cm fat
|
||||
workarounds are typically good only until the year 2038 anyway.
|
||||
Also see the
|
||||
.Fl r
|
||||
option for another way to alter output size.
|
||||
.It Fl D
|
||||
Do not create directories.
|
||||
Do not create ancestor directories of output files,
|
||||
For example, for a zone named America/Los_Angeles
|
||||
the directory America should already exist.
|
||||
By default, the directory and its ancestors are created
|
||||
if they do not already exist.
|
||||
.It Fl d Ar directory
|
||||
Create time conversion information files in the named directory rather than
|
||||
in the standard directory named below.
|
||||
@@ -93,18 +97,10 @@ any already-existing link is removed.
|
||||
.It Fl L Ar filename
|
||||
Read leap second information from the file with the given name.
|
||||
If this option is not used,
|
||||
no leap second information appears in output files.
|
||||
no leap second information appears in output files;
|
||||
this is required by some TZif readers.
|
||||
.It Fl p Ar timezone
|
||||
Use
|
||||
.Ar timezone 's
|
||||
rules when handling nonstandard
|
||||
TZ strings like
|
||||
.Dq "EET\-2EEST"
|
||||
that lack transition rules.
|
||||
The
|
||||
.Nm
|
||||
utility
|
||||
will act as if the input contained a link line of the form
|
||||
Act as if the input contained a link line of the form
|
||||
.Bd -literal -offset indent
|
||||
Link \fItimezone\fP posixrules
|
||||
.Ed
|
||||
@@ -119,13 +115,33 @@ Unless
|
||||
.Ar timezone
|
||||
is
|
||||
.Dq "\-" ,
|
||||
this option is obsolete and poorly supported.
|
||||
this option is obsolete and is no longer supported by most runtimes.
|
||||
Among other things it should not be used for timestamps after the year 2037,
|
||||
and it should not be combined with
|
||||
.Fl b Cm slim
|
||||
if
|
||||
.Ar timezone 's
|
||||
transitions are at standard time or Universal Time (UT) instead of local time.
|
||||
The option is present only to support obsolete runtimes that used
|
||||
.Ar timezone 's
|
||||
rules when handling obsolescent
|
||||
TZ strings like "AST4ADT" that lack transition rules;
|
||||
modern runtimes that support these TZ strings
|
||||
typically just use current US rules
|
||||
as the TZ strings were mainly used in the US.
|
||||
Similarly, any Zone or Link named "posixrules" is obsolete and problematic.
|
||||
.It Fl m Ar mode
|
||||
Create TZif files with the given file mode bits.
|
||||
By default the files are created with mode 644 as modified by the umask.
|
||||
With this option they are created with the given mode instead.
|
||||
For portability the mode should be an unsigned octal integer,
|
||||
typically 644 or 444;
|
||||
some platforms also support
|
||||
.Xr chmod 1 -style
|
||||
symbolic modes.
|
||||
This option does not affect created ancestor directories,
|
||||
which have mode 755 as modified by the umask.
|
||||
The option is ignored on platforms lacking the notion of file mode bits.
|
||||
.It Fl r Oo @ Ns Ar lo Oc Ns Oo /@ Ns Ar hi Oc
|
||||
Limit the applicability of output files
|
||||
to timestamps in the range from
|
||||
@@ -177,6 +193,18 @@ it increases the size of the altered output files.
|
||||
.It Fl t Ar file
|
||||
When creating local time information, put the configuration link in
|
||||
the named file rather than in the standard location.
|
||||
.It Fl u Ar owner Ns Op Li : Ns Ar group
|
||||
Change the output regular files' owner and group to those specified.
|
||||
The
|
||||
.Ar owner
|
||||
is either a user name, or an unsigned decimal integer user ID,
|
||||
or an empty string meaning no change to the owner.
|
||||
The
|
||||
.Ar group
|
||||
is similar for group names and IDs.
|
||||
This option does not affect directories or hard or symbolic links.
|
||||
It typically needs special privileges to change ownership,
|
||||
and is ignored on platforms that lack the notions of owners and groups.
|
||||
.It Fl v
|
||||
Be more verbose, and complain about the following situations:
|
||||
.Bl -bullet
|
||||
@@ -283,8 +311,10 @@ zero or more lines, each ending in a newline byte and containing at
|
||||
most 2048 bytes counting the newline, and without any NUL bytes.
|
||||
The input text's encoding
|
||||
is typically UTF-8 or ASCII; it should have a unibyte representation
|
||||
for the POSIX Portable Character Set (PPCS)
|
||||
\*<https://pubs\*:.opengroup\*:.org/\*:onlinepubs/\*:9699919799/\*:basedefs/\*:V1_chap06\*:.html\*>
|
||||
for the
|
||||
.UR https://\:pubs\:.opengroup\:.org/\:onlinepubs/\:9799919799/\:basedefs/\:V1_chap06\:.html
|
||||
POSIX Portable Character Set (PPCS)
|
||||
.UE
|
||||
and the encoding's non-unibyte characters should consist entirely of
|
||||
non-PPCS bytes.
|
||||
Non-PPCS characters typically occur only in comments:
|
||||
@@ -319,12 +349,12 @@ A name can be abbreviated by omitting all but an initial prefix; any
|
||||
abbreviation must be unambiguous in context.
|
||||
.Pp
|
||||
A rule line has the form
|
||||
.Bd -literal -offset indent
|
||||
.Bd -literal
|
||||
Rule NAME FROM TO \- IN ON AT SAVE LETTER/S
|
||||
.Ed
|
||||
.Pp
|
||||
For example:
|
||||
.Bd -literal -offset indent
|
||||
.Bd -literal
|
||||
Rule US 1967 1973 \- Apr lastSun 2:00w 1:00d D
|
||||
.Ed
|
||||
.Pp
|
||||
@@ -663,11 +693,14 @@ Zone America/Menominee -5:00 - EST 1973 Apr 29 2:00
|
||||
-6:00 US C%sT
|
||||
.Ed
|
||||
Here, an incorrect reading would be there were two clock changes on 1973-04-29,
|
||||
the first from 02:00 EST (\-05) to 01:00 CST (\-06),
|
||||
and the second an hour later from 02:00 CST (\-06) to 03:00 CDT (\-05).
|
||||
the first from 02:00 EST (\-05) to 01:00 CST (\-06) according to the
|
||||
.q "until"
|
||||
value in the zone line,
|
||||
and the second an hour later from 02:00 CST (\-06) to 03:00 CDT (\-05)
|
||||
according to the values in the April rule line.
|
||||
However,
|
||||
.Nm
|
||||
interprets this more sensibly as a single transition from 02:00 CST (\-05) to
|
||||
interprets this more sensibly as a single transition from 02:00 EST (\-05) to
|
||||
02:00 CDT (\-05).
|
||||
.Pp
|
||||
A link line has the form
|
||||
|
||||
+470
-313
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user