HomePhabricator

Fix an issue where all-day events had durations applied incorrectly

Description

Fix an issue where all-day events had durations applied incorrectly

Summary:
Ref T11816. User-visible bug here was that availability dots (away/busy) for all-day events might not appear correctly if the viewer timezone and event timezone differ.

Underlying issue was that when adding a duration (one day) to an all-day event datetime, we incorrectly used the viewer timezone as part of the calculation.

Instead, base the calculation on a clone of the event with no viewer timezone.

Test Plan:

  • Added failing unit test, made it pass.
  • Saw proper availability dots for all-day events in Phabricator.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T11816

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