firefox does not say system timezone. why?
Hi!
When I set my /etc/localtime to Etc/TAI ( http://www0.wgboome.org/zoneinfo-TAI.tar.xz (warning: i'm not completely sure that the tm_gmtoff field changes in the right second...)), then tzname/locatime/gmtime say this: TAI/TAI 2018-09-01T20:16:45+00:00:37(TAI) 2018-09-01T20:16:08+00:00:00(UTC)
But: Firefox does say UTC instead of TAI: http://arne.wow64.net/tai.html Furthermore the time is not UTC but the system time (which is TAI) (see screenshot).
Here they have the same problem: http://priyom.org/number-stations/station-schedule They say it is "UTC time", but in fact the displayed time is TAI (i. e. 37 seconds off (currently)).
What else do I need to change, so that firefox shows the system time&timezone correctly?
Thx.
Bye Arne
All Replies (15)
Clocks are controlled by the O/S and system board not by the Browser. It uses what is given to it.
WestEnd said
Clocks are controlled by the O/S and system board not by the Browser. It uses what is given to it.
hmmm... but why does `date +%Z` say "TAI" and `firefox` says "UTC" (timeZoneName:short) and "Coordinated Universal Time" (timeZoneName:long)...?
-arne
is it possible that firefox has its own zoneinfo files somewhere? it seems like it does not care for my system zoneinfo files... -arne
Stab in the dark, but would you try this please :
Type in the address bar about:config and press Enter (promise to be careful, if asked)
Type in the search bar and look for the preference :
privacy.resistFingerprinting
and set its value to false
Then close and restart Firefox.
If that doesn't change anything (and I doubt that it will), please change the value back.
Another stab in the dark - check the synchronization :
1. privacy.resistFingerprinting is false by default here... so i set all the other resistFingerprinting related variables to false or 0 too... but it did not help... 2. timedatectl says this (it omits the seconds timezone offset (on my box it is 37sec) and it says that i dont have an NTP server, although i have one, that i wrote myself *giggle*): > timedatectl status Local time: Sun 2018-09-02 09:48:25 TAI Universal time: Sun 2018-09-02 09:47:48 UTC RTC time: Sun 2018-09-02 09:47:49 Time zone: Etc/TAI (TAI, +0000) System clock synchronized: no NTP service: inactive RTC in local TZ: no 3. here is what my box thinks about several timezones: > unset TZ;date;export TZ=Europe/Berlin;date;export TZ=UTC;date Sun Sep 2 09:52:35 TAI 2018 Sun Sep 2 11:51:58 CEST 2018 Sun Sep 2 09:51:58 UTC 2018 > unset TZ;date -d '@1483228827';export TZ=Europe/Berlin;date -d '@1483228827';export TZ=UTC;date -d '@1483228827' Sun Jan 1 00:00:37 TAI 2017 Sun Jan 1 01:00:00 CET 2017 Sun Jan 1 00:00:00 UTC 2017 > unset TZ;date -d '@1483228826';export TZ=Europe/Berlin;date -d '@1483228826';export TZ=UTC;date -d '@1483228826' Sun Jan 1 00:00:36 TAI 2017 Sun Jan 1 00:59:60 CET 2017 Sat Dec 31 23:59:60 UTC 2016
i think my box is not the reason for the problems...
it feels like, firefox's javascript does not use the UNIX timezone names (in tzname) and it does not use /etc/localtime properly...
where does firefox find the long timezone name? it seems to b some non-standard source... can i change it without recompiling the full package?
furthermore firefox thinks that 1535882382 seconds after the start of 1970-01-01T00:00:00UTC corresponds to 20180902T09:59:42UTC, although it should be 20180902T09:59:15UTC... it seems like, firefox does not know of the leap seconds since 1970 (it just knows the initial TAI-UTC offset at the beginning of 1970), although `date`knows it quite well...
cant firefox do it like `date` somehow?
-arne
Diubah
You know, quite frankly, I don't understand what the real problem is.
The header of your original post reads :
"firefox does not say system timezone "
Where exactly do you want Firefox to show that you're on TAI and not on UTC ? What practical problems are you facing because of this ? The only actual difference between the two are (around) 37 seconds - how is it causing any problems when/if Firefox , for whatever reason, disregards those seconds ?
(just curious ..... )
What does this code report in the Web Console?
- "3-bar" menu button or Tools -> Web Developer
- (new Date()).toLocaleString(); // use this to get the time in your current time zone
- (new Date()).toUTCString(); // use this to get the time in UTC (GMT)
- (new Date()).getTimezoneOffset();
- (new Date()).toLocaleString("en-US",{weekday:"long",day:"numeric",month:"long",year:"numeric",hour:"numeric",minute:"numeric",second:"numeric",hour12:false,timeZoneName:"long"});
cor-el said
What does this code report in the Web Console?
(new Date()).toLocaleString() + "\n" + (new Date()).toUTCString() + "\n" + (new Date()).getTimezoneOffset() + "\n" + (new Date()).toLocaleString('en-US', { weekday: 'long', day: 'numeric', month: 'long', year: 'numeric', hour: 'numeric', minute: 'numeric', second: 'numeric', hour12: false, timeZoneName: 'long'});
/* 9/2/2018, 2:16:10 PM Sun, 02 Sep 2018 14:16:10 GMT -0.16666666666666666 Sunday, September 2, 2018, 14:16:10 Coordinated Universal Time */
NB: i pressed "Run" at or about at 2018-09-02T14:16:20TAI...
McCoy said
You know, quite frankly, I don't understand what the real problem is. The header of your original post reads : "firefox does not say system timezone " Where exactly do you want Firefox to show that you're on TAI and not on UTC ? What practical problems are you facing because of this ? The only actual difference between the two are (around) 37 seconds - how is it causing any problems when/if Firefox , for whatever reason, disregards those seconds ? (just curious ..... )
the problem is, that firefox always gets the time wrong by about 27seconds... or it gets the start of the minute wrong (the seconds roll over to 00, but the minute stays the same for 10 seconds...)... LOL the timezone is also always wrong... although i cannot find such behavior in my system time...
cant firefox just use the system time instead of doing something on its own?
Diubah
RIDDICC said
the problem is, that firefox always gets the time wrong by about 27seconds... or it gets the start of the minute wrong (the seconds roll over to 00, but the minute stays the same for 10 seconds...)... LOL
Yes, I gathered that, but how is it a problem when you're surfing the web, visiting sites, working online, sending emails, stuff like that ?
(still just curious ..... )
McCoy said
Yes, I gathered that, but how is it a problem when you're surfing the web, visiting sites, working online, sending emails, stuff like that ? (still just curious ..... )
it just looks like i m too dumb to read the clock...
i mean: it just makes me nervous... since some years i m used to a clock that has an accuracy of <10msec and a stability of <1ppm... and now it is up to 60 seconds off, after i tried to eliminate this biggest source of instability (the leap seconds, which google turns into an instability of 14ppm for 20hrs, IIRC)... "like a splinter" (Morpheus in The Matrix)... giggle
here is an another example of what my system clock says: > unset TZ;date -d '@0';export TZ=Europe/Berlin;date -d '@0';export TZ=UTC;date -d '@0' Thu Jan 1 00:00:10 TAI 1970 Thu Jan 1 01:00:00 CET 1970 Thu Jan 1 00:00:00 UTC 1970
-arne
RIDDICC said
it just looks like i m too dumb to read the clock...
No - it's just like you're too much of a perfectionist when it comes to time settings. And I'm too dumb to 'get' your problem .....
i mean: it just makes me nervous...
Here's a thought : Why don't you just forget about this whole TAI thing and just stick to UTC ? (unless of course you really need TAI for work)
McCoy said
Why don't you just forget about this whole TAI thing and just stick to UTC ?
at least on 1 of my boxes i need a time that has no missing seconds... this leap second "smearing" would be bad, because i have a USB device that has its own clock, that would look damaged for hours... and then the alarm horns r acting up (but not those battery backuped horns for potential dry ice accidents...)... giggle
so i could use UTC from /usr/share/zoneinfo-leaps instead of from /usr/share/zoneinfo-posix.... but then there is NTP, that sends wrong timestamps, i guess... so i use my own NTP and my own zoneinfo file (Etc/TAI), because i read some times, that leap seconds and DST should disapear anyway...
so it is difficult to teach firefox to use system time?
or is this the wrong place to ask? should i ask a javascript support place? that would be Oracle now, right?
-arne
RIDDICC said
so it is difficult to teach firefox to use system time? or is this the wrong place to ask? should i ask a javascript support place? that would be Oracle now, right?
I don't think that this is the wrong place to ask - but I am definately the wrong person trying to find a proper answer for you ..... :(
You just hang in there - somebody else is bound to come up with the right solution (fingers crossed).
my javascript had to move here: http://arne.dyndns.dk/
after some changes it looks like javascript uses its own zoneinfo-files, that do not know about those 27 leap seconds since the start of 1970...
-arne