From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/2216 Path: news.gmane.org!not-for-mail From: Isaac Dunham Newsgroups: gmane.linux.lib.musl.general Subject: Re: localtime() isn't local Date: Fri, 26 Oct 2012 07:37:20 -0700 Message-ID: <20121026073720.06b2d225.idunham@lavabit.com> References: <20121026075736.GD16801@mahoro.ispfabriek.nl> <20121026081507.GF24157@port70.net> <20121026083405.GE16801@mahoro.ispfabriek.nl> <20121026120025.GG24157@port70.net> <20121026122636.GX254@brightrain.aerifal.cx> 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 1351262260 5873 80.91.229.3 (26 Oct 2012 14:37:40 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 26 Oct 2012 14:37:40 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-2217-gllmg-musl=m.gmane.org@lists.openwall.com Fri Oct 26 16:37:48 2012 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 1TRl2c-0007h7-3f for gllmg-musl@plane.gmane.org; Fri, 26 Oct 2012 16:37:42 +0200 Original-Received: (qmail 7534 invoked by uid 550); 26 Oct 2012 14:37:34 -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 7526 invoked from network); 26 Oct 2012 14:37:33 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=lavabit; d=lavabit.com; b=nI1ICfL+F1P2D3azr7xR+wQ3sy1ANDjun1syrSJG3Ck6Fy5h+RfjzUA74Am4ngrSUXEOA4KayRpibKZBD6RG1Fb0ADLfMI51Afs72z9oJVupLX/45Oi7zvVGqNrh1F/gpi0UTNR+lwkCUIFf5lSHXrP+VitKbLRVexSPliP82J4=; h=Date:From:To:Subject:Message-Id:In-Reply-To:References:X-Mailer:Mime-Version:Content-Type:Content-Transfer-Encoding; In-Reply-To: <20121026122636.GX254@brightrain.aerifal.cx> X-Mailer: Sylpheed 3.0.2 (GTK+ 2.20.1; i486-pc-linux-gnu) Xref: news.gmane.org gmane.linux.lib.musl.general:2216 Archived-At: On Fri, 26 Oct 2012 08:26:36 -0400 Rich Felker wrote: > On Fri, Oct 26, 2012 at 02:00:27PM +0200, Szabolcs Nagy wrote: > > * Yoran Heling [2012-10-26 10:34:06 +0200]: > > > Ah, I didn't realize that the use of /etc/localtime wasn't part of > > > POSIX. I don't have a TZ variable set, so that explains the output. > > > TZ=CEST didn't work, but TZ=CEST-2 did the trick. > > > > > > This is quite a bummer, though. I use musl to create static binaries for > > > Linux, and every glibc-based distribution (i.e. the vast majority) uses > > > /etc/localtime rather than the TZ variable. :-( > > > > > > > i guess you can hack the implementation at > > http://cs.ucla.edu/~eggert/tz/tz-link.htm > > Adding zoneinfo support to musl is on the agenda, but not based on the > "official" source which is bloated and invalid C. A while back I was > reading the (very minimal) spec and it doesn't look that bad, but it > was complex enough that I didn't write the support code immediately. > I'll get around to it sometime, sooner rather than later if there's > really a demand for it. FWIW, the last line in /etc/localtime seems in proper format for the TZ variable (that is, export TZ=`tail -n 1 /etc/localtime` should give you a valid POSIX timezone). I don't know why there's so much more cruft, and I've only checked with my timezone. Isaac Dunham