From d3496e1d481bc8619cd1e5d1ba6a9204c599a0cd Mon Sep 17 00:00:00 2001 Message-Id: In-Reply-To: References: From: Steffen Nurpmeso Date: Mon, 19 Sep 2022 23:24:09 +0200 Subject: [PATCH 2/3] tzselect: document -t --- tzselect.8 | 29 +++++++++++++++++++++++++++++ tzselect.ksh | 15 +++++++++++++-- 2 files changed, 42 insertions(+), 2 deletions(-) diff --git a/tzselect.8 b/tzselect.8 index 1a5ce110f4..38a51fa35c 100644 --- a/tzselect.8 +++ b/tzselect.8 @@ -24,6 +24,9 @@ tzselect \- select a timezone .B \*-n .I limit ] [ +.B \*-t +.I zonetype +] [ .B \*-\*-help ] [ .B \*-\*-version @@ -85,6 +88,32 @@ is used, display the closest .I limit locations (default 10). .TP +.BI "\*-t " zonetype +The default +.I zone1970 +partitions the world into timezones whose clocks all agree about +timestamps that occur after 1970-01-01 00:00:00 UTC, +so for example asking for the location +.B Laos +in the area +.B Asia +will answer +.B Asia/Bangkok, +since this timezone correctly represents the clocks of Laos since 1970-01-01. +If +.I zonetype +is +.I zone, +a country based answer will be given, in this case +.B Asia/Vientiane. +TZ DB build-time decisions decide whether timezones share pre-1970 clock +data or not: if not the above +.I zonetype +.I zone +answer is an alias for the timezone +.B Asia/Bangkok. +Pre-1970 clock data is often not reliable. +.TP .B "\*-\*-help" Output help information and exit. .TP diff --git a/tzselect.ksh b/tzselect.ksh index 4ba661271e..0e00bef5e6 100644 --- a/tzselect.ksh +++ b/tzselect.ksh @@ -56,7 +56,7 @@ coord= location_limit=10 zonetabtype=zone1970 -usage="Usage: tzselect [--version] [--help] [-c COORD] [-n LIMIT] +usage="Usage: tzselect [--version] [--help] [-c COORD] [-n LIMIT] [-t ZONETYPE] Select a timezone interactively. Options: @@ -72,6 +72,17 @@ Options: -n LIMIT Display at most LIMIT locations when -c is used (default $location_limit). + -t ZONETYPE + The default zone1970 partitions the world into timezones whose clocks all + agree about timestamps that occur after 1970-01-01 00:00:00 UTC, so for + example asking for the location Laos in the area Asia will answer + Asia/Bangkok, since this timezone correctly represents the clocks of Laos + since 1970-01-01. If ZONETYPE is zone, a country based answer will be + given, in this case Asia/Vientiane. + TZ DB build-time decisions decide whether timezones share pre-1970 clock + data or not: if not the above ZONETYPE zone answer is an alias for the + timezone Asia/Bangkok. Pre-1970 clock data is often not reliable. + --version Output version information. @@ -147,7 +158,7 @@ do coord=$OPTARG ;; n*) location_limit=$OPTARG ;; - t*) # Undocumented option, used for developer testing. + t*) zonetabtype=$OPTARG ;; -help) exec echo "$usage" ;; -- 2.37.3