1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-22 05:20:56 +01:00

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
This commit is contained in:
lkassianik 2015-05-08 08:07:52 -07:00
parent 7c96ba4ced
commit 559ba4e944

View file

@ -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;
}