[BACK]Return to tzselect.ksh CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / lib / libc / time

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/lib/libc/time/tzselect.ksh between version 1.17 and 1.18

version 1.17, 2018/01/25 22:48:42 version 1.18, 2018/10/19 23:05:35
Line 1 
Line 1 
 #! /bin/bash  #! /bin/bash
 #  #
   # Ask the user about the time zone, and output the resulting TZ value to stdout.
   # Interact with the user via stderr and stdin.
   #
 #       $NetBSD$  #       $NetBSD$
 #  #
 PKGVERSION='(tzcode) '  PKGVERSION='(tzcode) '
 TZVERSION=see_Makefile  TZVERSION=see_Makefile
 REPORT_BUGS_TO=tz@iana.org  REPORT_BUGS_TO=tz@iana.org
   
 # Ask the user about the time zone, and output the resulting TZ value to stdout.  
 # Interact with the user via stderr and stdin.  
   
 # Contributed by Paul Eggert.  This file is in the public domain.  # Contributed by Paul Eggert.  This file is in the public domain.
   
 # Porting notes:  # Porting notes:
Line 57  location_limit=10
Line 57  location_limit=10
 zonetabtype=zone1970  zonetabtype=zone1970
   
 usage="Usage: tzselect [--version] [--help] [-c COORD] [-n LIMIT]  usage="Usage: tzselect [--version] [--help] [-c COORD] [-n LIMIT]
 Select a time zone interactively.  Select a timezone interactively.
   
 Options:  Options:
   
Line 329  while
Line 329  while
         eval '          eval '
             doselect '"$quoted_continents"' \              doselect '"$quoted_continents"' \
                 "coord - I want to use geographical coordinates." \                  "coord - I want to use geographical coordinates." \
                 "TZ - I want to specify the time zone using the Posix TZ format."                  "TZ - I want to specify the timezone using the Posix TZ format."
             continent=$select_result              continent=$select_result
             case $continent in              case $continent in
             Americas) continent=America;;              Americas) continent=America;;
Line 344  while
Line 344  while
                 while                  while
                         echo >&2 'Please enter the desired value' \                          echo >&2 'Please enter the desired value' \
                                 'of the TZ environment variable.'                                  'of the TZ environment variable.'
                         echo >&2 'For example, AEST-10 is a zone named AEST' \                          echo >&2 'For example, AEST-10 is abbreviated' \
                                 'that is 10 hours'                                  'AEST and is 10 hours'
                         echo >&2 'ahead (east) of Greenwich,' \                          echo >&2 'ahead (east) of Greenwich,' \
                                 'with no daylight saving time.'                                  'with no daylight saving time.'
                         read TZ                          read TZ
Line 364  while
Line 364  while
                                 exit 0                                  exit 0
                         }'                          }'
                 do                  do
                     say >&2 "'$TZ' is not a conforming Posix time zone string."                      say >&2 "'$TZ' is not a conforming Posix timezone string."
                 done                  done
                 TZ_for_date=$TZ;;                  TZ_for_date=$TZ;;
         *)          *)
Line 390  while
Line 390  while
                       BEGIN { FS = "\t" }                        BEGIN { FS = "\t" }
                       { print $NF }                        { print $NF }
                     '`                      '`
                     echo >&2 'Please select one of the following' \                      echo >&2 'Please select one of the following timezones,' \
                             'time zone regions,'  
                     echo >&2 'listed roughly in increasing order' \                      echo >&2 'listed roughly in increasing order' \
                             "of distance from $coord".                              "of distance from $coord".
                     doselect $regions                      doselect $regions
Line 441  while
Line 440  while
                 esac                  esac
   
   
                 # Get list of names of time zone rule regions in the country.                  # Get list of timezones in the country.
                 regions=`$AWK \                  regions=`$AWK \
                         -v country="$country" \                          -v country="$country" \
                         -v TZ_COUNTRY_TABLE="$TZ_COUNTRY_TABLE" \                          -v TZ_COUNTRY_TABLE="$TZ_COUNTRY_TABLE" \
Line 464  while
Line 463  while
                 # If there's more than one region, ask the user which one.                  # If there's more than one region, ask the user which one.
                 case $regions in                  case $regions in
                 *"$newline"*)                  *"$newline"*)
                         echo >&2 'Please select one of the following' \                          echo >&2 'Please select one of the following timezones.'
                                 'time zone regions.'  
                         doselect $regions                          doselect $regions
                         region=$select_result;;                          region=$select_result;;
                 *)                  *)

Legend:
Removed from v.1.17  
changed lines
  Added in v.1.18

CVSweb <webmaster@jp.NetBSD.org>