Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 357809 - chromium ignores time zone setting
Summary: chromium ignores time zone setting
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Chromium Project
URL: http://code.google.com/p/chromium/iss...
Whiteboard: ht-wanted
Keywords:
: 359215 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-03-07 19:20 UTC by Jon Wagoner
Modified: 2011-03-29 14:24 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jon Wagoner 2011-03-07 19:20:21 UTC
Chromium is ignoring the time zone of my computer.  It is displaying everything as UTC time.

I first noticed this in GMail, since all of the times on the messages were wrong.  They are correct in firefox though.  While trying to search on this problem I found someone suggesting to run javascript:new Date().toString() in the browser.  In Firefox it shows CST, but Chromium has:

Mon Mar 07 2011 19:02:15 GMT+0000 (UTC)

Reproducible: Always

Steps to Reproduce:
1.Load chromium
2.Browse to gmail, or enter javascript:new Date().toString()
3.
Actual Results:  
Time is shown without timezone applied

Expected Results:  
Time is shown with timezone applied

This happened when I updated to chromium-10.0.648.127 over the weekend.
Comment 1 Mike Gilbert gentoo-dev 2011-03-07 21:19:51 UTC
I have run into this myself. See URL for an upstream report. I'm sure there are some dups upstream as well.

As I indicated in a comment upstream, you can probably work around this by setting the TZ variable in your environment rather than relying on /etc/localtime.
Comment 2 Paweł Hajdan, Jr. (RETIRED) gentoo-dev 2011-03-12 14:51:40 UTC
Let's see what upstream says. If they close the bug without fix, please reopen this one.
Comment 3 Mike Gilbert gentoo-dev 2011-03-13 21:30:00 UTC
Actually, the upstream bug is rather old (2009), and it hasn't seen any developer attention yet. Given its age, it might even be a different issue.

Should we file a new bug? Or is there anything you can do to get it on someone's radar?
Comment 4 redneb 2011-03-16 21:51:55 UTC
*** Bug 359215 has been marked as a duplicate of this bug. ***
Comment 5 redneb 2011-03-16 21:58:06 UTC
This issue has to do with chromium-10.X now using a system wide v8 instead of the bundled one. It does not appear in chromium-9.X because the ebuild for that did use the bundled v8. Also, starting chromium 10 with --no-sandbox does give the correct time zone but of course disabling the sandbox is a bad idea.

Here are two more related upstream bugs:

http://code.google.com/p/chromium/issues/detail?id=16800
http://code.google.com/p/chromium/issues/detail?id=17997
Comment 6 Paweł Hajdan, Jr. (RETIRED) gentoo-dev 2011-03-19 14:45:28 UTC
Confirmed, after compiling chromium-11.x with bundled v8 the issue disappeared.

There is some code upstream to handle those /etc/localtime reads: http://codesearch.google.com/codesearch/p#OAMlx_jo-ck/src/content/browser/zygote_main_linux.cc&l=494&exact_package=chromium

For some reason it doesn't work when we link with v8 dynamically.

I'll think more about it and probably ask upstream for advice. If you have some ideas, please also post here.
Comment 7 Julien Sanchez archtester 2011-03-24 12:46:11 UTC
Little clue: this issue does not happen when --single-process flag is used:

Correct timezone:
/usr/lib/chromium-browser-live/chrome --user-data-dir=/tmp/tmpprofile -single-process

In inspector console: new Date() => Thu Mar 24 2011 13:44:25 GMT+0100 (CET)

Wrong timezone:
/usr/lib/chromium-browser-live/chrome --user-data-dir=/tmp/tmpprofile

In inspector console: new Date() => Thu Mar 24 2011 12:45:15 GMT+0000 (UTC)
Comment 8 Julien Sanchez archtester 2011-03-24 12:49:18 UTC
and little typo in my comment above, take care of the double dash before single-process

/usr/lib/chromium-browser-live/chrome --user-data-dir=/tmp/tmpprofile
--single-process
Comment 9 Paweł Hajdan, Jr. (RETIRED) gentoo-dev 2011-03-24 15:02:51 UTC
(In reply to comment #7)
> Little clue: this issue does not happen when --single-process flag is used:

Yeah, that causes it to run everything in the unsandboxed browser process.
Comment 10 Paweł Hajdan, Jr. (RETIRED) gentoo-dev 2011-03-29 14:24:29 UTC
I think this is fixed now by switching back to bundled V8.