Open
Description
- Version: v11.7.0
- Platform: Linux gallium 4.19.25 1-NixOS SMP PREEMPT Sat Feb 23 08:07:27 UTC 2019 x86_64 GNU/Linux
- Subsystem:
Node has trouble figuring out the timezone if /etc/localtime is an indirect symlink. Here's some examples in the REPL
> Date()
'Sun Mar 24 2019 01:42:40 GMT+1000 (GMT+10:00)' # Wrong, it's GMT+11 in Sydney right now
> new Date().toLocaleString()
'3/24/2019, 1:42:55 AM' # Similarly to above
> Intl.DateTimeFormat().resolvedOptions().timeZone
undefined
Even worse, in electron:
> new Date().toLocaleString()
VM575:1 Uncaught RangeError: Unsupported time zone specified undefined
at new DateTimeFormat (native)
at Date.toLocaleString (native)
at <anonymous>:1:12
This is the cause of FreeTubeApp/FreeTube#233. It might also be the cause of ValveSoftware/steam-for-linux#5609 and flathub/im.riot.Riot#32.