Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chromium on Linux does not handle all timezones correctly #737

Open
boyd-ty opened this issue Jul 31, 2023 · 3 comments
Open

Chromium on Linux does not handle all timezones correctly #737

boyd-ty opened this issue Jul 31, 2023 · 3 comments

Comments

@boyd-ty
Copy link

boyd-ty commented Jul 31, 2023

Running a react web app which displays time based on timezone and the timezone and set to a common timezone US/Pacific, Chromium (version 114.0.5735.198). This react web app periodically updates the time that is displayed so that it is relatively synced with the underlying system.

I set on the Linux system the timezone Pacific/Guam. Chromium does not update the timezone and keeps the previous timezone that Chromium does handle correctly. This seems to be an issue for most of the Pacific group timezones, Asia group timezones, for some reason Etc group which has the GMT+/- offset, among others.

Is there a workaround or a version where these timezones do work in Chromium running on Linux? The windows version seems to have no issues. I changed the timezone of my windows machine to see the react app time update appropriately.

I did find an issue fairly similar to what I am experiencing logged against Chromium. https://bugs.chromium.org/p/chromium/issues/detail?id=1146599&q=localtime&can=2

@kraj
Copy link
Collaborator

kraj commented Jul 31, 2023

did you package all the timezone resource files into image ? defaults on OE/yocto is not do package all of the data.
secondly, when you switch the timezone, what process/cmds did you use ?

@boyd-ty
Copy link
Author

boyd-ty commented Jul 31, 2023

All the timezones are packaged and are available on my Linux system. Changing the timezone on the system involves change the symlink /etc/localtime to point to the desired timezone data in the timezone database. Running the date command on the Linux system results in the expected timezone to be applied.

@boyd-ty
Copy link
Author

boyd-ty commented Jul 31, 2023

If this is of any use, I am using the javascript calls to the browser to get the local time without setting the timezone so that I get what the system has set for timezone through the browser. Using a Date object obtain though 'new Date()' (example currentDate=new Date(), I make calls to currentDate.toLocaleDateString('en-US') and currentDate.toLocaleTimeString('en-US', {hour12: true, timeZoneName: 'short'}).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants