Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Commits on Nov 26, 2014
  1. @Wuodan

    tzselect: Display Posix TZ format when used

    Wuodan authored committed
Commits on Nov 25, 2014
  1. @Wuodan

    tzselect: Removed spaces in calls to awk-functions

    Wuodan authored committed
    Explanation:
    GNU awk fails when a user-defined-functions is called with a space like in
    'myUDF ()'. It does not fail when calling builtin functions, but removed
    those spaces too.
    
    Example code:
    good_awk='function echo(x) { return x; } BEGIN { print echo("x"); }'
    bad_awk_='function echo(x) { return x; } BEGIN { print echo ("x"); }'
    sin_awk='BEGIN { print sin (0) }'
    
    mawk -W version 2>/dev/null | head -n1
    mawk "${sin_awk}"
    mawk "${good_awk}"
    mawk "${bad_awk_}"
    gawk -V | head -n1
    gawk "${sin_awk}"
    gawk "${good_awk}"
    gawk "${bad_awk_}"
    
    Output:
    mawk 1.3.4 20141027
    0
    x
    x
    GNU Awk 4.0.2
    0
    x
    gawk: cmd. line:1: error: function `echo' called with space between name
    and `(',
Commits on Nov 23, 2014
  1. @Wuodan

    tzselect: Fix for gawk treating '\.' as plain '.'

    Wuodan authored committed
    When using gawk and Posix TZ in tzselect, this warning is shown:
    	awk: cmd. line:1: warning: escape sequence `\.' treated as plain `.'
    gawk treats '\.' as '.'
    mawk treats '\.' as '\.'
    both treat '\\.' as '\\.'
    The 2nd and 3rd are corrrect for 'Mm.w.d'.
    
    Test:
    gawk 'BEGIN{ date = "\."; print date }'
    gawk 'BEGIN{ date = "\\."; print date }'
    versus:
    mawk 'BEGIN{ date = "\."; print date }'
    mawk 'BEGIN{ date = "\\."; print date }'
    * tzselect.ksh (date): Fix bug that broke POSIX TZ checking with gawk.
    * NEWS: Document this.
Commits on Aug 12, 2014
  1. tzselect: improve heuristic in Africa

    authored
    Add the product of the longitude difference and the cosine of the
    latitude farther from the equator to the distance measure.  This
    works better for the Congolese test case noted by Alan Barrett in:
    http://mm.icann.org/pipermail/tz/2014-July/021229.html
    The new heuristic is not perfect, but no heuristic is.
    * tzselect.ksh (abs, min): New functions
    (convert_coord): Rename local to avoid name clash.
    (gcdist): Rename from dist.
    (pardist, dist): New functions.
    * NEWS: Document this.
Commits on Jul 31, 2014
  1. Rename time.tab to zone1970.tab.

    authored
    * Makefile (ZONETABLES): Rename from TIMETABLES.  All uses changed.
    * zone1970.tab: Rename from time.tab.  All uses changed.
Commits on Jul 23, 2014
  1. * tzselect.ksh, NEWS: Port to non-Bash shell that has 'select'.

    authored
    (Thanks to Alan Barrett.)
Commits on Jul 18, 2014
  1. New file time.tab, superseding zone.tab

    authored
    It allows multiple country codes per zone.  Switch code and data to
    use the new format, along with the recently-added Crozet Islands entry.
    The old zone.tab file is still installed but is deprecated.
    The new file uses UTF-8; add commentary saying that iso3166.tab is
    planned to change to UTF-8.
    * Theory, tzselect.8 (FILES): zone.tab -> time.tab.
    * africa (Indian/Alfred_Faure): Remove link.
    * antarctica: Mention Possession Island in comments.
    * checktab.awk: Add support for checking time.tab.
    * iso3166.tab: Mention planned switch to UTF-8.
    Update ISO 3166-1 Newsletter from VI-15 to VI-16.
    * time.tab: New file.
    * tzselect.ksh (zonetabtype): New variable.
    Add undocumented -t option, meant for developer testing.
    (TZ_ZONE_TABLE): Use zonetabtype.
    (output_distances, countries, regions, TZ): Support time.tab format.
    (quoted_continents, distance_table, countries, regions)
    (TZ, TZ_for_date): Quote shell strings more carefully.
    * zone.tab: Refer to time.tab for detailed comments about format.
    (Indian/Alfred_Faure): Remove.
    * Makefile (TIMETABLES): New macro.
    (TABDATA, install, check_tables): Use it.
    (check_character_set, check_tables): Check time.tab too.
    (check_time_t_alternatives): Use time.tab, not zone.tab.
    * NEWS: Document the above.
Commits on Jun 15, 2014
  1. Don't abuse "`" to mean open quote.

    authored
    This was appropriate before Unicode, where "`" and "'" often balanced
    in visual output, but that's been obsolete for a while.
    Overall, single-quote 'like this' instead of `like this', and
    double-quote "like this" or (in typeset output) “like this”
    instead of ``like this''.  While we're at it, fix some glitches
    with hyphens versus minus versus en dash versus em dash.
    * Makefile ($(MANTXTS)): Use UTF-8 locale to produce *.txt output.
    * checktab.awk, tzselect.ksh:
    Quote 'like this' in diagnostics, instead of `like this'.
    * date.1, newctime.3, newtzset.3, time2posix.3, zic.8 (q, lq, rq):
    New macros.  Use them for better double-quoting in output.
    * workman.sh: Tell Perl that its stdin and stdout are UTF-8.
    * NEWS: Document this.
Commits on Oct 6, 2013
  1. * tzselect.ksh (doselect): Prompt to stderr, not stdout.

    authored
    (Thanks to Patrick 'P. J.' McDermott.)
  2. tzselect: work around an old BusyBox awk bug

    authored
    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.
  3. tzselect: port to /bin/sh

    authored
    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.
Commits on Sep 11, 2013
  1. Remove -t ZONETABTYPE option from 'tzselect'.

    authored
    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.
Commits on Aug 22, 2013
Commits on Aug 21, 2013
  1. tzselect: -c COORD now supports more ISO 6709 forms

    authored
    * 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.
Commits on Aug 20, 2013
  1. * tzselect.ksh: Compute list of continents from the time zone table,

    authored
    so that 'tzselect -t time' doesn't create a blind alley for the Arctic.
  2. tzselect: new options -c COORD and -n LIMIT

    authored
    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.
Commits on Aug 16, 2013
  1. Add -t ZONETABTYPE option to 'tzselect'.

    authored
    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.
Commits on Nov 13, 2012
  1. Make bug-reporting address more configurable.

    authored
    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.
Commits on Nov 10, 2012
  1. Output version info in a more-typical format.

    authored
    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".
  2. Change email address to tz@iana.org.

    authored
    * 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.
Commits on Oct 27, 2012
  1. Have tzselect.ksh use Bash by default; this can be overridden.

    authored
    * 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.
Commits on Jul 25, 2012
  1. Use a single version number for both code and data.

    authored
    * 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.
Commits on Jul 19, 2012
  1. Switch from SCCS to git.

    authored
    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.
Commits on Jul 18, 2012
  1. --help and --version work

    Arthur David Olson authored committed
    SCCS-file: tzselect.ksh
    SCCS-SID: 8.2
  2. user@machine eliminated

    Arthur David Olson authored committed
    SCCS-file: tzselect.ksh
    SCCS-SID: 1.8
  3. SCCS ID

    Arthur David Olson authored committed
    SCCS-file: tzselect.ksh
    SCCS-SID: 1.7
  4. Eggert mods

    Arthur David Olson authored committed
    SCCS-file: tzselect.ksh
    SCCS-SID: 1.6
  5. Eggert mods

    Arthur David Olson authored committed
    SCCS-file: tzselect.ksh
    SCCS-SID: 1.5
  6. URL -> href

    Arthur David Olson authored committed
    SCCS-file: tzselect.ksh
    SCCS-SID: 1.4
  7. Eggert mods

    Arthur David Olson authored committed
    SCCS-file: tzselect.ksh
    SCCS-SID: 1.3
  8. created

    Arthur David Olson authored committed
    SCCS-file: tzselect.ksh
    SCCS-SID: 1.1
Something went wrong with that request. Please try again.