public inbox for libc-locales@sourceware.org
 help / color / mirror / Atom feed
From: Paul Eggert <eggert@cs.ucla.edu>
To: keld@keldix.com
Cc: Marko Myllynen <myllynen@redhat.com>,
	 GNU C Library <libc-alpha@sourceware.org>,
	libc-locales@sourceware.org
Subject: Re: Removing locale timezone information
Date: Sun, 09 Aug 2015 21:12:00 -0000	[thread overview]
Message-ID: <55C7773F.30205@cs.ucla.edu> (raw)
In-Reply-To: <20150809145027.GA5048@www5.open-std.org>

[-- Attachment #1: Type: text/plain, Size: 3009 bytes --]

keld@keldix.com wrote:
> So glibc has no way of making quick corrections appear in distros?
> I think most other critical software has a path to have eg security fixes
> happen very fast in distros.

It's typically harder to update glibc than to update time zone data.  This is 
partly a matter of size (glibc's files are an order of magnitude larger than 
tzdata's), and partly a matter of release engineering (changing tzdata has far 
fewer security and reliability implications than changing glibc does).  We don't 
want to treat every minor daylight-saving rule change with the same urgency and 
thoroughness as we treat a serious security bug in glibc.  And this is why most 
(perhaps all) GNU/Linux distributions have decoupled tzdata from glibc.

> even for the minority users having just a dozen or so likely
> TZ specs to choose from is a good improvement from having
> to choose from a long list of TZs  or even choosing by clicking on a map,
> as previously explained.

I doubt whether the improvement would be worth the hassle of implementing it. 
Even 'tzselect' wouldn't benefit much, and I expect that the fancier selectors 
would benefit even less as nowadays geoselection is often seamless.

Let me give an example to help put this in context.  Currently 'tzselect' asks 
the user for continent and then country, and then it asks for which time zone in 
that country.  A sample interaction is attached as the first attachment.

If there were an easy way tzselect could ask glibc "What country am I in?" from 
a shell script, tzselect could skip the first two questions asking for continent 
and country, and could simply ask the user to confirm the glibc setting. 
Although that would be a nicety, it's not a high-priority one: nobody has asked 
us for this nicety in two decades of tzselect use.

If in addition glibc locales had the extra information you're proposing, 
tzselect could also derive its third question from that extra information, 
presumably in a localized form rather than tzselect's English-only form (though 
if you look at the transcript you'll see that the "English-only" data is 
stylized and contains many proper names and abbreviations that should be 
reasonably useful to a non-English speaker).  This could be nicer for the user, 
but it would be a pain to maintain and typically geoselection is good enough and 
is considerably easier to maintain as the geo data is locale-agnostic.

For a dumb example of geoselection as implemented in tzselect, see the second 
attachment.  The more-commonly used selectors that can use geo information or 
graphical selection can do a much better job than tzselect does here, and these 
programs wouldn't benefit much from any extra information in glibc locales.

I'm not saying that the extra information would be useless, only that the few 
applications that might use it are so specialized that there are good software 
engineering reasons to put this information into some other package (CLDR, say) 
rather than into glibc.

[-- Attachment #2: tzselect-example.txt --]
[-- Type: text/plain, Size: 2423 bytes --]

$ tzselect
Please identify a location so that time zone rules can be set correctly.
Please select a continent, ocean, "coord", or "TZ".
 1) Africa
 2) Americas
 3) Antarctica
 4) Arctic Ocean
 5) Asia
 6) Atlantic Ocean
 7) Australia
 8) Europe
 9) Indian Ocean
10) Pacific Ocean
11) coord - I want to use geographical coordinates.
12) TZ - I want to specify the time zone using the Posix TZ format.
#? 2
Please select a country whose clocks agree with yours.
 1) Anguilla		     28) Haiti
 2) Antigua & Barbuda	     29) Honduras
 3) Argentina		     30) Jamaica
 4) Aruba		     31) Martinique
 5) Bahamas		     32) Mexico
 6) Barbados		     33) Montserrat
 7) Belize		     34) Nicaragua
 8) Bolivia		     35) Panama
 9) Brazil		     36) Paraguay
10) Canada		     37) Peru
11) Caribbean Netherlands    38) Puerto Rico
12) Cayman Islands	     39) St Barthelemy
13) Chile		     40) St Kitts & Nevis
14) Colombia		     41) St Lucia
15) Costa Rica		     42) St Maarten (Dutch part)
16) Cuba		     43) St Martin (French part)
17) Curacao		     44) St Pierre & Miquelon
18) Dominica		     45) St Vincent
19) Dominican Republic	     46) Suriname
20) Ecuador		     47) Trinidad & Tobago
21) El Salvador		     48) Turks & Caicos Is
22) French Guiana	     49) United States
23) Greenland		     50) Uruguay
24) Grenada		     51) Venezuela
25) Guadeloupe		     52) Virgin Islands (UK)
26) Guatemala		     53) Virgin Islands (US)
27) Guyana
#? 9
Please select one of the following time zone regions.
 1) Atlantic islands
 2) Amapa, E Para
 3) NE Brazil (MA, PI, CE, RN, PB)
 4) Pernambuco
 5) Tocantins
 6) Alagoas, Sergipe
 7) Bahia
 8) S & SE Brazil (GO, DF, MG, ES, RJ, SP, PR, SC, RS)
 9) Mato Grosso do Sul
10) Mato Grosso
11) W Para
12) Rondonia
13) Roraima
14) E Amazonas
15) W Amazonas
16) Acre
#? 8

The following information has been given:

	Brazil
	S & SE Brazil (GO, DF, MG, ES, RJ, SP, PR, SC, RS)

Therefore TZ='America/Sao_Paulo' will be used.
Local time is now:	Sun Aug  9 12:20:28 BRT 2015.
Universal Time is now:	Sun Aug  9 15:20:28 UTC 2015.
Is the above information OK?
1) Yes
2) No
#? 1

You can make this change permanent for yourself by appending the line
	TZ='America/Sao_Paulo'; export TZ
to the file '.profile' in your home directory; then log out and log in again.

Here is that TZ value again, this time on standard output so that you
can use the /usr/bin/tzselect command in shell scripts:
America/Sao_Paulo

[-- Attachment #3: tzselect-geoexample.txt --]
[-- Type: text/plain, Size: 1483 bytes --]

$ tzselect
Please identify a location so that time zone rules can be set correctly.
Please select a continent, ocean, "coord", or "TZ".
 1) Africa
 2) Americas
 3) Antarctica
 4) Arctic Ocean
 5) Asia
 6) Atlantic Ocean
 7) Australia
 8) Europe
 9) Indian Ocean
10) Pacific Ocean
11) coord - I want to use geographical coordinates.
12) TZ - I want to specify the time zone using the Posix TZ format.
#? 11
Please enter coordinates in ISO 6709 notation.
For example, +4042-07403 stands for
40 degrees 42 minutes north, 74 degrees 3 minutes west.
+5539+01221
Please select one of the following time zone regions,
listed roughly in increasing order of distance from +5539+01221.
1) Denmark			       6) Netherlands
2) Germany - most locations	       7) Czech Republic
3) Norway			       8) Aaland Islands
4) Russia - Moscow-01 - Kaliningrad    9) Poland
5) Sweden			      10) Latvia
#? 1

The following information has been given:

	coord +5539+01221
	Denmark

Therefore TZ='Europe/Copenhagen' will be used.
Local time is now:	Sun Aug  9 17:35:07 CEST 2015.
Universal Time is now:	Sun Aug  9 15:35:07 UTC 2015.
Is the above information OK?
1) Yes
2) No
#? 1

You can make this change permanent for yourself by appending the line
	TZ='Europe/Copenhagen'; export TZ
to the file '.profile' in your home directory; then log out and log in again.

Here is that TZ value again, this time on standard output so that you
can use the /usr/bin/tzselect command in shell scripts:
Europe/Copenhagen

  reply	other threads:[~2015-08-09 21:12 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-03 15:57 Marko Myllynen
2015-06-03 21:33 ` keld
2015-06-05  8:28   ` Marko Myllynen
2015-08-06 21:45     ` keld
2015-08-06 21:45       ` pinskia
2015-08-06 21:46         ` keld
2015-08-07  2:33         ` Rich Felker
2015-08-07  0:45       ` Mike Frysinger
2015-08-09 21:12         ` keld
2015-08-07 21:49       ` Paul Eggert
2015-08-09 21:12         ` keld
2015-08-09 21:12           ` Paul Eggert [this message]
     [not found]             ` <20150812140837.GA23436@www5.open-std.org>
2015-08-12 21:07               ` Zack Weinberg
2015-08-12 23:13                 ` Keld Simonsen
2015-08-12 23:13                   ` Allan McRae
2015-08-12 21:07               ` Allan McRae
2015-08-12 21:07               ` Andreas Schwab
2015-08-12 21:07               ` Paul Eggert
2015-06-03 21:33 ` Paul Eggert
2015-06-12 14:05 ` [PATCH] Remove " Marko Myllynen
2015-08-05  9:07   ` Mike Frysinger
2015-08-05 11:51     ` keld
2015-08-05 11:51       ` keld
2015-08-05 10:53         ` Mike Frysinger
2015-08-05 11:52           ` keld
2015-08-05 12:39             ` Andreas Schwab
2015-08-05 13:09               ` keld
2015-08-05 13:33             ` Mike Frysinger
2015-08-05 15:56               ` Keld Simonsen
2015-08-05 16:30                 ` Joseph Myers
2015-08-06 21:46                   ` Keld Simonsen
2015-08-06 21:46                     ` Andreas Schwab
2015-08-06 21:46                       ` Zack Weinberg
2015-08-06 21:46                     ` Joseph Myers
2015-08-06  2:53                 ` Mike Frysinger
2015-08-05 11:52         ` Andreas Schwab
2015-08-05 11:52           ` keld
2015-08-05 12:30             ` Andreas Schwab
2015-08-05 13:03               ` keld
2015-08-05 16:30         ` Paul Eggert
2015-08-06  2:56           ` Mike Frysinger
2015-08-06 17:13             ` keld
2015-08-06 17:13               ` Paul Eggert
2015-08-06 17:22                 ` keld
2015-08-06 17:14               ` pinskia
2015-08-06 17:25                 ` keld
2015-08-06 17:14           ` keld

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=55C7773F.30205@cs.ucla.edu \
    --to=eggert@cs.ucla.edu \
    --cc=keld@keldix.com \
    --cc=libc-alpha@sourceware.org \
    --cc=libc-locales@sourceware.org \
    --cc=myllynen@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).