Incorrect time for 'Last login' in User activity report

Bug #1723784 reported by Robert Lyon
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Fix Released
High
Robert Lyon

Bug Description

Because elasticsearch records dates/times as UTC milliseconds we need to convert it back to the correct timezone offset before displaying the date.

Eg, elasticsearch returns for login: 15081408020000
so we need to divide by 1000
then find our timezone's offset, eg 46800
then add/subtract that depending if offset is positive or negative
So: 16 October 2017, 21:00 pm
Becomes: 16 October 2017, 08:00 am

Robert Lyon (robertl-9)
description: updated
Revision history for this message
Cecilia Vela Gurovic (ceciliavg) wrote :
Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/8144
Committed: https://git.mahara.org/mahara/mahara/commit/9dd5c16d39e32392a415cbc8bdfc728231f5ff96
Submitter: Robert Lyon (<email address hidden>)
Branch: master

commit 9dd5c16d39e32392a415cbc8bdfc728231f5ff96
Author: Robert Lyon <email address hidden>
Date: Mon Oct 16 08:10:40 2017 +1300

Bug 1723784: Fixing 'Last login' date to display in correct timezone

As elasticsearch records dates in UTC milliseconds

behatnotneeded

Change-Id: I98f1a92c2cccd795e5009cf334530aa0eecc28ba
Signed-off-by: Robert Lyon <email address hidden>

Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "17.10_STABLE" branch: https://reviews.mahara.org/8180

Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/8180
Committed: https://git.mahara.org/mahara/mahara/commit/8a49be8b35ff77e60fdb586edc413991cf074c6a
Submitter: Robert Lyon (<email address hidden>)
Branch: 17.10_STABLE

commit 8a49be8b35ff77e60fdb586edc413991cf074c6a
Author: Robert Lyon <email address hidden>
Date: Mon Oct 16 08:10:40 2017 +1300

Bug 1723784: Fixing 'Last login' date to display in correct timezone

As elasticsearch records dates in UTC milliseconds

behatnotneeded

Change-Id: I98f1a92c2cccd795e5009cf334530aa0eecc28ba
Signed-off-by: Robert Lyon <email address hidden>
(cherry picked from commit 9dd5c16d39e32392a415cbc8bdfc728231f5ff96)

Robert Lyon (robertl-9)
Changed in mahara:
status: In Progress → Fix Committed
Robert Lyon (robertl-9)
Changed in mahara:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.