Vivaldi ignores system time zone when hwclock is set to UTC
-
My Vivaldi install is telling web apps such as Jira that my time is the UTC time, ignoring my time zone setting. I have set my
hwclock
to UTC time, and defined my timezone (viatzselect
) to Canada/Pacific, which is UTC-8. Vivaldi shows its own date time (if enabled in the bottom toolbar) as 8 hours ahead of my actual local time.I do not want to set my laptop's BIOS clock to localtime just to satisfy Vivaldi. Is there a setting to inform the browser of my time zone? Why is the browser not using the operating system's time zone setting?
System: Devuan GNU/Linux 4 x86_64
Vivaldi 6.5.3206.48 (Stable channel) stable (64-bit)
Revision 8fb9c888b3427e1d18677fdbb0b537f856ef577b
OS Linux
JavaScript V8 12.0.267.10
User Agent Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36
Command Line /usr/bin/vivaldi-stable --flag-switches-begin --flag-switches-end --desktop-startup-id=xfce4-panel/exo-open/3828-78-rlm-devuan_TIME1207296285 --origin-trial-disabled-features=WebGPU --save-page-as-mhtml
Executable Path /opt/vivaldi/vivaldi
Profile Path /home/russtopia/.config/vivaldi/Default
Variations Seed Type Null -
What time do you get on Chromium/Chrome? On my Gnome system the time in Vivaldi changes with the time I set in time and date settings, so it’s equal to the time displayed in the operating system. And as it turns out this also sets hwclock, so yes, seems like you are stuck with this time. I don’t think that’s a bug.
-
I do have a test install of chromium (might be a bit old...) but I cannot find anywhere a way to show the browser's view of time, like Vivaldi does on the bottom toolbar.
I am quite sure my time setup is 'valid', on a shell commandline
date
gives me the locally-adjusted time and my TZ env var is set (through my ~/.profile).Vivaldi should (IMO) be querying date via the OS's timezone setup as well. Web apps which are asking my browser for my localtime get UTC.
It would seem very strange (and incorrect) if Vivaldi is not checking time via some equivalent of
date
orlocaltime(3)
, and directly queryinghwclock
. -
@Russtopia Have you tried synchronizing the hardware clock with the system clock?
-
@Russtopia What do your web apps which query the Chromium browser get as time? You should really try to test this with Chromium, because then it’s an upstream issue and you would be issuing a feature request to Vivaldi. If it works upstream however, it’s a possibly a bug and could be discussed.
-
@Aaron Just tried that:
$ hwclock --hctosys
No effect. They already seemed to be in sync.
So it really does seem as though the browser is using the
hwclock
time, or not applying timezone settings.I will try comparing against Chromium, if I can just figure out how to enable the same feature as Vivaldi to display its idea of time in the toolbar.. or is there some other part of Chrome where I can see it's idea of time?
Failing that I guess if I log into one of the web services where I first noticed the issue (a timesheet entry page in Jira), maybe that will show me.
Another interesting data point: I just noticed that calendar.google.com does show my proper local time. Are there different ways a web app can query a users' time? How does Google know my proper localtime even if Vivaldi reports UTC?
So confusing.
-
@Russtopia What do you see when visiting the NIST website?
Also... have you tried changing settings in General>Language>Preferred Date & Time?
-
@lfisk The NIST site shows what's expected for current Canada/Pacific and UTC time.
Here's my current hwclock/local time setup:
root@rlm-devuan:/home/russtopia/pkgs# hwclock --get 2024-02-16 18:26:00.881163-08:00 root@rlm-devuan:/home/russtopia/pkgs# date Fri 16 Feb 2024 06:26:02 PM PST root@rlm-devuan:/home/russtopia/pkgs# echo $TZ America/Vancouver
(... then I closed all Vivaldi windows and restarted the browser just in case it needed to re-pull the clock settings.)
..and my Settings screen: Preferred Date & Time Format section, plus The Vivaldi clock in the lower-right of the toolbar:
-
@luetage Does your version of Chromium even have an option to show a clock in the toolbars? I can't find such an option.
-
I even tried a browser extension to see if that would show a clock using my time zone... nope! If I check or un-check the "Show UTC time" the clock doesn't budge at all.
-
@lfisk Here's a screenshot of the NIST website, notice the 'Your Device's Clock' on the right shows the site detects my time as UTC+0 ... so I think the browser really is not picking up my $TZ settings.
Is it possible Vivaldi/Chrome is implicitly assuming the presence of some time API only present in systemd?
Devuan uses either rc-init or original sysv-init. I am using sysv-init.
-
@luetage I would check, but my Chromium install does not appear to have any clock widget I can add to a toolbar or other part of the browser UI to check, like Vivaldi has.
-
-
@Russtopia I tried resetting my TZ to America/Vancouver and the Vivaldi clock switched to Pacific time. Do you have a TZ setting in your Home directory, ~/.profile? If not you could try appending it to the end. Would look something like this (just append the TZ setting if not already there) and you have to logout and back in for it to take effect:
# ~/.profile: executed by the command interpreter for login shells. # This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login # exists. # see /usr/share/doc/bash/examples/startup-files for examples. # the files are located in the bash-doc package. # the default umask is set in /etc/profile; for setting the umask # for ssh logins, install and configure the libpam-umask package. #umask 022 # if running bash if [ -n "$BASH_VERSION" ]; then # include .bashrc if it exists if [ -f "$HOME/.bashrc" ]; then . "$HOME/.bashrc" fi fi # set PATH so it includes user's private bin if it exists if [ -d "$HOME/bin" ] ; then PATH="$HOME/bin:$PATH" fi TZ='America/Vancouver'; export TZ
That's the exact setting I changed to see how Vivaldi responded on my Debian 12 system. Depending on results... you could also try setting it to "America/Los_Angeles" which should also give the same -8 offset. Maybe there's something wrong with the "America/Vancouver" data causing troubles
-
This also threw me for a loop, and affected a lot of sites (calendars, calendly, email, discord in browser, etc) -- I'd been living with it for months, but finally had one scheduling mistake too many and grew to care enough to even log into these forums and share what I did so someone else can hopefully suffer a little less.
In my case, primarily running i3 as a window manager, I put this in
.xprofile
export TZ='America/Los_Angeles'
I don't quite understand why other applications (and some websites) seemed unaffected by having this
TZ
variable unset, but c'est la vie.Personally I think using
TZ
as a default is reasonable, and falling back todate
orhwclock
is also reasonable... I'd really prefer to have a setting in Vivaldi to override any of these, though I can appreciate that coordinating time is not trivial.