From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/6368 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: do_tzset() prevents reusing the same name of a timezone file Date: Sat, 18 Oct 2014 22:20:56 -0400 Message-ID: <20141019022056.GJ32028@brightrain.aerifal.cx> References: Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1413685278 23102 80.91.229.3 (19 Oct 2014 02:21:18 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 19 Oct 2014 02:21:18 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-6381-gllmg-musl=m.gmane.org@lists.openwall.com Sun Oct 19 04:21:11 2014 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1Xfg7K-00079w-BN for gllmg-musl@plane.gmane.org; Sun, 19 Oct 2014 04:21:10 +0200 Original-Received: (qmail 12012 invoked by uid 550); 19 Oct 2014 02:21:09 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 12004 invoked from network); 19 Oct 2014 02:21:09 -0000 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Original-Sender: Rich Felker Xref: news.gmane.org gmane.linux.lib.musl.general:6368 Archived-At: On Sat, Oct 18, 2014 at 12:20:05AM +0400, Королев Сергей wrote: > Hi, all. > > I have a question about do_tzset() function implementation (musl v1.1.5). > The function has the following conditions to prevent timezone file remapping > > if (old_tz && !strcmp(s, old_tz)) return; All this line does is prevent any reloading if the TZ variable has not changed since do_tzset() was last called. > which do not allow to use "TZ" environment variable pointing to the same > file (e.g. /etc/localtime). But some distros replace this file directly or > use it as a symlink. > > Is this limitation a bug or a feature? Can you clarify what problem you're actually experiencing? /etc/localtime is currently supported/used if TZ is unset or set to the empty string. Rich