How does chromium get timezone on linux?

233 views
Skip to first unread message

Zhao Jiazhong

unread,
Jul 2, 2021, 9:07:57 PM7/2/21
to Chromium-dev
Hi Chromium-dev,

I find a different behavior between d8 and chromium on linux:

1. When the /etc/localtime file is a soft link to like /usr/share/zoneinfo/Asia/Shanghai,
run "Date()" in d8 and chromium will both get "GMT+0800" as timezone.

2. But if I copy the /usr/share/zoneinfo/Asia/Shanghai to a strange name like /usr/share/zoneinfo/Asia/Shanghaiiii, and make a soft link to /etc/localtime, then:
"Date()" still gets "GMT+0800" as timezone in d8, but gets "GMT+0000" in chromium.

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

Best regards,
Zhao Jiazhong

Lei Zhang

unread,
Jul 2, 2021, 9:11:17 PM7/2/21
to zhaojia...@loongson.cn, Chromium-dev
Maybe take a look at
services/device/time_zone_monitor/time_zone_monitor_linux.cc?
> --
> --
> Chromium Developers mailing list: chromi...@chromium.org
> View archives, change email options, or unsubscribe:
> http://groups.google.com/a/chromium.org/group/chromium-dev
> ---
> You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev...@chromium.org.
> To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/87369223-dbde-433e-b1fd-3e5339e1047an%40chromium.org.
Reply all
Reply to author
Forward
0 new messages