Homec4science

Fix an issue where All Day events could return a DateTime with the wrong…

Authored by epriestley <git@epriestley.com> on Nov 16 2016, 16:21.

Description

Fix an issue where All Day events could return a DateTime with the wrong timezone

Summary:
Ref T11816. When building a PHP DateTime object, we favored the DateTime's timezone over the viewer's timezone, even for all-day dates.

This is incorrect: we should return all-day dates in the viewer's timezone, since otherwise the display layer will adjust them to the "correct" timezone.

Now non-all-day dates retain the old logic; all-day dates favor the viewer's timezone.

This only meaningfully affected display stuff since all the epoch logic was already correct.

Test Plan: Created an all day event, changed timezone forward/backward, observed dates still rendering correctly in tooltips and subheaders.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T11816

Differential Revision: https://secure.phabricator.com/D16879

Details

Committed
epriestley <git@epriestley.com>Nov 16 2016, 16:41
Pushed
aubortMar 17 2017, 12:03
Parents
rPHU57ee1d81e7aa: When importing ICS files, map "W. Europe Standard Time" to "Europe/Berlin"
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPHU0fc47e92f9fc: Fix an issue where All Day events could return a DateTime with the wrong… (authored by epriestley <git@epriestley.com>).Nov 16 2016, 16:41