This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Removing locale timezone information


On Sun, Aug 09, 2015 at 08:52:31AM -0700, Paul Eggert wrote:
> 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.

My impression is that timezone changes are normally announced in due time
so that they can be included in normal glibc release schedule, which
I think is about twice a year, but irregulary. I have not been down into
the data, tho.

> >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.

This was designed in the nineties, I think. And based on installation
programs of that time. I am in the process of installing Centos on a server,
and it challenges me, because there are many disks and raids and something
that is not easily done. And I have to go thru the same installation
procedure every time. And it is cumbersome, choosing a keyboard layout amongst
more than a hundred, and also the locale amonst about 100 and
setting the TZ by clicking on a map.

My point is that this can be done more
easyly, and moreover, that this procedure have not changed
much for something like 2 decades. Every distro has its own data for this.
If we can give them standardized and reliable info, that improves thing, I do
think this is a significant improvemennt. Also consider that this is the
first experience novice Linux users get, and it better be a good one.
So improvements here would mean quite a lot for first impressions.

> 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.

Oh well, specs to do it has been available for something like 2 decades in 14652.

I think Ubuntu/Mint has done some improvements using some geoip info.

> 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.

I don't think it would be a pain to maintain. Furthermore all this info is already
maintained, in the different distros, and in different ways, and possibly 
to different levels of detail and accuracy and timeliness.
Better to maintain it one place, in a well maintained environment.

> $ 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

> $ 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

cumbersome, I think. I would much rather have users pick the
locale, and then present them with some defaults, that then can be changed
if necessary. And if geoip is available, then present a default
and likely selection of locales based on that.

Best regards
keld


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]