mirror of
https://frontier.innolan.net/rainlance/amiga-tz.git
synced 2025-11-21 22:43:58 +00:00
Remove -t ZONETABTYPE option from 'tzselect'.
This was experimental, and it appears that the tzwinnow approach will be better. We need to cut a new stable release soon, and the -t option might make it harder to integrate tzwinnow later, so let's omit -t for now. * .gitignore: Remove time.tab. * Makefile (ZONETABTYPE): Remove. All uses removed. (time.tab): Remove. All uses removed. * Theory: Omit discussion of time.tab. * zone-time.awk: Remove. * tzselect.8: Omit -t and time.tab. * tzselect.ksh (ZONETABTYPE): Remove. All uses removed. Remove -t ZONETABTYPE option. * zone.tab: Restore first comment line, since there's no longer a need to distinguish this file from time.tab.
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@ -6,7 +6,6 @@
|
||||
ChangeLog
|
||||
date
|
||||
leapseconds
|
||||
time.tab
|
||||
tzselect
|
||||
version.h
|
||||
yearistype
|
||||
|
||||
22
Makefile
22
Makefile
@ -40,15 +40,6 @@ LOCALTIME= GMT
|
||||
|
||||
POSIXRULES= America/New_York
|
||||
|
||||
# Default time zone table type for 'tzselect'. See tzselect.8 for details.
|
||||
# Possible values are:
|
||||
# 'time' - for a smaller time zone table
|
||||
# 'zone' - for a backward compatible time zone table; it contains
|
||||
# alternative TZ values present for compatibility with older versions of
|
||||
# this software.
|
||||
|
||||
ZONETABTYPE= zone
|
||||
|
||||
# Also see TZDEFRULESTRING below, which takes effect only
|
||||
# if the time zone files cannot be accessed.
|
||||
|
||||
@ -329,11 +320,11 @@ YDATA= $(PRIMARY_YDATA) pacificnew etcetera backward
|
||||
NDATA= systemv factory
|
||||
SDATA= solar87 solar88 solar89
|
||||
TDATA= $(YDATA) $(NDATA) $(SDATA)
|
||||
TABDATA= iso3166.tab time.tab zone.tab
|
||||
TABDATA= iso3166.tab zone.tab
|
||||
DATA= $(YDATA) $(NDATA) $(SDATA) $(TABDATA) \
|
||||
leap-seconds.list yearistype.sh
|
||||
WEB_PAGES= tz-art.htm tz-link.htm
|
||||
AWK_SCRIPTS= checktab.awk leapseconds.awk zone-time.awk
|
||||
AWK_SCRIPTS= checktab.awk leapseconds.awk
|
||||
MISC= usno1988 usno1989 usno1989a usno1995 usno1997 usno1998 \
|
||||
$(WEB_PAGES) $(AWK_SCRIPTS) workman.sh \
|
||||
zoneinfo2tdf.pl
|
||||
@ -352,8 +343,8 @@ install: all $(DATA) $(REDO) $(DESTDIR)$(TZLIB) $(MANS)
|
||||
$(ZIC) -y $(YEARISTYPE) \
|
||||
-d $(DESTDIR)$(TZDIR) -l $(LOCALTIME) -p $(POSIXRULES)
|
||||
-rm -f $(DESTDIR)$(TZDIR)/iso3166.tab \
|
||||
$(DESTDIR)$(TZDIR)/time.tab $(DESTDIR)$(TZDIR)/zone.tab
|
||||
cp iso3166.tab time.tab zone.tab $(DESTDIR)$(TZDIR)/.
|
||||
$(DESTDIR)$(TZDIR)/zone.tab
|
||||
cp iso3166.tab zone.tab $(DESTDIR)$(TZDIR)/.
|
||||
-mkdir $(DESTDIR)$(TOPDIR) $(DESTDIR)$(ETCDIR)
|
||||
cp tzselect zic zdump $(DESTDIR)$(ETCDIR)/.
|
||||
-mkdir $(DESTDIR)$(TOPDIR) $(DESTDIR)$(MANDIR) \
|
||||
@ -430,9 +421,6 @@ posix_right: posix_only leapseconds
|
||||
|
||||
zones: $(REDO)
|
||||
|
||||
time.tab: $(YDATA) zone.tab zone-time.awk
|
||||
$(AWK) -f zone-time.awk $(YDATA) >$@
|
||||
|
||||
$(DESTDIR)$(TZLIB): $(LIBOBJS)
|
||||
-mkdir -p $(DESTDIR)$(TOPDIR) $(DESTDIR)$(LIBDIR)
|
||||
ar ru $@ $(LIBOBJS)
|
||||
@ -450,7 +438,6 @@ tzselect: tzselect.ksh
|
||||
-e 's|\(REPORT_BUGS_TO\)=.*|\1=$(BUGEMAIL)|' \
|
||||
-e 's|TZDIR=[^}]*|TZDIR=$(TZDIR)|' \
|
||||
-e 's|\(TZVERSION\)=.*|\1=$(VERSION)|' \
|
||||
-e 's|^\(ZONETABTYPE\)=.*|\1=$(ZONETABTYPE)|' \
|
||||
<$? >$@
|
||||
chmod +x $@
|
||||
|
||||
@ -467,7 +454,6 @@ check_web: $(WEB_PAGES)
|
||||
|
||||
clean_misc:
|
||||
rm -f core *.o *.out \
|
||||
time.tab \
|
||||
date leapseconds tzselect version.h zdump zic yearistype
|
||||
clean: clean_misc
|
||||
rm -f -r tzpublic
|
||||
|
||||
10
Theory
10
Theory
@ -357,13 +357,9 @@ in decreasing order of importance:
|
||||
The file 'zone.tab' lists geographical locations used to name time
|
||||
zone rule files. It is intended to be an exhaustive list of names
|
||||
for geographic regions as described above; this is a subset of the
|
||||
Zone entries in the data. The file 'time.tab' is a simplified
|
||||
version of 'zone.tab', the intent being that entries are coalesced
|
||||
if their time stamps agree after 1970, which means the entries are
|
||||
distinct in 'zone.tab' only because of the abovementioned political
|
||||
constraints. Although a 'zone.tab' location's longitude corresponds
|
||||
to its LMT offset with one hour for every 15 degrees east longitude,
|
||||
this relationship is not exact and is not true for 'time.tab'.
|
||||
names in the data. Although a 'zone.tab' location's longitude
|
||||
corresponds to its LMT offset with one hour for every 15 degrees east
|
||||
longitude, this relationship is not exact.
|
||||
|
||||
Older versions of this package used a different naming scheme,
|
||||
and these older names are still supported.
|
||||
|
||||
51
tzselect.8
51
tzselect.8
@ -10,9 +10,6 @@ tzselect \- select a time zone
|
||||
.B \-n
|
||||
.I limit
|
||||
] [
|
||||
.B \-t
|
||||
.I zonetabtype
|
||||
] [
|
||||
.B \-\-help
|
||||
] [
|
||||
.B \-\-version
|
||||
@ -73,52 +70,8 @@ When
|
||||
is used, display the closest
|
||||
.I limit
|
||||
locations (default 10).
|
||||
.TP
|
||||
.BI "\-t " zonetabtype
|
||||
Make selections from the time zone table of type
|
||||
.I zonetabtype.
|
||||
Possible
|
||||
.I zonetabtype
|
||||
values include:
|
||||
.RS
|
||||
.TP
|
||||
.B time
|
||||
A time zone table with a smaller set of zone names.
|
||||
.TP
|
||||
.B zone
|
||||
A time zone table that also contains alternative zone names, for
|
||||
backward compatibility with older versions of this software. The
|
||||
alternative names are not needed for proper operation of time stamps;
|
||||
they are present only to avoid surprises with people who are
|
||||
accustomed to the old names. These alternative names arose from
|
||||
political issues that are outside the scope of
|
||||
.BR tzselect .
|
||||
.PP
|
||||
For example, both tables have entries for countries like
|
||||
Bosnia, Croatia, and Serbia, which are in a zone where the clocks
|
||||
have all agreed since 1970. Although the
|
||||
.B time
|
||||
table lists "Europe/Belgrade" for this zone wherever it occurs, the
|
||||
.B zone
|
||||
table instead lists the names "Europe/Sarajevo", "Europe/Zagreb",
|
||||
etc. under Bosnia, Croatia, etc. This means that the
|
||||
.B "\-t\ time"
|
||||
option causes
|
||||
.B tzselect
|
||||
to generate "Europe/Belgrade" for this zone, whereas
|
||||
.B "\-t\ zone"
|
||||
causes it to generate different names depending on the country,
|
||||
names that are equivalent in effect to "Europe/Belgrade".
|
||||
.PP
|
||||
The default
|
||||
.I zonetabtype
|
||||
is system-dependent, so applications that care about the set of
|
||||
names that
|
||||
.B tzselect
|
||||
generates should use the
|
||||
.B "\-t"
|
||||
option. Regardless of what options are used, applications should not
|
||||
assume that
|
||||
Applications should not assume that
|
||||
.BR tzselect 's
|
||||
output matches the user's political preferences.
|
||||
.RE
|
||||
@ -144,8 +97,6 @@ Name of the directory containing time zone data files (default:
|
||||
\f2TZDIR\fP\f3/iso3166.tab\fP
|
||||
Table of ISO 3166 2-letter country codes and country names.
|
||||
.TP
|
||||
\f2TZDIR\fP\f3/time.tab\fP
|
||||
.TP
|
||||
\f2TZDIR\fP\f3/zone.tab\fP
|
||||
Tables of country codes, latitude and longitude, zone names, and
|
||||
descriptive comments.
|
||||
|
||||
13
tzselect.ksh
13
tzselect.ksh
@ -3,7 +3,6 @@
|
||||
PKGVERSION='(tzcode) '
|
||||
TZVERSION=see_Makefile
|
||||
REPORT_BUGS_TO=tz@iana.org
|
||||
ZONETABTYPE=zone
|
||||
|
||||
# Ask the user about the time zone, and output the resulting TZ value to stdout.
|
||||
# Interact with the user via stderr and stdin.
|
||||
@ -44,7 +43,7 @@ ZONETABTYPE=zone
|
||||
coord=
|
||||
location_limit=10
|
||||
|
||||
usage="Usage: tzselect [--version] [--help] [-c COORD] [-n LIMIT] [-t ZONETABTYPE]
|
||||
usage="Usage: tzselect [--version] [--help] [-c COORD] [-n LIMIT]
|
||||
Select a time zone interactively.
|
||||
|
||||
Options:
|
||||
@ -60,10 +59,6 @@ Options:
|
||||
-n LIMIT
|
||||
Display at most LIMIT locations when -c is used (default $location_limit).
|
||||
|
||||
-t ZONETABTYPE
|
||||
Use time zone table ZONETABTYPE. ZONETABTYPE should be one of
|
||||
'time' or 'zone'.
|
||||
|
||||
--version
|
||||
Output version information.
|
||||
|
||||
@ -72,15 +67,13 @@ Options:
|
||||
|
||||
Report bugs to $REPORT_BUGS_TO."
|
||||
|
||||
while getopts c:n:t:-: opt
|
||||
while getopts c:n:-: opt
|
||||
do
|
||||
case $opt$OPTARG in
|
||||
c*)
|
||||
coord=$OPTARG ;;
|
||||
n*)
|
||||
location_limit=$OPTARG ;;
|
||||
t*)
|
||||
ZONETABTYPE=$OPTARG ;;
|
||||
-help)
|
||||
exec echo "$usage" ;;
|
||||
-version)
|
||||
@ -100,7 +93,7 @@ esac
|
||||
|
||||
# Make sure the tables are readable.
|
||||
TZ_COUNTRY_TABLE=$TZDIR/iso3166.tab
|
||||
TZ_ZONE_TABLE=$TZDIR/$ZONETABTYPE.tab
|
||||
TZ_ZONE_TABLE=$TZDIR/zone.tab
|
||||
for f in $TZ_COUNTRY_TABLE $TZ_ZONE_TABLE
|
||||
do
|
||||
<$f || {
|
||||
|
||||
@ -1,34 +0,0 @@
|
||||
# Generate 'time.tab' from 'zone.tab'. Standard input should be the zic input.
|
||||
|
||||
# This file is in the public domain.
|
||||
|
||||
# Contributed by Paul Eggert.
|
||||
|
||||
$1 == "Link" { link[$3] = $2 }
|
||||
|
||||
END {
|
||||
FS = "\t"
|
||||
while (getline < "zone.tab") {
|
||||
line = $0
|
||||
if (line ~ /^# TZ zone descriptions/)
|
||||
line = "# TZ zone descriptions, with a smaller set of zone names"
|
||||
if (line ~ /^# 4. Comments;/) {
|
||||
print "# Zones can cross country-code boundaries, so the"
|
||||
print "# location named by column 3 need not lie in the"
|
||||
print "# locations identified by columns 1 or 2."
|
||||
}
|
||||
if (line ~ /^[^#]/) {
|
||||
code = $1
|
||||
target = $3
|
||||
while (link[target])
|
||||
target = link[target]
|
||||
if (already_seen[code, target])
|
||||
continue
|
||||
already_seen[code, target] = 1
|
||||
line = code "\t" $2 "\t" target
|
||||
if ($4)
|
||||
line = line "\t" $4
|
||||
}
|
||||
print line
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user