On Fri, 18 Jul 2014, Paul Eggert wrote:
New file time.tab, superseding zone.tab It allows multiple country codes per zone.
I worry that entries with a single latitude/longitude point intended to refer to multiple countries, will cause trouble in selecting a time zone by latitude/longitude, especially where the user's location is far from the location chosen to represent the time zone. Here are some of the entries that I am referring to:
+MZ,BI,BW,CD,MW,RW,ZM,ZW -2558+03235 Africa/Maputo Central Africa Time (UTC+2) +RS,BA,HR,ME,MK,SI +4450+02030 Europe/Belgrade +TT,AG,AI,BL,DM,GD,GP,MF,LC,KN,MS,VC,VG,VI +1039-06131 America/Port_of_Spain
As a concrete example of a problem, suppose I am am at coordinates +0330+02545, near Bambesa, Democratic Republic of the Congo. I think this location should be in the western part of the country, in the Africa/Lubumbashi time zone, which is now a link to Africa/Maputo. When I run tzselect.ksh with options "-c +0330+02545", I get the following output: [[[ Please select one of the following time zone regions, listed roughly in increasing order of distance from +0330+2545. 1) Kenya, Djibouti, Eritrea, Ethiopia, Comoros, Madagascar, Somalia, Tanzania, Uganda, Mayotte 2) Chad 3) Sudan, South Sudan 4) Nigeria, Angola, Benin, Congo (Dem. Rep.), Central African Rep., Congo (Rep.), Cameroon, Gabon, Equatorial Guinea, Niger - West Africa Time (UTC+1) 5) Ghana 6) Egypt 7) Namibia 8) Palestine - Gaza Strip 9) Saudi Arabia, Kuwait, Yemen 10) Palestine - West Bank ]]] I have to increase the number of zones in the menu (tzselect.ksh "-l" option) to at least 15, before I get the one I want: [[[ 15) Mozambique, Burundi, Botswana, Congo (Dem. Rep.), Malawi, Rwanda, Zambia, Zimbabwe - Central Africa Time (UTC+2) ]]] I can think of a few ways of addressing this problem: 1. Use at least one line per country, with the possible exception of small countries that are close together. 2. Add a column in time.tab giving an indication of the size of the zone, and make tzselect.ksh use it as a hint to make it offer very large zones in the menu even if the zone is far away. 3. Make tzselect.ksh aware of the fact that the longitude difference between the reference location for a time zone, and any other location in the time zone, will seldom exceed 15 degrees, but the latitude difference could be arbitrarily large. --apb (Alan Barrett)