Closed Bug 1158733 Opened 9 years ago Closed 3 years ago

Detect system timezone from Javascript Internationalization API

Categories

(Calendar :: Internal Components, defect, P2)

defect

Tracking

(thunderbird_esr91 wontfix, thunderbird93 wontfix)

RESOLVED FIXED
94 Branch
Tracking Status
thunderbird_esr91 --- wontfix
thunderbird93 --- wontfix

People

(Reporter: Fallen, Assigned: mschroeder)

References

Details

Attachments

(1 file)

With the Intl API its possible to get the system timezone in one line of code. This would mean we can get rid of the whole guessSystemTimezone. Here is how:

Intl.DateTimeFormat().resolvedOptions().timeZone

Requires bug 895737 and maybe bug 837961 fixed.
Whiteboard: [timezone]
What is guessSystemTimezone? I can't find in the source.

Is there a chance that this is already fixed?
Flags: needinfo?(philipp)
Zibi, here is the function "guessSystemTimezone" in Lightning: https://dxr.mozilla.org/comm-central/source/calendar/base/src/calTimezoneService.js#299
Yes, it does seem Intl.DateTimeFormat().resolvedOptions().timeZone gives the most current timezone, this bug could probably be fixed in Lightning now.

Of course having a way to detect if the timezone changes would be favorable, I'm not sure if that is possible yet.
Flags: needinfo?(philipp)
Keywords: good-first-bug
I'm using TB 52.5 under Windows 10 and the timezone is still not automatically changed using the system timezone. Do you plan to implement it shortly?
Thanks!
This is still blocked by bug 895737 (effectively by bug 1343826; I just checked, a runtime change of the system timezone is still not detected). That said, once that is fixed, we're happy to consider this bug for the then upcoming esr version.

Hi, Can I work on this? I am new.

Blocks: 1609219
Priority: -- → P2
Depends on: 1343826
Assignee: nobody → mschroeder
Status: NEW → ASSIGNED
Blocks: 1606357

Removing the dependency on bug 1343826 to move the topic "system timezone change" to bug 1606357.

No longer depends on: 1343826, 895737
Blocks: 918336
Whiteboard: [timezone]

Very nice indeed, thx Martin!

Target Milestone: --- → 94 Branch

Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/4315d972034a
Detect system default timezone from JavaScript Internationalization API. r=darktrojan

Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
No longer blocks: 1609219
Regressions: 1734504
No longer regressions: 1734504

As Bug 1684021 appears to have messed up the Brazilian timezones DST again, would uplift of this to ESR be a suitable fix?

(In reply to Matt from comment #13)

As Bug 1684021 appears to have messed up the Brazilian timezones DST again, would uplift of this to ESR be a suitable fix?

This is only relevant for determining the system timezone at first start or when no timezone has been set in Thunderbird preferences for calendar. So, this is not a fix for the problem you described.

Regressions: 1760805
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: