kripken/emscripten — Issue #208: tzset(): don't rely on parsing Date.toString() for obtaining the timezome name 
Author: fbuchinger
Created: 2012-02-02 09:38:04+00:00
State: open

the tzset() function in `src/library.js` relies on regex-parsing (new Date).toString() for obtaining the abbreviated timezone name.

Turns out that this doesn't work under windows, because here the browsers produce highy inhomogenous date strings, that often don't contain the timezone name:

IE 8: "Thu Feb 2 10:33:02 UTC+0100 2012"
Firefox 9: "Sat Jan 01 2000 00:00:00 GMT+0100"
Chrome 16: "Sat Jan 01 2000 00:00:00 GMT+0100 (Mitteleuropäische Zeit)"

See also a related Firefox bug:
https://bugzilla.mozilla.org/show_bug.cgi?id=625447

Solution: obtain the timezone info by mapping Date.getTimezoneOffset() to timezone names?