Samigo start, end, etc. dates change to unexpected dates when server, preferences, local timezones are different
GENERAL
TESTING
GENERAL
TESTING
Description
Samigo start, end, etc. dates change to unexpected dates when server, preferences, local timezones are different
For example:
Server timezone is HST
Set a Sakai user's preferences' timezone to PST
Set the user's local timezone (on their local machine) to EST
Create a new Samigo test
edit the settings and set the start date to: 10:00 am
save
The datepicker/browser will send over the date as (EST): 2018-09-24T10:00:00-04:00
Then AssessmentSettingBean.java (line 1120) will convert that date to (HST): Mon Sep 24 04:00:00 HST 2018
Then it gets store in the database as 2018-09-24 04:00:00, where mysql datetime ignores the timezone.
Then back in Samigo, re-edit the test settings
The date will then be displayed as the User Preferences timezone (PST): 09/24/2018 07:00 am (with hidden input startDateISO8601: 2018-09-24T07:00:00-04:00)
Then re-save without changing the date, AssessmentSettingBean.java again, converts that date to (HST): 2018-09-24 01:00:00
And it gets stored in the db as 2018-09-24 01:00:00
Samigo start, end, etc. dates change to unexpected dates when server, preferences, local timezones are different
For example:
Server timezone is HST
Set a Sakai user's preferences' timezone to PST
Set the user's local timezone (on their local machine) to EST
Create a new Samigo test
edit the settings and set the start date to: 10:00 am
save
The datepicker/browser will send over the date as (EST): 2018-09-24T10:00:00-04:00
Then AssessmentSettingBean.java (line 1120) will convert that date to (HST): Mon Sep 24 04:00:00 HST 2018
Then it gets store in the database as 2018-09-24 04:00:00, where mysql datetime ignores the timezone.
Then back in Samigo, re-edit the test settings
The date will then be displayed as the User Preferences timezone (PST): 09/24/2018 07:00 am (with hidden input startDateISO8601: 2018-09-24T07:00:00-04:00)
Then re-save without changing the date, AssessmentSettingBean.java again, converts that date to (HST): 2018-09-24 01:00:00
And it gets stored in the db as 2018-09-24 01:00:00