Skip to content

Commit 5797f88

Browse files
committed
Squashed 'tz/' changes from c4eb3fcf2..623631d84
d3dc2a9d6 Release 2022f 2050724fa Most of Mexico will no longer observe DST 4b85935bd * NEWS: Tweak Ontario commentary. 45e1ad619 Fix usage of __has_include 44f77c4fb Fix recently-introduced zic infloop 21b8279fc Omit _LARGE_FILES, _DARWIN_USE_64_BIT_INODE cfb514be7 Don’t include <sys/type.h> 918650731 Fiji no longer observes DST fdd270534 Fix zdump undefined behavior if !USE_LTZ 979b1c401 * zic.c (S_ISLNK) [!HAVE_SYMLINK]: Remove no-longer-used macro. 127469a6a Default time_t to 64 bits on glibc 2.34+ 32-bit 3c87cfcc1 * zic.c: No space before paren caa9ae32d Tune qsort usage slightly bbbb46c76 Remove zic workaround for Qt bug 53071 e2effc43c Port zic.c better to non-2’s-complement b19d522e4 Avoid macros in zic.c when easy 0eff62a6d Prefer C23 'alignof' to C11 '_Alignof' 9242f6c08 Remove duplicate HAVE_GENERIC definition 859973290 Preserve columns more nicely in vanguard form 243ed3c1d Avoid undefined behavior if no Link lines 3620a330c Vanguard form now uses links to links 4878b644b zic now supports links to links d04a4b310 Improve zic -v performance on links to links 846c28d0e Refactor zic to record input line order ff1ea7b00 Fix line number in “link to link” diagnostic 0733c65c1 Improve randomness of zic temp file names 53943486d Use C23 'unreachable' if available e5b2ee634 Use C23 __has_include if available 6566d3d11 Port better to C23 bool c1466b283 Coalesce some commentary 164727dad Improve checking for shortcut links 34c466276 Reorder 'backward’ 02fc17f6b Move most remaining links to ‘backward’ 02fb5dae5 Move a few links to ‘backward’ b494c1c43 Fix typos in previous change 2cf08a797 Simplify four Ontario zones into one 38e002402 * Makefile: Warn about bugs triggered by -b fat. cd8e42fd8 Fix Y2438 bug when reading fat TZif files git-subtree-dir: tz git-subtree-split: 623631d84606c4e9517edc67cd406c6b1fd389cb
1 parent 872168c commit 5797f88

22 files changed

+1191
-824
lines changed

Makefile

Lines changed: 26 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,8 @@ LDLIBS=
210210
# -DHAVE_DECL_ENVIRON if <unistd.h> declares 'environ'
211211
# -DHAVE_DIRECT_H if mkdir needs <direct.h> (MS-Windows)
212212
# -DHAVE_GENERIC=0 if _Generic does not work
213-
# -DHAVE_GETTEXT if 'gettext' works (e.g., GNU/Linux, FreeBSD, Solaris)
213+
# -DHAVE_GETRANDOM if getgrandom works (e.g., GNU/Linux)*
214+
# -DHAVE_GETTEXT if 'gettext' works (e.g., GNU/Linux, FreeBSD, Solaris)*
214215
# -DHAVE_INCOMPATIBLE_CTIME_R if your system's time.h declares
215216
# ctime_r and asctime_r incompatibly with the POSIX standard
216217
# (Solaris when _POSIX_PTHREAD_SEMANTICS is not defined).
@@ -222,16 +223,17 @@ LDLIBS=
222223
# -DHAVE_MALLOC_ERRNO=0 if malloc etc. do not set errno on failure.
223224
# -DHAVE_POSIX_DECLS=0 if your system's include files do not declare
224225
# functions like 'link' or variables like 'tzname' required by POSIX
226+
# -DHAVE_SETENV=0 if your system lacks the setenv function
225227
# -DHAVE_SNPRINTF=0 if your system lacks the snprintf function
226-
# -DHAVE_STDBOOL_H if you have a non-C99 compiler with <stdbool.h>
227-
# -DHAVE_STDINT_H if you have a non-C99 compiler with <stdint.h>
228+
# -DHAVE_STDINT_H if you have a non-C99 compiler with <stdint.h>*
228229
# -DHAVE_STRFTIME_L if <time.h> declares locale_t and strftime_l
229230
# -DHAVE_STRDUP=0 if your system lacks the strdup function
230231
# -DHAVE_STRTOLL=0 if your system lacks the strtoll function
231232
# -DHAVE_SYMLINK=0 if your system lacks the symlink function
232-
# -DHAVE_SYS_STAT_H=0 if your compiler lacks a <sys/stat.h>
233+
# -DHAVE_SYS_STAT_H=0 if your compiler lacks a <sys/stat.h>*
233234
# -DHAVE_TZSET=0 if your system lacks a tzset function
234-
# -DHAVE_UNISTD_H=0 if your compiler lacks a <unistd.h>
235+
# -DHAVE_UNISTD_H=0 if your compiler lacks a <unistd.h>*
236+
# -DHAVE_UTMPX_H=0 if your compiler lacks a <utmpx.h>*
235237
# -Dlocale_t=XXX if your system uses XXX instead of locale_t
236238
# -DRESERVE_STD_EXT_IDS if your platform reserves standard identifiers
237239
# with external linkage, e.g., applications cannot define 'localtime'.
@@ -254,14 +256,17 @@ LDLIBS=
254256
# Also set TZDOBJS=zdump.o and CHECK_TIME_T_ALTERNATIVES= below.
255257
# -DZIC_BLOAT_DEFAULT=\"fat\" to default zic's -b option to "fat", and
256258
# similarly for "slim". Fat TZif files work around incompatibilities
257-
# and bugs in some TZif readers, notably readers that mishandle 64-bit
258-
# data in TZif files. Slim TZif files are more efficient and do not
259-
# work around these incompatibilities and bugs. If not given, the
260-
# default is "slim".
259+
# and bugs in some TZif readers, notably older ones that
260+
# ignore or otherwise mishandle 64-bit data in TZif files;
261+
# however, fat TZif files may trigger bugs in newer TZif readers.
262+
# Slim TZif files are more efficient, and are the default.
261263
# -DZIC_MAX_ABBR_LEN_WO_WARN=3
262264
# (or some other number) to set the maximum time zone abbreviation length
263265
# that zic will accept without a warning (the default is 6)
264266
# $(GCC_DEBUG_FLAGS) if you are using recent GCC and want lots of checking
267+
#
268+
# * Options marked "*" can be omitted if your compiler is C23 compatible.
269+
#
265270
# Select instrumentation via "make GCC_INSTRUMENT='whatever'".
266271
GCC_INSTRUMENT = \
267272
-fsanitize=undefined -fsanitize-address-use-after-scope \
@@ -397,8 +402,9 @@ ZIC= $(zic) $(ZFLAGS)
397402

398403
# To shrink the size of installed TZif files,
399404
# append "-r @N" to omit data before N-seconds-after-the-Epoch.
400-
# To grow the files and work around older application bugs, append "-b fat";
401-
# see ZIC_BLOAT_DEFAULT above.
405+
# To grow the files and work around bugs in older applications,
406+
# possibly at the expense of introducing bugs in newer ones,
407+
# append "-b fat"; see ZIC_BLOAT_DEFAULT above.
402408
# See the zic man page for more about -b and -r.
403409
ZFLAGS=
404410

@@ -818,13 +824,19 @@ check_slashed_abbrs: $(TDATA_TO_CHECK)
818824
CHECK_CC_LIST = { n = split($$1,a,/,/); for (i=2; i<=n; i++) print a[1], a[i]; }
819825
820826
check_sorted: backward backzone iso3166.tab zone.tab zone1970.tab
821-
$(AWK) '/^Link/ {print $$3}' backward | LC_ALL=C sort -cu
827+
$(AWK) '/^Link/ {printf "%.5d %s\n", g, $$3} /^$$/ {g++}' \
828+
backward | LC_ALL=C sort -cu
822829
$(AWK) '/^Zone/ {print $$2}' backzone | LC_ALL=C sort -cu
823830
touch $@
824831
825832
check_links: checklinks.awk $(TDATA_TO_CHECK) tzdata.zi
826-
$(AWK) -f checklinks.awk $(TDATA_TO_CHECK)
827-
$(AWK) -f checklinks.awk tzdata.zi
833+
$(AWK) \
834+
-v DATAFORM=$(DATAFORM) \
835+
-v backcheck=backward \
836+
-f checklinks.awk $(TDATA_TO_CHECK)
837+
$(AWK) \
838+
-v DATAFORM=$(DATAFORM) \
839+
-f checklinks.awk tzdata.zi
828840
touch $@
829841
830842
check_tables: checktab.awk $(YDATA) backward $(ZONETABLES)

NEWS

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,106 @@
11
News for the tz database
22

3+
Release 2022f - 2022-10-28 18:04:57 -0700
4+
5+
Briefly:
6+
Mexico will no longer observe DST except near the US border.
7+
Chihuahua moves to year-round -06 on 2022-10-30.
8+
Fiji no longer observes DST.
9+
Move links to 'backward'.
10+
In vanguard form, GMT is now a Zone and Etc/GMT a link.
11+
zic now supports links to links, and vanguard form uses this.
12+
Simplify four Ontario zones.
13+
Fix a Y2438 bug when reading TZif data.
14+
Enable 64-bit time_t on 32-bit glibc platforms.
15+
Omit large-file support when no longer needed.
16+
In C code, use some C23 features if available.
17+
Remove no-longer-needed workaround for Qt bug 53071.
18+
19+
Changes to future timestamps.
20+
21+
Mexico will no longer observe DST after 2022, except for areas
22+
near the US border that continue to observe US DST rules.
23+
On 2022-10-30 at 02:00 the Mexican state of Chihuahua moves
24+
from -07 (-06 with DST) to year-round -06, thus not changing
25+
its clocks that day. The new law states that Chihuahua
26+
near the US border no longer observes US DST.
27+
28+
Fiji will not observe DST in 2022/3. (Thanks to Shalvin Narayan.)
29+
For now, assume DST is suspended indefinitely.
30+
31+
Changes to data
32+
33+
Move links to 'backward' to ease and simplify link maintenance.
34+
This affects generated data only if you use 'make BACKWARD='.
35+
36+
GMT is now a Zone and Etc/GMT a link instead of vice versa,
37+
as GMT is needed for leap second support whereas Etc/GMT is not.
38+
However, this change exposes a bug in TZUpdater 2.3.2 so it is
39+
present only in vanguard form for now.
40+
41+
Vanguard form now uses links to links, as zic now supports this.
42+
43+
Changes to past timestamps
44+
45+
Simplify four Ontario zones, as most of the post-1970 differences
46+
seem to have been imaginary. (Problem reported by Chris Walton.)
47+
Move America/Nipigon, America/Rainy_River, and America/Thunder_Bay
48+
to 'backzone'; backward-compatibility links still work, albeit
49+
with some different timestamps before November 2005.
50+
51+
Changes to code
52+
53+
zic now supports links to links regardless of input line order.
54+
For example, if Australia/Sydney is a Zone, the lines
55+
Link Australia/Canberra Australia/ACT
56+
Link Australia/Sydney Australia/Canberra
57+
now work correctly, even though the shell commands
58+
ln Australia/Canberra Australia/ACT
59+
ln Australia/Sydney Australia/Canberra
60+
would fail because the first command attempts to use a link
61+
Australia/Canberra that does not exist until after the second
62+
command is executed. Previously, zic had unspecified behavior if
63+
a Link line's target was another link, and zic often misbehaved if
64+
a Link line's target was a later Link line.
65+
66+
Fix line number in zic's diagnostic for a link to a link.
67+
68+
Fix a bug that caused localtime to mishandle timestamps starting
69+
in the year 2438 when reading data generated by 'zic -b fat' when
70+
distant-future DST transitions occur at times given in standard
71+
time or in UT, not the usual case of local time. This occurs when
72+
the corresponding .zi Rule lines specify DST transitions with TO
73+
columns of 'max' and AT columns that end in 's' or 'u'. The
74+
number 2438 comes from the 32-bit limit in the year 2038, plus the
75+
400-year Gregorian cycle. (Problem reported by Bradley White.)
76+
77+
On glibc 2.34 and later, which optionally supports 64-bit time_t
78+
on platforms like x86 where time_t was traditionally 32 bits,
79+
default time_t to 64 instead of 32 bits. This lets functions like
80+
localtime support timestamps after the year 2038, and fixes
81+
year-2038 problems in zic when accessing files dated after 2038.
82+
To continue to limit time_t to 32 bits on these platforms, use
83+
"make CFLAGS='-D_TIME_BITS=32'".
84+
85+
In C code, do not enable large-file support on platforms like AIX
86+
and macOS that no longer need it now that tzcode does not use
87+
off_t or related functions like 'stat'. Large-file support is
88+
still enabled by default on GNU/Linux, as it is needed for 64-bit
89+
time_t support.
90+
91+
In C code, prefer C23 keywords to pre-C23 macros for alignof,
92+
bool, false, and true. Also, use the following C23 features if
93+
available: __has_include, unreachable.
94+
95+
zic no longer works around Qt bug 53071, as the relevant Qt
96+
releases have been out of support since 2019. This change affects
97+
only fat TZif files, as thin files never had the workaround.
98+
99+
zdump no longer modifies the environ vector when compiled on
100+
platforms lacking tm_zone or when compiled with -DUSE_LTZ=0.
101+
This avoid undefined behavior on POSIX platforms.
102+
103+
3104
Release 2022e - 2022-10-11 11:13:02 -0700
4105

5106
Briefly:

0 commit comments

Comments
 (0)