summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2016-03-16 01:07:44 +0100
committeremkael <emkael@tlen.pl>2016-03-16 01:07:44 +0100
commitfbca8e50c0d309fa37834ee64ba5c0c7a5732808 (patch)
tree44bb66798062506ad5642b777b393781455a68b7
parent18079887ee47d59055be6b911b41384cd4b8975a (diff)
* upcoming events based on current UTC time
-rw-r--r--app/php/components/UpcomingEvents.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/app/php/components/UpcomingEvents.php b/app/php/components/UpcomingEvents.php
index e18f2f4..301e740 100644
--- a/app/php/components/UpcomingEvents.php
+++ b/app/php/components/UpcomingEvents.php
@@ -22,9 +22,10 @@ class UpcomingEvents extends TTemplateControl {
}
private function _getEventsForUser(DbUser $user) {
+ $utc = new DateTimeZone('UTC');
$events = EventFacade::getInstance()->getEventList(
- date('Y-m-d'),
- date('Y-m-d', strtotime('+7 days')),
+ (new DateTime('now', $utc))->format('Y-m-d H:i:s'),
+ (new DateTime('+7 days', $utc))->format('Y-m-d H:i:s'),
$user->getCalendarPreference()
);
$calendars = Calendar::finder()->findAllByPks(