HomePhabricator

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

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