Commit Graph
23 Commits
Author SHA1 Message Date
Paul Eggert 0f9614ba9e * tzselect.ksh (doselect): Prompt to stderr, not stdout.
(Thanks to Patrick 'P. J.' McDermott.)
2013-10-06 12:28:30 -07:00
Paul Eggert 868ed00c10 tzselect: work around an old BusyBox awk bug
Patch by Patrick 'P. J.' McDermott in
<http://mm.icann.org/pipermail/tz/2013-October/020444.html>.
* tzselect.ksh: Replace awk -F options with FS assignments.
Before version 1.21.0, BusyBox awk didn't unescape the argument to
the -F option.  As a result, tzselect couldn't parse tables with
such versions of BusyBox awk.  See
<https://bugs.busybox.net/show_bug.cgi?id=5126> and
<http://git.busybox.net/busybox/commit?id=ea664dd>.
* NEWS: Document this.
2013-10-06 02:24:36 -07:00
Paul Eggert be06aa48db tzselect: port to /bin/sh
Problem reported by Patrick 'P. J.' McDermott in
<http://mm.icann.org/pipermail/tz/2013-October/020441.html>.
This code is quite a bit different from what he proposed.
* tzselect.ksh: Rewrite so that it should work with /bin/sh on
common platforms.  For portability to Solaris 9 /bin/sh, use
`...`, not $(...), and avoid $((...)).
(doselect): New function.  Use this instead of plain 'select'.
Callers no longer need to worry whether it sets the var to empty.
* Makefile, NEWS: Document this.
2013-10-06 02:11:51 -07:00
Paul Eggert 2e053b5600 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.
2013-09-10 17:47:17 -07:00
Paul Eggert c20dd1949f * tzselect.ksh (usage): Improve -c description.
Suggested by Alan Barrett in
<http://mm.icann.org/pipermail/tz/2013-August/019578.html>.
2013-08-22 06:33:38 -07:00
Paul Eggert e43fc49697 tzselect: -c COORD now supports more ISO 6709 forms
* tzselect.ksh (LC_ALL): Don't set this, so that the user can
use the locale's decimal point in coordinates.
(convert_coord): Rename from cvt1.  All callers changed.
Support more ISO 6709 forms.
* tzselect.8: Document -c better, including the new forms.
2013-08-20 20:22:07 -07:00
Paul Eggert b383bf6b67 * tzselect.ksh: Compute list of continents from the time zone table,
so that 'tzselect -t time' doesn't create a blind alley for the Arctic.
2013-08-20 12:00:07 -07:00
Paul Eggert ebdf0c5d0c tzselect: new options -c COORD and -n LIMIT
These let the user select TZ based on geographical coordinates.
Combining '-c COORD' with '-t time' better insulates the user from
issues of nationality.
* tzselect.8 (SYNOPSIS, OPTIONS): Document the new options.
* tzselect.ksh: Implement them, using the great-circle special
case of the Vicenty formula for distances on ellipsoids.
(LC_ALL): Set to C, since tzselect is English only.  That way, we
treat decimal-points in -c option operands the same in all environments.
(usage): Document new options.  Document existing ones better.
(output_distances): New variable.
2013-08-20 00:57:59 -07:00
Paul Eggert cc3f93886b Add -t ZONETABTYPE option to 'tzselect'.
This is a backwards-compatible way of transitioning to a less
politically-charged approach to choosing TZ values.  A new time
zone table time.tab acts like zone.tab, except it omits TZ values
that are present only for political reasons.  tzselect has a new
"-t zonetabtype" option that lets users select which time zone table
to use, and installers can select the default table.  The zone.tab
file does not change, and the default tzselect table for now is
zone.tab.  This avoids the backward-compatibility concerns
expressed on the tz mailing list; see, for example,
the discussion surrounding Derick Rethans's comments in
<http://mm.icann.org/pipermail/tz/2013-August/019544.html>
* .gitignore: Add time.tab.
* Makefile (ZONETABTYPE): New macro.
(TABDATA): Add time.tab.
(all): Depend on $(TABDATA).
(install): Do not depend on $(TABDATA), since $(DATA) includes it.
Install time.tab too.
(time.tab): New rule.
(tzselect.tab): Substitute ZONETABTYPE.
* zone-time.awk: New file.
* tzselect.8: Document new options, and --help and --version while
we're at it.
* tzselect.ksh (ZONETABTYPE): New var.
Implement -t ZONETABTYPE option.
Check that no extra operands are given.
* zone.tab: Change first comment line, to distinguish the two
tables better.
2013-08-16 12:19:42 -07:00
Paul Eggert a435f9f0ec Make bug-reporting address more configurable.
Based on a patch by Joseph S. Myers in
<http://mm.icann.org/pipermail/tz/2012-November/018452.html>.
* Makefile (BUGEMAIL): New macro.
(version.h, tzselect): Use it to define REPORT_BUGS_TO.
* tzselect.ksh (REPORT_BUGS_TO): New variable, used for --help.
* zdump.c, zic.c (usage): Use REPORT_BUGS_TO for --help.
2012-11-12 21:52:35 -08:00
Paul Eggert 89a60086d3 Output version info in a more-typical format.
E.g., "zic (tzcode) 2012i" instead of "tzcode2012i".
Thread started by Joseph S. Myers in
<http://mm.icann.org/pipermail/tz/2012-November/018439.html>.
* Makefile (PACKAGE): New macro.
(version.h, tzselect): New constant PKGVERSION, derived from PACKAGE.
(tzselect): TZVERSION is now simply VERSION, since PACKAGE is also
output.
* tzselect.ksh (PKGVERSION): New var, which Makefile substitutes for.
(--usage, --version): Exit with nonzero status if we can't
output the help or version number.
* tzselect.ksh (--version):
* zdump.c, zic.c (main):
Output versions like this: "zdump (tzcode) 2012i".
2012-11-09 18:12:22 -08:00
Paul Eggert bd6e304281 Change email address to tz@iana.org.
* africa, australasia, europe, northamerica, southamerica:
* tzselect.ksh, zdump.c, zic.c:
In commentary and strings, change email address from
tz@elsie.nci.nih.gov to tz@iana.org, as the old email address
no longer works.
2012-11-09 17:49:36 -08:00
Paul Eggert 6daf83cd40 Have tzselect.ksh use Bash by default; this can be overridden.
* Makefile (KSHELL): New macro.
(tzselect): Use it.
* tzselect.ksh: Use "#!/bin/bash", not "#! /bin/ksh".  The Makefile
can override this.  No need for a space after "!'; that was put in
years ago only because of an urban legend.
2012-10-27 13:54:13 -07:00
Paul Eggert 33232258ad Use a single version number for both code and data.
* Makefile (VERSION): New macro, superseding ...
(TZCODE_VERSION, TZDATA_VERSION): Remove.  All uses changed.
(version.h): Call the variable TZVERSION, not TZCODE_VERSION.
All uses changed.
(tzselect): Interpolate TZVERSION, not TZCODE_VERSION.
(public): Adjust to new versioning scheme.
* tzselect.ksh (TZVERSION): Rename from TZCODE_VERSION.
* zdump.c, zic.c (main): Use TZVERSION, not TZCODE_VERSION.
2012-07-25 07:46:06 -07:00
Paul Eggert dccd5a16af Switch from SCCS to git.
Remove the SCCS keyword '%W%' from all files.
Mostly this just remove comments.
Remove trailing white space, too.
* Makefile (TZCODE_VERSION): New macro.
(version.h): New rule.
(tzselect): Interpolate TZCODE_VERSION.
(clean): Remove version.h.
(zdump.o, zic.o): Depend on version.h.
* asctime.c, date.c, difftime.c, ialloc.c, localtime.c, scheck.c:
* strftime.c, zdump.c, zic.c: Remove elsieid.
* private.h: Remove privatehid.
* tzfile.h: Remove tzfilehid.
* tzselect.h (TZCODE_VERSION): Rename from VERSION.
* zdump.c, zic.c: Include "version.h",
and use TZCODE_VERSION instead of elsieid.
2012-07-18 17:30:38 -07:00
Arthur David Olson a2563cea80 --help and --version work
SCCS-file: tzselect.ksh
SCCS-SID: 8.2
2012-07-18 03:03:06 -04:00
Arthur David Olson ab5efb7df2 user@machine eliminated
SCCS-file: tzselect.ksh
SCCS-SID: 1.8
2012-07-18 03:02:49 -04:00
Arthur David Olson 473db36254 SCCS ID
SCCS-file: tzselect.ksh
SCCS-SID: 1.7
2012-07-18 03:02:33 -04:00
Arthur David Olson dad12788f3 Eggert mods
SCCS-file: tzselect.ksh
SCCS-SID: 1.6
2012-07-18 03:02:33 -04:00
Arthur David Olson 4c8839b376 Eggert mods
SCCS-file: tzselect.ksh
SCCS-SID: 1.5
2012-07-18 03:02:30 -04:00
Arthur David Olson 5057b52b16 URL -> href
SCCS-file: tzselect.ksh
SCCS-SID: 1.4
2012-07-18 03:02:29 -04:00
Arthur David Olson 79c773b3db Eggert mods
SCCS-file: tzselect.ksh
SCCS-SID: 1.3
2012-07-18 03:02:26 -04:00
Arthur David Olson c6ac6fc149 created
SCCS-file: tzselect.ksh
SCCS-SID: 1.1
2012-07-18 03:02:24 -04:00