Skip to content

Commit 1ece96d

Browse files
committed
Update tzcode to 2022g
1 parent 5105950 commit 1ece96d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+17849
-9617
lines changed

tz/BINFILES

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# This file gets included by the Makefile in this directory to determine
22
# the files that should go only into binary distributions.
33

4-
BINFILES = tzinit tzselect zdump zic yearistype
4+
BINFILES = tzinit tzselect zdump zic

tz/LICENSE

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Unless specified below, all files in the tz code and data (including
2+
this LICENSE file) are in the public domain.
3+
4+
If the files date.c, newstrftime.3, and strftime.c are present, they
5+
contain material derived from BSD and use the BSD 3-clause license.

tz/MISCFILES

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
MISCFILES = Arts.htm README README.1st Theory WWW.htm \
55
africa antarctica asia australasia backward \
66
checktab.awk etcetera europe factory iso3166.tab leapseconds \
7-
northamerica pacificnew solar87 solar88 solar89 southamerica \
8-
systemv tzfile.5 tzinit.8 tzselect.8 tzselect.ksh usno1988 usno1989 \
9-
usno1989a usno1995 usno1997 usno1998 yearistype.sh \
7+
northamerica solar87 solar88 solar89 southamerica \
8+
tzfile.5 tzinit.8 tzselect.8 tzselect.ksh usno1988 usno1989 \
9+
usno1989a usno1995 usno1997 usno1998 \
1010
zdump.8 zic.8 zone.tab zone1970.tab zonelist

tz/Makefile

Lines changed: 90 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#
1111
# currently also duplicated at top of private.h; FIXME
1212
#
13-
TZVERSION = 2018e
13+
TZVERSION = 2022g
1414
TZ_BUGEMAIL = tz@iana.org
1515
PKGVERSION = mintlib
1616

@@ -39,15 +39,50 @@ include $(top_srcdir)/checkrules
3939
cflags =
4040
type =
4141

42+
# Change the line below for your timezone (after finding the one you want in
43+
# one of the $(TDATA) source files, or adding it to a source file).
44+
# Alternatively, if you discover you've got the wrong timezone, you can just
45+
# 'zic -l -' to remove it, or 'zic -l rightzone' to change it.
46+
# Use the command
47+
# make zonenames
48+
# to get a list of the values you can use for LOCALTIME.
49+
50+
LOCALTIME= Factory
51+
52+
# The POSIXRULES macro controls interpretation of nonstandard and obsolete
53+
# POSIX-like TZ settings like TZ='EET-2EEST' that lack DST transition rules.
54+
# Such a setting uses the rules in a template file to determine
55+
# "spring forward" and "fall back" days and times; the environment
56+
# variable itself specifies UT offsets of standard and daylight saving time.
57+
#
58+
# If POSIXRULES is '-', no template is installed; this is the default.
59+
#
60+
# Any other value for POSIXRULES is obsolete and should not be relied on, as:
61+
# * It does not work correctly in popular implementations such as GNU/Linux.
62+
# * It does not work even in tzcode, except for historical timestamps
63+
# that precede the last explicit transition in the POSIXRULES file.
64+
# Hence it typically does not work for current and future timestamps.
65+
# In short, software should avoid ruleless settings like TZ='EET-2EEST'
66+
# and so should not depend on the value of POSIXRULES.
67+
#
68+
# If, despite the above, you want a template for handling these settings,
69+
# you can change the line below (after finding the timezone you want in the
70+
# one of the $(TDATA) source files, or adding it to a source file).
71+
# Alternatively, if you discover you've got the wrong timezone, you can just
72+
# 'zic -p -' to remove it, or 'zic -p rightzone' to change it.
73+
# Use the command
74+
# make zonenames
75+
# to get a list of the values you can use for POSIXRULES.
76+
77+
# for MiNT it is defined in configvars
78+
# POSIXRULES= -
79+
4280
-include /etc/sparemint/timezone
4381
ifdef TIMEZONE
4482
LOCALTIME = $(TIMEZONE)
4583
POSIXRULES = $(TIMEZONE)
4684
endif
4785

48-
# Since "." may not be in PATH...
49-
YEARISTYPE = ./yearistype
50-
5186
ifeq ($(CROSS),yes)
5287

5388
zic = ./zic_for_build$(EXEEXT_FOR_BUILD)
@@ -84,14 +119,21 @@ TZDOBJS = zdump.o
84119
TZIOBJS = tzinit.o
85120

86121
MANS = tzfile.5 tzselect.8 zic.8 zdump.8 tzinit.8
87-
DOCS = README README.1st Theory $(MANS) Makefile
122+
DOCS = README SECURITY README.1st Theory $(MANS) Makefile
88123

89-
# If you want out-of-scope and often-wrong data from the file 'backzone', use
124+
# If you want out-of-scope and often-wrong data from the file 'backzone',
125+
# but only for entries listed in the backward-compatibility file zone.tab, use
126+
# PACKRATDATA= backzone
127+
# PACKRATLIST= zone.tab
128+
# If you want all the 'backzone' data, use
90129
# PACKRATDATA= backzone
130+
# PACKRATLIST=
91131
# To omit this data, use
92132
# PACKRATDATA=
133+
# PACKRATLIST=
93134

94-
PACKRATDATA =
135+
PACKRATDATA =
136+
PACKRATLIST =
95137

96138
# For backward-compatibility links for old zone names, use
97139
# BACKWARD= backward
@@ -103,26 +145,30 @@ PACKRATDATA =
103145

104146
BACKWARD= backward
105147

106-
# Choose source data features. To get new features right away, use:
148+
# DATAFORM selects the data format.
149+
# Available formats represent essentially the same data, albeit
150+
# possibly with minor discrepancies that users are not likely to notice.
151+
# To get new features and the best data right away, use:
107152
# DATAFORM= vanguard
108153
# To wait a while before using new features, to give downstream users
109154
# time to upgrade zic (the default), use:
110155
# DATAFORM= main
111156
# To wait even longer for new features, use:
112157
# DATAFORM= rearguard
158+
# Rearguard users might also want "ZFLAGS = -b fat"; see below.
113159
DATAFORM= main
114160

115161
PRIMARY_YDATA = africa antarctica asia australasia \
116162
europe northamerica southamerica
117-
YDATA = $(PRIMARY_YDATA) pacificnew etcetera factory $(BACKWARD) $(PACKRATDATA)
118-
NDATA = systemv
163+
YDATA = $(PRIMARY_YDATA) etcetera $(BACKWARD) $(PACKRATDATA)
164+
NDATA = factory
119165
#SDATA = solar87 solar88 solar89
120166
TDATA = $(YDATA) $(NDATA) $(SDATA)
121167
ZONETABLES= zone1970.tab zone.tab
122168
TABDATA = iso3166.tab $(TZDATA_TEXT) $(ZONETABLES)
123169
LEAP_DEPS = $(srcdir)/leapseconds.awk $(srcdir)/leap-seconds.list
124-
TZDATA_ZI_DEPS= ziguard.awk zishrink.awk $(TDATA) $(PACKRATDATA)
125-
DSTDATA_ZI_DEPS= ziguard.awk $(TDATA) $(PACKRATDATA)
170+
TZDATA_ZI_DEPS= ziguard.awk zishrink.awk $(TDATA) $(PACKRATDATA) $(PACKRATLIST)
171+
DSTDATA_ZI_DEPS= ziguard.awk $(TDATA) $(PACKRATDATA) $(PACKRATLIST)
126172
TDATA_TO_CHECK= $(YDATA) $(NDATA) $(srcdir)/backward $(srcdir)/pacificnew
127173
MISC = usno1988 usno1989 usno1989a usno1995 usno1997 \
128174
Arts.htm WWW.htm gccdiffs checktab.awk
@@ -133,13 +179,17 @@ EXTRA_DIST += date.1 date.c
133179

134180
EXTRA_DIST += newctime.3 newstrftime.3 newtzset.3 time2posix.3
135181

136-
all-here: zic zdump tzselect yearistype tzinit zonelist
182+
all-here: zic zdump tzselect tzinit zonelist
137183

184+
# "Compiled" timezone information is placed in the "TZDIR" directory
185+
# (and subdirectories).
138186
install: all-here zones
139187
ifneq ($(TZREDO),none)
140188
@for f in $(TABDATA); do rm -f $(DESTDIR)$(TZDIR)/$$f; done
141189
$(INSTALL) -m 644 $(TABDATA) $(DESTDIR)$(TZDIR)/.
142190
endif
191+
$(INSTALL) -m 644 tzdata.zi $(DESTDIR)$(TZDIR)/.
192+
$(INSTALL) -m 644 leapseconds leapseconds.awk leap-seconds.list $(DESTDIR)$(TZDIR)/.
143193
$(mkinstalldirs) $(DESTDIR)$(sbindir)
144194
@for file in $(sbin_PROGRAMS); do \
145195
echo "$(INSTALL) -m 755 $$file $(sbindir)"; \
@@ -155,8 +205,8 @@ zoneswarning:
155205
@echo "WARNING: Compiling and installing the time zone database"
156206
@echo "may take some time. Have a cup of coffee!"
157207

158-
localtime-posixrules: $(zic) yearistype
159-
$(ZIC) -y $(YEARISTYPE) -d $(DESTDIR)$(TZDIR) -l $(LOCALTIME) -p $(POSIXRULES)
208+
localtime-posixrules: $(zic)
209+
$(ZIC) -d $(DESTDIR)$(TZDIR) -l $(LOCALTIME) -p $(POSIXRULES)
160210
@rm -f $(DESTDIR)$(TZDIR)/localtime
161211
@ln -s /etc/localtime $(DESTDIR)$(TZDIR)/localtime
162212
@if test $(LOCALTIME) = Factory; then \
@@ -227,15 +277,15 @@ zic: $(TZCOBJS) $(CRT0) $(libs)
227277
tzinit: $(TZIOBJS) $(CRT0) $(libs)
228278
$(AM_V_LD)$(CC) $(LDFLAGS) $(TESTLDFLAGS) $(CRT0) $(TZIOBJS) -o $@ $(LIBS)
229279

230-
tzredo-posix_only: $(zic) $(TDATA) yearistype
231-
$(ZIC) -y $(YEARISTYPE) -d $(DESTDIR)$(TZDIR) -L /dev/null $(TDATA)
280+
tzredo-posix_only: $(zic) $(TDATA)
281+
$(ZIC) -d $(DESTDIR)$(TZDIR) -L /dev/null $(TDATA)
232282

233-
tzredo-right_only: $(zic) leapseconds $(TDATA) yearistype
234-
$(ZIC) -y $(YEARISTYPE) -d $(DESTDIR)$(TZDIR) -L leapseconds $(TDATA)
283+
tzredo-right_only: $(zic) leapseconds $(TDATA)
284+
$(ZIC) -d $(DESTDIR)$(TZDIR) -L leapseconds $(TDATA)
235285

236-
other_two: $(zic) leapseconds $(TDATA) yearistype
237-
$(ZIC) -y $(YEARISTYPE) -d $(DESTDIR)$(TZDIR)/posix -L /dev/null $(TDATA)
238-
$(ZIC) -y $(YEARISTYPE) -d $(DESTDIR)$(TZDIR)/right -L leapseconds $(TDATA)
286+
other_two: $(zic) leapseconds $(TDATA)
287+
$(ZIC) -d $(DESTDIR)$(TZDIR)/posix -L /dev/null $(TDATA)
288+
$(ZIC) -d $(DESTDIR)$(TZDIR)/right -L leapseconds $(TDATA)
239289

240290
tzredo-posix_right: tzredo-posix_only other_two
241291

@@ -251,20 +301,20 @@ tzredo-none:
251301
echo ""; \
252302
ZIC="./zic$(EXEEXT) $(ZFLAGS)"; \
253303
echo "For using right rules only, counting leap seconds:"; \
254-
echo "$${ZIC} -y $(YEARISTYPE) -d $(TARGET_TZDIR) -L leapseconds $(TDATA)"; \
304+
echo "$${ZIC} -d $(TARGET_TZDIR) -L leapseconds $(TDATA)"; \
255305
echo ""; \
256306
echo "For using posix rules only, not counting leap seconds:"; \
257-
echo "$${ZIC} -y $(YEARISTYPE) -d $(TARGET_TZDIR) -L /dev/null $(TDATA)"; \
307+
echo "$${ZIC} -d $(TARGET_TZDIR) -L /dev/null $(TDATA)"; \
258308
echo ""; \
259309
echo "For using both sets, with leap seconds counted normally:"; \
260-
echo "$${ZIC} -y $(YEARISTYPE) -d $(TARGET_TZDIR) -L leapseconds $(TDATA)"; \
310+
echo "$${ZIC} -d $(TARGET_TZDIR) -L leapseconds $(TDATA)"; \
261311
echo "ln -s $(TZDIR_BASENAME) $(TARGET_TZDIR)-leaps"; \
262-
echo "$${ZIC} -y $(YEARISTYPE) -d $(TARGET_TZDIR)-posix -L /dev/null $(TDATA)"; \
312+
echo "$${ZIC} -d $(TARGET_TZDIR)-posix -L /dev/null $(TDATA)"; \
263313
echo ""; \
264314
echo "For using both sets, with leap seconds not counted normally:"; \
265-
echo "$${ZIC} -y $(YEARISTYPE) -d $(TARGET_TZDIR) -L /dev/null $(TDATA)"; \
315+
echo "$${ZIC} -d $(TARGET_TZDIR) -L /dev/null $(TDATA)"; \
266316
echo "ln -s $(TZDIR_BASENAME) $(TARGET_TZDIR)-posix"; \
267-
echo "$${ZIC} -y $(YEARISTYPE) -d $(TARGET_TZDIR)-leaps -L leapseconds $(TDATA)"; \
317+
echo "$${ZIC} -d $(TARGET_TZDIR)-leaps -L leapseconds $(TDATA)"; \
268318
echo "*********************************"; \
269319
) >&2
270320

@@ -283,10 +333,6 @@ endif
283333
cleandb:
284334
$(mkinstalldirs) $(DESTDIR)$(TZDIR)
285335

286-
yearistype: $(srcdir)/yearistype.sh
287-
cp $< $@
288-
chmod +x $@
289-
290336
leapseconds: $(LEAP_DEPS)
291337
$(AWK) -f $(srcdir)/leapseconds.awk $(srcdir)/leap-seconds.list >$@.out
292338
mv $@.out $@
@@ -304,8 +350,18 @@ install-include: # Do nothing here.
304350
check_tables: $(srcdir)/checktab.awk $(PRIMARY_YDATA)
305351
$(AWK) -f $(srcdir)/checktab.awk $(PRIMARY_YDATA)
306352

353+
# These files can be tailored by setting BACKWARD, PACKRATDATA, PACKRATLIST.
354+
vanguard.zi main.zi rearguard.zi: $(DSTDATA_ZI_DEPS)
355+
$(AM_V_GEN)
356+
$(AM_V_at)LC_ALL=C $(AWK) \
357+
-v DATAFORM=`expr $@ : '\(.*\).zi'` \
358+
-v PACKRATDATA='$(PACKRATDATA)' \
359+
-v PACKRATLIST='$(PACKRATLIST)' \
360+
-f ziguard.awk \
361+
$(TDATA) $(PACKRATDATA) >$@.out
362+
mv $@.out $@
307363
# This file has a version comment that attempts to capture any tailoring
308-
# via BACKWARD, DATAFORM, PACKRATDATA, and REDO.
364+
# via BACKWARD, DATAFORM, PACKRATDATA, PACKRATLIST, and REDO.
309365
tzdata.zi: $(DATAFORM).zi zishrink.awk
310366
$(AM_V_GEN)
311367
$(AM_V_at)LC_ALL=C $(AWK) \
@@ -317,7 +373,7 @@ tzdata.zi: $(DATAFORM).zi zishrink.awk
317373
$(DATAFORM).zi >$@.out
318374
$(AM_V_at)mv $@.out $@
319375

320-
MAKE_ZONENAMES = $(AWK) '/^Z/ { print $$2 } /^L/ { print $$3 }' tzdata.zi
376+
MAKE_ZONENAMES = $(AWK) '/^Z/ { print $$2 } /^L/ { print $$3 }' tzdata.zi | LC_ALL=C sort
321377

322378
zonenames: tzdata.zi
323379
@$(MAKE_ZONENAMES)

0 commit comments

Comments
 (0)