Closed Bug 1642496 Opened 4 years ago Closed 4 years ago

timezone is set incorrectly in Firefox on flathub

Categories

(Firefox Build System :: General, defect)

76 Branch
x86_64
Linux
defect

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: bailbinshamber, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Attached image bug.png

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:76.0) Gecko/20100101 Firefox/76.0

Steps to reproduce:

Going on http://browserspy.dk/date.php and checking time-zone offset

Actual results:

It says that the time-zone's offset is -180 minutes when it should have been -120 minutes.

Expected results:

Showing the actual timezone that the machine is set to.

BTW, doing 'flatpak run --command=sh org.mozilla.firefox' then 'cat /etc/timezone' returns the correct time zone, just like invoking the command from the native shell (without flatpak)

Renaming ~/.var/app/org.mozilla.firefox to ensure absolute default settings, doesn't fix it as well.

Actually cat /etc/timezone doesn't work on host filesystem "No such file or directory"

I'm on fedora Silverblue 32

Eitherway invoking date in both the host or flatpak sandbox return the same correct result.
https://drive.google.com/file/d/158fdjt2Uh4Q8X23bZIakfBYFlMMkicZl/view?usp=sharing

This bug might be related to https://github.com/flathub/com.skype.Client/issues/88

Component: Untriaged → Site Identity
OS: Unspecified → Linux
Hardware: Unspecified → x86_64

My time zone is Africa/Cairo

I made a dirty solution:
sudo flatpak override --env=TZ=$(flatpak run --command=cat org.mozilla.firefox /etc/timezone) org.mozilla.firefox which resulted in setting TZ=Africa/Cairo (my time zone)
Not optimal since the user would have to redo the command each time they have to change their time zone (which is probably very rare)
The problem I think is that somehow firefox just gets that my time zone is EET "eastern European time" without getting my exact time zone (I did TZ=EET-2 and it had the same bug) and that would be fine except in summer because of "daylight saving time" which is not applied in my time zone i.e Africa/Cairo.

I believe one solution is making the flatpak run an "sh" script which sets the TZ env to be read from /etc/timezone:
#!/bin/bash
TZ=$(cat /etc/timezone)
firefox
and make the .desktop file point to that script.

The severity field is not set for this bug.
:nhnt11, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(nhnt11)

This is not a Site Identity bug. Having said that I'm not sure where it belongs so punting it to General for re-triage.

Component: Site Identity → General
Flags: needinfo?(nhnt11)

The issue apparently has been fixed upstream in the flatpak framework https://github.com/flatpak/flatpak/issues/3338
I'm waiting for mine to update to version 1.8 to test it. if anybody has flatpak version 1.8 and the issue has been fixed, then please close this bug report.

Via comment 10, this sounds like this is an upstream bug.

Blocks: flatpak
Product: Firefox → Firefox Build System

I have just tested with flatpak version 1.8.2 and the issue has been fixed.

Status: UNCONFIRMED → RESOLVED
Closed: 4 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: