Openwall GNU/*/Linux - a small security-enhanced Linux distro for servers
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Fri, 22 Dec 2017 19:06:17 +0000
From: Nicholas Wilson <nicholas.wilson@...lvnc.com>
To: "musl@...ts.openwall.com" <musl@...ts.openwall.com>
Subject: Re: Feature request: building musl in a portable way

On 22 December 2017 18:08, Rich Felker wrote:
> Wouldn't just exporting a TZ variable be easier?

(Sorry ardi for hijacking your thread! Just a brief response.)

That gives you the current timezone, true. But to make localtime() work, you of course need historical timezone information - a list of timestamps when the timezone offset changed. Getting that information from the browser is actually rather hard. Of course the browser internally has the list of timezone data, but it doesn't expose it via an API - all you can do is basically call a JavaScript equivalent of localtime() and find the timezone offset at specific points you sample. So we can't easily extract the current timezone's full data, and use Musl's implementation. Our current solution is simple, and does a wholesale redirection of localtime() to a browser-based version. Implementing localtime() in a browser is easy, but extracting zoneinfo is hard.

Nick

Powered by blists - more mailing lists

Your e-mail address:

Powered by Openwall GNU/*/Linux - Powered by OpenVZ