Homec4science

When we encounter a fanciful timezone identifier, try to guess what it might…

Authored by epriestley <git@epriestley.com> on Nov 4 2016, 23:26.

Description

When we encounter a fanciful timezone identifier, try to guess what it 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

Details

Committed
epriestley <git@epriestley.com>Nov 5 2016, 00:36
Pushed
aubortMar 17 2017, 12:03
Parents
rPHU2b7b1007bf87: Add some stricter casts to PhutilCalendarAbsoluteDateTime serialization
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPHUe409df2720c2: When we encounter a fanciful timezone identifier, try to guess what it might… (authored by epriestley <git@epriestley.com>).Nov 5 2016, 00:36