|
Message-ID: <20140502080656.659b723f@vostro> Date: Fri, 2 May 2014 08:06:56 +0300 From: Timo Teras <timo.teras@....fi> To: musl@...ts.openwall.com Cc: josiahw@...il.com Subject: Re: Re: ctime, timezone? On Thu, 1 May 2014 17:18:32 -0500 Josiah Worcester <josiahw@...il.com> wrote: > On Thu, May 1, 2014 at 5:00 PM, John Mudd <johnbmudd@...il.com> 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
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.