calendar is having problems with time zones
Categories
(Calendar :: Lightning Only, defect)
Tracking
(Not tracked)
People
(Reporter: guy, Assigned: darktrojan)
Details
Attachments
(3 files)
|
68.52 KB,
image/png
|
Details | |
|
1.80 KB,
text/plain
|
Details | |
|
1.66 KB,
patch
|
pmorris
:
review+
pmorris
:
approval-calendar-esr+
|
Details | Diff | Splinter Review |
User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:72.0) Gecko/20100101 Firefox/72.0
Steps to reproduce:
Accepted a calendar invite (iCal format, as base64 encoded MIME email attachment). The invite contains date/times with time zones, example:
DTSTART;TZID="(UTC+12:00) Auckland, Wellington":20200121T120000
DTEND;TZID="(UTC+12:00) Auckland, Wellington":20200121T130000
Then I viewed this specific calendar entry (e.g. in the week view)
Actual results:
When viewing the calendar item, details of the invite are not visible (e.g. description, attendees, etc.).
The Error Console shows this exception:
RangeError: invalid time zone in DateTimeFormat(): (UTC+12:00) Auckland, Wellington mozIntl.jsm:841:9
NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS: [JavaScript Error: "invalid time zone in DateTimeFormat(): (UTC+12:00) Auckland, Wellington" {file: "resource://gre/modules/mozIntl.jsm" line: 841}]'[JavaScript Error: "invalid time zone in DateTimeFormat(): (UTC+12:00) Auckland, Wellington" {file: "resource://gre/modules/mozIntl.jsm" line: 841}]' when calling method: [calIDateTimeFormatter::formatDateTime] calendar-item-bindings.js:72
set item chrome://calendar/content/calendar-item-bindings.js:72
onLoad chrome://calendar/content/calendar-summary-dialog.js:96
onload chrome://calendar/content/calendar-summary-dialog.xul:1
Expected results:
The proper invite details should be rendered in the event view pop up as expected. As well as they (some of them) are shown in the mouse over hover window.
| Assignee | ||
Comment 1•6 years ago
•
|
||
Can you attach the whole ical file? Change any personal info if you feel the need.
What I can tell you is that that is an unusual format for the timezone ID (I don't think I've seen it before) and it's also wrong. Auckland and Wellington are UTC+13 on those dates (okay you probably know that, and it's just a label). Where did it come from?
| Reporter | ||
Comment 2•6 years ago
|
||
| Reporter | ||
Comment 3•6 years ago
|
||
Attached the sample as it was generated by Amazon WorkMail's calendar, only changed personal details.
When received by email, it is attached as a MIME attachment in base64 encoding, in case that makes a difference.
--=_Knc93NEfSaEqXGTGZHE1bwKzKE2938jjSbC3WhMwnmKC1ONl
Content-Type: text/calendar; method=REQUEST; charset=utf-8
Content-Transfer-Encoding: base64
| Assignee | ||
Comment 4•6 years ago
|
||
The function in question only appears to like IANA timezone names (Pacific/Auckland) but there's no good way of knowing if any particular string is a valid timezone name. Next best thing is just to try, and do something else if we fail, I guess.
| Reporter | ||
Comment 5•6 years ago
|
||
I suppose any treatment but letting the exception go "untreated" is good. But if (as in this case) a substring matching a regex (untested) in the likes of UTC([+-])[0-9]{2}:[0-9]{2} appears, it may be suitable to use that for a fallback treatment.
Somehow, the calendar is doing "The Right Thing" (TM) already as it's diarising the event correctly. So I guess it's just this part of the UI that's having the issue with the time zone.
Cheers for drilling into the issue so promptly!!!
| Assignee | ||
Updated•6 years ago
|
Comment 6•6 years ago
|
||
| Assignee | ||
Comment 7•6 years ago
•
|
||
If it throws, formatter will have the same value it already had.
Comment 8•6 years ago
|
||
| Assignee | ||
Comment 9•6 years ago
|
||
This already logs "RangeError: "invalid time zone in DateTimeFormat(): XYZ"" with a stack trace. I'll leave a comment in the code about IANA zones should anyone follow the error link back to it.
Comment 10•6 years ago
|
||
Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/f2e3b944020b
Fail gracefully when formatting a date with a timezone unknown to Services.intl. r=pmorris
| Assignee | ||
Updated•6 years ago
|
Comment 11•6 years ago
|
||
| bugherder uplift | ||
Thunderbird 68.5.0:
https://hg.mozilla.org/releases/comm-esr68/rev/c6feba744006
Updated•5 years ago
|
Updated•5 years ago
|
Description
•