Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
When we encounter a fanciful timezone identifier, try to guess what i…
…t might mean Summary: Ref T11816. My read of RFC 5545 is that applications can do whatever they want here. Although most applications use legal timezonedb values like "America/Los_Angeles", at least one ("Zimbra") has at least one event with a weird value (`TZID="(GMT-05.00) Auto-Detected"`). Try to puzzle out what these mysterious identifiers might intend. For now, I added a rule to look for "UTC+3", "GMT-2:30", etc. If we don't have any guesses, just use UTC. If we guess or fall back, raise a warning so the user can see what happened. Test Plan: Added a unit test. See also next change. Reviewers: chad Reviewed By: chad Maniphest Tasks: T11816 Differential Revision: https://secure.phabricator.com/D16800
- Loading branch information
epriestley
committed
Nov 4, 2016
1 parent
2b7b100
commit e409df2
Showing
4 changed files
with
91 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
12 changes: 12 additions & 0 deletions
12
src/parser/calendar/ics/__tests__/data/zimbra-timezone.ics
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
BEGIN:VCALENDAR | ||
VERSION:2.0 | ||
CALSCALE:GREGORIAN | ||
BEGIN:VEVENT | ||
CREATED:20161104T220244Z | ||
UID:zimbra-timezone | ||
SUMMARY:Zimbra Timezone | ||
DTSTART;TZID="(GMT-05.00) Auto-Detected":20170303T090000 | ||
DTSTAMP:20161104T220244Z | ||
SEQUENCE:0 | ||
END:VEVENT | ||
END:VCALENDAR |