From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/5024 Path: news.gmane.org!not-for-mail From: Timo Teras Newsgroups: gmane.linux.lib.musl.general Subject: Re: Re: ctime, timezone? Date: Fri, 2 May 2014 08:06:56 +0300 Message-ID: <20140502080656.659b723f@vostro> References: Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1399007236 11824 80.91.229.3 (2 May 2014 05:07:16 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 2 May 2014 05:07:16 +0000 (UTC) Cc: josiahw@gmail.com To: musl@lists.openwall.com Original-X-From: musl-return-5028-gllmg-musl=m.gmane.org@lists.openwall.com Fri May 02 07:07:10 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 1Wg5gh-0006jp-Oe for gllmg-musl@plane.gmane.org; Fri, 02 May 2014 07:07:07 +0200 Original-Received: (qmail 30474 invoked by uid 550); 2 May 2014 05:07:06 -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 30465 invoked from network); 2 May 2014 05:07:06 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; bh=rpOFM+fvIsuX30UO7WYSMIGJ0Az3USJsuTcMKGYaDWw=; b=tCak6mk3yTytzoW8wJp5MwqsINNiD4JQRBOizJCMPVUwefBHUiKUzPgEoMjQJfovvo +mJ25Wwa08bwK7/cC9+MMsRqLjGi+WX6A5yU7Q7kpPiZj826yKTbPuwit/XnnCYRPRNG rJDBjaDlFV6QU7vu0zJM4zKwB5sCrULqXOX54LMxFGFuBK3jmblr5vil0I9eY/QByPUe HcM9nel1lJZ0j71SpwktIr4xSfbcGUi8Vmycfxh5PIs4xTtklx3GcHqwE6f1WZMxELYM 4zDpoEM4n2fb/Cq+QMAD7/qEOxJBRiAEWX2LY5/ZXYyoJgvY8htS8tI4nDWG6V4bqm9g KPIA== X-Received: by 10.152.116.99 with SMTP id jv3mr10659850lab.19.1399007214666; Thu, 01 May 2014 22:06:54 -0700 (PDT) Original-Sender: =?UTF-8?Q?Timo_Ter=C3=A4s?= In-Reply-To: X-Mailer: Claws Mail 3.9.3 (GTK+ 2.24.23; i486-alpine-linux-musl) Xref: news.gmane.org gmane.linux.lib.musl.general:5024 Archived-At: On Thu, 1 May 2014 17:18:32 -0500 Josiah Worcester wrote: > On Thu, May 1, 2014 at 5:00 PM, John Mudd wrote: > > > Hmm, I'd like to install my app at 4,000 locations around the > > country. Can I avoid explicitly setting $TZ? > > > > > With unpatched musl, not really. In the do_tzset function in __tz.c, I > think changing the > "if (!s || !*s) s = __gmt;" to simply "if (!s || !*s) s = > "/etc/localtime";" should do it, though I wouldn't say for sure > without testing. > If you simply don't want to have to deal with manually setting TZ to > match the /etc/localtime definition everywhere, TZ=/etc/localtime > should suffice. This will not work for setuid programs. I patched musl with: http://git.alpinelinux.org/cgit/aports/plain/main/musl/2001-default-to-localtime-timezone-if-TZ-is-undefined.patch This needs latest musl git head to work. And we configured Alpine to setup /etc/zoneinfo/localtime as symlink to the proper place. With the patch you could also symlink /etc/zoneinfo/localtime -> /etc/localtime and then it'd just work. - Timo