How does chromium get timezone on Linux when running "Date()"?

54 views
Skip to first unread message

Zhao Jiazhong

unread,
Jul 2, 2021, 3:14:26 PM7/2/21
to Chromium-discuss
Hi,

I find d8 and chromium may return different timezones on Linux when /etc/localtime is a soft link to a strange name timezone file.

Normally the /etc/localtime is a soft link to /usr/share/zoneinfo/Asia/Shanghai on my machine,  now both d8 and chromium return the same timezone: GMT+0800.

But if I copy /usr/share/zoneinfo/Asia/Shanghai to like /usr/share/zoneinfo/Asia/Shanghaiiii, and replace /etc/localtime with a soft link to the new timezone file, then d8 and the timedatectl command still get +0800, but chromium will get +0000.

So I wonder why the name of timezone file can prevent chromium from getting the right timzone? Any help would be appreciated, thanks!

Best regards,
Zhao Jiazhong
Reply all
Reply to author
Forward
0 new messages