From 559ba4e94435141cdcf6177e0eef748950bb559e Mon Sep 17 00:00:00 2001 From: lkassianik Date: Fri, 8 May 2015 08:07:52 -0700 Subject: [PATCH] Change latest and earliest saved timezones on all day events to php official timezones instead of guessing GMT offsets Summary: Ref T8021, Change latest and earliest saved timezones on all day events to php official timezones instead of guessing GMT offsets Test Plan: On different versions of php, create and save all day event in various timezones without errors. Reviewers: epriestley, #blessed_reviewers Reviewed By: epriestley, #blessed_reviewers Subscribers: Korvin, epriestley Maniphest Tasks: T8021 Differential Revision: https://secure.phabricator.com/D12772 --- .../calendar/storage/PhabricatorCalendarEvent.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/applications/calendar/storage/PhabricatorCalendarEvent.php b/src/applications/calendar/storage/PhabricatorCalendarEvent.php index 5d4d3cdd5a..6f13d99112 100644 --- a/src/applications/calendar/storage/PhabricatorCalendarEvent.php +++ b/src/applications/calendar/storage/PhabricatorCalendarEvent.php @@ -62,7 +62,7 @@ final class PhabricatorCalendarEvent extends PhabricatorCalendarDAO $this->setDateFrom( $this->getDateEpochForTimeZone( $this->getDateFrom(), - new DateTimeZone('GMT+12'), + new DateTimeZone('Pacific/Kiritimati'), 'Y-m-d', null, $zone)); @@ -70,7 +70,7 @@ final class PhabricatorCalendarEvent extends PhabricatorCalendarDAO $this->setDateTo( $this->getDateEpochForTimeZone( $this->getDateTo(), - new DateTimeZone('GMT-12'), + new DateTimeZone('Pacific/Midway'), 'Y-m-d 23:59:59', '-1 day', $zone)); @@ -102,7 +102,7 @@ final class PhabricatorCalendarEvent extends PhabricatorCalendarDAO $zone, 'Y-m-d', null, - new DateTimeZone('GMT+12'))); + new DateTimeZone('Pacific/Kiritimati'))); $this->setDateTo( $this->getDateEpochForTimeZone( @@ -110,7 +110,7 @@ final class PhabricatorCalendarEvent extends PhabricatorCalendarDAO $zone, 'Y-m-d', '+1 day', - new DateTimeZone('GMT-12'))); + new DateTimeZone('Pacific/Midway'))); return $this; }