Skip to content

Commit

Permalink
Drop support for zic -y, Rule TYPEs, pacificnew
Browse files Browse the repository at this point in the history
These features have not been used by the distribution since release
2000f, were previously deprecated in 2015f, and zic has warned against
their use since 2017c.

* zic.c (struct rule): Remove r_yrtype field.
(main): Ignore obsolete -y option.
(rulesub): Error on nontrivial use of the former Rule TYPE field.
(stringzone): Remove year type check.
(outzone): Stop considering the former TYPE field when applying Rules.
(shellquote, yearistype): Remove now-disused code.
* zic.8: Rename TYPE field of Rule lines to "-" in examples and in the
input format specification; fully deprecate this field for backwards
compatibiilty only.
* africa, antarctica, asia, australasia, backzone, europe, northamerica,
southamerica, zoneinfo2tdf.pl: Rename TYPE field in Rule line header
comments to "-".
* pacificnew, yearistype.sh: Remove obsolete files.
* tz-how-to.html: Rename TYPE field of Rule lines to "-" in examples;
expand explanation of FROM and TO fields so that the reworked
description of the deprecated field makes sense in context.
* Makefile (YEARISTYPE, yearistype): Remove.
(DATA, all, INSTALLARGS, INSTALL_DATA_DEPS, check_character_set,
clean_misc): Remove dependencies on yearistype, yearistype.sh, and
YEARISTYPE.
(TDATA_TO_CHECK, VERSION_DEPS): Remove dependencies on obsolete files.
* NEWS: Document this.
  • Loading branch information
timparenti committed Oct 3, 2020
1 parent b3cf2ee commit 284e877
Show file tree
Hide file tree
Showing 16 changed files with 195 additions and 321 deletions.
30 changes: 8 additions & 22 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -169,9 +169,6 @@ TZDATA_TEXT= leapseconds tzdata.zi

# For backward-compatibility links for old zone names, use
# BACKWARD= backward
# If you also want the link US/Pacific-New, even though it is confusing
# and is planned to be removed from the database eventually, use
# BACKWARD= backward pacificnew
# To omit these links, use
# BACKWARD=

Expand All @@ -189,10 +186,6 @@ PACKRATDATA=

UTF8_LOCALE= en_US.utf8

# Since "." may not be in PATH...

YEARISTYPE= ./yearistype

# Non-default libraries needed to link.
LDLIBS=

Expand Down Expand Up @@ -534,15 +527,15 @@ PRIMARY_YDATA= africa antarctica asia australasia \
europe northamerica southamerica
YDATA= $(PRIMARY_YDATA) etcetera
NDATA= factory
TDATA_TO_CHECK= $(YDATA) $(NDATA) backward pacificnew
TDATA_TO_CHECK= $(YDATA) $(NDATA) backward
TDATA= $(YDATA) $(NDATA) $(BACKWARD)
ZONETABLES= zone1970.tab zone.tab
TABDATA= iso3166.tab $(TZDATA_TEXT) $(ZONETABLES)
LEAP_DEPS= leapseconds.awk leap-seconds.list
TZDATA_ZI_DEPS= ziguard.awk zishrink.awk version $(TDATA) $(PACKRATDATA)
DSTDATA_ZI_DEPS= ziguard.awk $(TDATA) $(PACKRATDATA)
DATA= $(TDATA_TO_CHECK) backzone iso3166.tab leap-seconds.list \
leapseconds yearistype.sh $(ZONETABLES)
leapseconds $(ZONETABLES)
AWK_SCRIPTS= checklinks.awk checktab.awk leapseconds.awk \
ziguard.awk zishrink.awk
MISC= $(AWK_SCRIPTS) zoneinfo2tdf.pl
Expand All @@ -568,12 +561,10 @@ VERSION_DEPS= \
etcetera europe factory iso3166.tab \
leap-seconds.list leapseconds.awk localtime.c \
newctime.3 newstrftime.3 newtzset.3 northamerica \
pacificnew private.h \
southamerica strftime.c theory.html \
private.h southamerica strftime.c theory.html \
time2posix.3 tz-art.html tz-how-to.html tz-link.html \
tzfile.5 tzfile.h tzselect.8 tzselect.ksh \
workman.sh yearistype.sh \
zdump.8 zdump.c zic.8 zic.c \
workman.sh zdump.8 zdump.c zic.8 zic.c \
ziguard.awk zishrink.awk \
zone.tab zone1970.tab zoneinfo2tdf.pl
Expand All @@ -582,7 +573,7 @@ VERSION_DEPS= \
SHELL= /bin/sh
all: tzselect yearistype zic zdump libtz.a $(TABDATA) \
all: tzselect zic zdump libtz.a $(TABDATA) \
vanguard.zi main.zi rearguard.zi
ALL: all date $(ENCHILADA)
Expand Down Expand Up @@ -652,10 +643,6 @@ zdump: $(TZDOBJS)
zic: $(TZCOBJS)
$(CC) -o $@ $(CFLAGS) $(LDFLAGS) $(TZCOBJS) $(LDLIBS)
yearistype: yearistype.sh
cp yearistype.sh yearistype
chmod +x yearistype
leapseconds: $(LEAP_DEPS)
$(AWK) -v EXPIRES_LINE=$(EXPIRES_LINE) \
-f leapseconds.awk leap-seconds.list >$@.out
Expand All @@ -670,10 +657,9 @@ INSTALLARGS = \
PACKRATDATA='$(PACKRATDATA)' \
TZDEFAULT='$(TZDEFAULT)' \
TZDIR='$(TZDIR)' \
YEARISTYPE='$(YEARISTYPE)' \
ZIC='$(ZIC)'
INSTALL_DATA_DEPS = zic leapseconds yearistype tzdata.zi
INSTALL_DATA_DEPS = zic leapseconds tzdata.zi
# 'make install_data' installs one set of TZif files.
install_data: $(INSTALL_DATA_DEPS)
Expand Down Expand Up @@ -788,7 +774,7 @@ check_character_set: $(ENCHILADA)
! grep -Env $(SAFE_LINE)'|^UNUSUAL_OK_'$(OK_CHAR)'*$$' \
Makefile && \
! grep -Env $(SAFE_SHARP_LINE) $(TDATA_TO_CHECK) backzone \
leapseconds yearistype.sh zone.tab && \
leapseconds zone.tab && \
! grep -Env $(OK_LINE) $(ENCHILADA); \
}
touch $@
Expand Down Expand Up @@ -878,7 +864,7 @@ clean_misc:
rm -fr check_*.dir
rm -f *.o *.out $(TIME_T_ALTERNATIVES) \
check_* core typecheck_* \
date tzselect version.h zdump zic yearistype libtz.a
date tzselect version.h zdump zic libtz.a
clean: clean_misc
rm -fr *.dir tzdb-*/
rm -f *.zi $(TZS_NEW)
Expand Down
11 changes: 9 additions & 2 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Unreleased, experimental changes
Canada's Yukon changes to -07 on 2020-11-01, not 2020-03-08.
Macquarie Island has stayed in sync with Tasmania since 2011.
Casey, Antarctica is at +08 in summer and +11 in winter.
zic no longer supports -y, nor the TYPE field of Rules.

Changes to future timestamps

Expand Down Expand Up @@ -45,6 +46,12 @@ Unreleased, experimental changes

Changes to code

Support for zic's long-obsolete '-y YEARISTYPE' option has been
removed and, with it, so has support for the TYPE field in Rule
lines, which is now reserved for compatibility with earlier zic.
These features were previously deprecated in release 2015f.
(Thanks to Tim Parenti.)

zic now defaults to '-b slim' instead of to '-b fat'.

zic's new '-l -' and '-p -' options uninstall any existing
Expand All @@ -60,8 +67,8 @@ Unreleased, experimental changes

Changes to documentation and commentary

The long-obsolete file systemv has been removed from the
distribution. (Thanks to Tim Parenti.)
The long-obsolete files pacificnew, systemv, and yearistype.sh have
been removed from the distribution. (Thanks to Tim Parenti.)


Release 2020a - 2020-04-23 16:03:47 -0700
Expand Down
20 changes: 10 additions & 10 deletions africa
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
# Corrections are welcome.

# Algeria
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
# Rule NAME FROM TO - IN ON AT SAVE LETTER/S
Rule Algeria 1916 only - Jun 14 23:00s 1:00 S
Rule Algeria 1916 1919 - Oct Sun>=1 23:00s 0 -
Rule Algeria 1917 only - Mar 24 23:00s 1:00 S
Expand Down Expand Up @@ -175,7 +175,7 @@ Link Africa/Abidjan Atlantic/St_Helena # St Helena
# Egypt was mean noon at the Great Pyramid, 2:04:30.5, but apparently this
# did not apply to Cairo, Alexandria, or Port Said.

# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
# Rule NAME FROM TO - IN ON AT SAVE LETTER/S
Rule Egypt 1940 only - Jul 15 0:00 1:00 S
Rule Egypt 1940 only - Oct 1 0:00 0 -
Rule Egypt 1941 only - Apr 15 0:00 1:00 S
Expand Down Expand Up @@ -410,7 +410,7 @@ Zone Africa/Cairo 2:05:09 - LMT 1900 Oct
# now Ghana observed different DST regimes in different years. For
# lack of better info, use Shanks except treat the minus sign as a
# typo, and assume DST started in 1920 not 1936.
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
# Rule NAME FROM TO - IN ON AT SAVE LETTER/S
Rule Ghana 1920 1942 - Sep 1 0:00 0:20 -
Rule Ghana 1920 1942 - Dec 31 0:00 0 -
# Zone NAME STDOFF RULES FORMAT [UNTIL]
Expand Down Expand Up @@ -500,7 +500,7 @@ Zone Africa/Monrovia -0:43:08 - LMT 1882
# From Paul Eggert (2013-10-25):
# For now, assume they're reverting to the pre-2012 rules of permanent UT +02.

# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
# Rule NAME FROM TO - IN ON AT SAVE LETTER/S
Rule Libya 1951 only - Oct 14 2:00 1:00 S
Rule Libya 1952 only - Jan 1 0:00 0 -
Rule Libya 1953 only - Oct 9 2:00 1:00 S
Expand Down Expand Up @@ -623,7 +623,7 @@ Zone Africa/Tripoli 0:52:44 - LMT 1920
# "The trial ended on March 29, 2009, when the clocks moved back by one hour
# at 2am (or 02:00) local time..."

# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
# Rule NAME FROM TO - IN ON AT SAVE LETTER/S
Rule Mauritius 1982 only - Oct 10 0:00 1:00 -
Rule Mauritius 1983 only - Mar 21 0:00 0 -
Rule Mauritius 2008 only - Oct lastSun 2:00 1:00 -
Expand Down Expand Up @@ -912,7 +912,7 @@ Zone Indian/Mauritius 3:50:00 - LMT 1907 # Port Louis
# (car (cdr (cdr b))) (calendar-month-name (car b) t) (car (cdr b)))))
# (setq islamic-year (+ 1 islamic-year))))

# RULE NAME FROM TO TYPE IN ON AT SAVE LETTER/S
# Rule NAME FROM TO - IN ON AT SAVE LETTER/S
Rule Morocco 1939 only - Sep 12 0:00 1:00 -
Rule Morocco 1939 only - Nov 19 0:00 0 -
Rule Morocco 1940 only - Feb 25 0:00 1:00 -
Expand Down Expand Up @@ -1192,7 +1192,7 @@ Link Africa/Maputo Africa/Lusaka # Zambia
# Use plain "WAT" and "CAT" for the time zone abbreviations, to be compatible
# with Namibia's neighbors.

# RULE NAME FROM TO TYPE IN ON AT SAVE LETTER/S
# Rule NAME FROM TO - IN ON AT SAVE LETTER/S
# Vanguard section, for zic and other parsers that support negative DST.
Rule Namibia 1994 only - Mar 21 0:00 -1:00 WAT
Rule Namibia 1994 2017 - Sep Sun>=1 2:00 0 CAT
Expand Down Expand Up @@ -1315,7 +1315,7 @@ Zone Indian/Mahe 3:41:48 - LMT 1906 Jun # Victoria
# See Africa/Nairobi.

# South Africa
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
# Rule NAME FROM TO - IN ON AT SAVE LETTER/S
Rule SA 1942 1943 - Sep Sun>=15 2:00 1:00 -
Rule SA 1943 1944 - Mar Sun>=15 2:00 0 -
# Zone NAME STDOFF RULES FORMAT [UNTIL]
Expand Down Expand Up @@ -1348,7 +1348,7 @@ Link Africa/Johannesburg Africa/Mbabane # Eswatini
# Abdalla of NTC, archived at:
# https://mm.icann.org/pipermail/tz/2017-October/025333.html

# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
# Rule NAME FROM TO - IN ON AT SAVE LETTER/S
Rule Sudan 1970 only - May 1 0:00 1:00 S
Rule Sudan 1970 1985 - Oct 15 0:00 0 -
Rule Sudan 1971 only - Apr 30 0:00 1:00 S
Expand Down Expand Up @@ -1436,7 +1436,7 @@ Zone Africa/Juba 2:06:28 - LMT 1931
# http://www.almadenahnews.com/newss/news.php?c=118&id=38036
# http://www.worldtimezone.com/dst_news/dst_news_tunis02.html

# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
# Rule NAME FROM TO - IN ON AT SAVE LETTER/S
Rule Tunisia 1939 only - Apr 15 23:00s 1:00 S
Rule Tunisia 1939 only - Nov 18 23:00s 0 -
Rule Tunisia 1940 only - Feb 25 23:00s 1:00 S
Expand Down
2 changes: 1 addition & 1 deletion antarctica
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ Zone Antarctica/Syowa 0 - -00 1957 Jan 29
# suggested by Bengt-Inge Larsson comment them out for now, and approximate
# with only UTC and CEST. Uncomment them when 2014b is more prevalent.
#
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
# Rule NAME FROM TO - IN ON AT SAVE LETTER/S
#Rule Troll 2005 max - Mar 1 1:00u 1:00 +01
Rule Troll 2005 max - Mar lastSun 1:00u 2:00 +02
#Rule Troll 2005 max - Oct lastSun 1:00u 1:00 +01
Expand Down
Loading

0 comments on commit 284e877

Please sign in to comment.