diff options
author | emkael <emkael@tlen.pl> | 2016-03-16 01:11:03 +0100 |
---|---|---|
committer | emkael <emkael@tlen.pl> | 2016-03-16 01:11:03 +0100 |
commit | 81890fab8952f6ee9dcb1f3c0a577472cf7c4fd6 (patch) | |
tree | 4b3ed536f83f0877e1be6b89cd687d9c0d44c727 /app/php/dto/EventDTO.php | |
parent | aa633881b411c81009d4e1d394d30c950da9c70f (diff) |
* respecting timezone preference for events
Diffstat (limited to 'app/php/dto/EventDTO.php')
-rw-r--r-- | app/php/dto/EventDTO.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/app/php/dto/EventDTO.php b/app/php/dto/EventDTO.php index 4a16505..b1042b1 100644 --- a/app/php/dto/EventDTO.php +++ b/app/php/dto/EventDTO.php @@ -15,7 +15,9 @@ class EventDTO { $this->Location = $event->Location; $utc = new DateTimeZone('UTC'); - $targetTz = new DateTimeZone(date_default_timezone_get()); + $targetTz = new DateTimeZone( + Prado::getApplication()->getUser()->getTimezonePreference()->Name + ); $beginDate = new DateTime($event->BeginDate, $utc); $endDate = new DateTime($event->EndDate, $utc); if ($event->AllDay) { |