From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 97813 invoked by alias); 12 Aug 2015 21:07:50 -0000 Mailing-List: contact libc-locales-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: libc-locales-owner@sourceware.org Received: (qmail 13540 invoked by uid 89); 12 Aug 2015 15:31:24 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.8 required=5.0 tests=AWL,BAYES_05,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 X-Spam-User: qpsmtpd, 2 recipients X-HELO: zimbra.cs.ucla.edu Message-ID: <55CB66C5.9030801@cs.ucla.edu> Date: Wed, 12 Aug 2015 21:07:00 -0000 From: Paul Eggert User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.8.0 MIME-Version: 1.0 To: keld@keldix.com CC: Marko Myllynen , GNU C Library , libc-locales@sourceware.org Subject: Re: Removing locale timezone information References: <556F23C9.3030500@redhat.com> <20150603203430.GC15814@www5.open-std.org> <55715DB2.2010500@redhat.com> <20150806175226.GD28963@www5.open-std.org> <55C51D35.8060406@cs.ucla.edu> <20150809145027.GA5048@www5.open-std.org> <55C7773F.30205@cs.ucla.edu> <20150812140837.GA23436@www5.open-std.org> In-Reply-To: <20150812140837.GA23436@www5.open-std.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2015-q3/txt/msg00104.txt.bz2 keld@keldix.com wrote: > 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. No, that's incorrect. We sometimes get only a few days' notice. For tomorrow's change in North Korea, we got one week's notice. We released a new tz version Monday. We average about ten releases a year. >> If there were an easy way tzselect could ask glibc "What country am I in?" >> from a shell script > Oh well, specs to do it has been available for something like 2 decades in 14652. How can a time-oriented shell script use 14652 to ask "What country am I in?", preferably getting a 2-letter code? I don't see anything in 14652's description of LC_TIME that would help an application discover what country the application's clocks should be set to. Also, in 14652 LC_TIME's timezone keyword doesn't provide for TZ settings like 'America/Los_Angeles' or 'Europe/Berlin' that are quite common in practice and are more useful than POSIX TZ settings. So it doesn't appear that the 14652-standardized info would be of much use to tzselect. > 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. Certainly geolocation helps, but how would this be put into a glibc-style locale? 14652 doesn't provide for geolocation. Most modern apps support TZ selection by maintaining their own geographical databases. If it's really the intent to move this info into the locale, it sounds like a big project. Once one has geolocation, the older selection mechanisms seem clumsy and outdated and really, not worth spending much time on. So not only were the recently-removed timezone entries in glibc locales unused and woefully incomplete, application writers typically don't want that particular info anyway. If (despite all my discouragment :-) you still want to improve locale timezone support for old-fashioned non-geolocation applications, I like Zack Weinberg's suggestion. From tzselect's point of view, it'd be mildly helpful if a shell script could get a list of plausible TZ settings for the current locale, along with an informal description of each setting so that non-expert users could make an informed choice. tzselect is already doing this now with its own database, but if glibc locales provided that information instead I suppose tzselect could use it.