From 36e623bfb82b4b3157f441ea9cc4c8900ac45788 Mon Sep 17 00:00:00 2001 From: Yannick Warnier Date: Tue, 26 Dec 2017 10:51:53 -0500 Subject: [PATCH] Sessions: Fix issue with sessions access date in after-UTC timezones - refs #2257 --- main/inc/lib/userportal.lib.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main/inc/lib/userportal.lib.php b/main/inc/lib/userportal.lib.php index 9cbc562e04..8ff2f310fa 100755 --- a/main/inc/lib/userportal.lib.php +++ b/main/inc/lib/userportal.lib.php @@ -1434,7 +1434,8 @@ class IndexManager // Declared listSession variable $listSession = []; - $session_now = time(); + // Get timestamp in UTC to compare to DB values (in UTC by convention) + $session_now = strtotime(api_get_utc_datetime(time())); if (is_array($session_categories)) { foreach ($session_categories as $session_category) { $session_category_id = $session_category['session_category']['id'];