T&Q: If preferred time and local time are different, the time is not converted correctly
Description
Attachments
Activity

Austin December 4, 2019 at 5:05 PM
hey yeah, that's weird.
try this:
Server time = EST
Sakai Preference = PST
Computer time = HST

Sam Ottenhoff December 4, 2019 at 4:06 PM
> The time on the assignments list shows an open date of 10:40 am
> Edit the quiz settings again.
> The time for the start date shows 10:40 am
> don't modify anything, but re-save
> The time on the assignments list page shows 9:40 am
Sorry I can't replicate. Server time EST. Computer time PST. Sakai Preference is CST.

Austin December 4, 2019 at 3:57 PMEdited
Here's the procedure I used:
Log in as instructor, go to Home > Preferences > Time Zone and set your time zone to be the same as the server time: US/Eastern different than the server time: *US/Central* (for some reason, when I tested before, it would fail with US/Eastern, but now that doesn't fail (maybe I was mistaken before?))
Set your local computer's operating system's time to something other than US/Eastern US/Central (I used US/Hawaii)
Create a site with Tests & Quizzes.
Create a quiz with at least one question
Edit Settings on the quiz and take note of the start date. e.g. 11:40 am (It appears to be in the OS's timezone)
Click Save.
go to the Assessment list page
The time on the assignments list shows an open date of 10:40 am
Edit the quiz settings again.
The time for the start date shows 10:40 am
don't modify anything, but re-save
The time on the assignments list page shows 9:40 am
Edit the quiz settings again
The time for the start date shows 9:40 am
said
I don't know how often it happens that an instructor has a different preferred time than the local time on their computer, but it would affect the open and due time. I personally don't change the time on my laptop when I enter a different timezone.
This happened to us once or twice. So maybe it's not that common? But I would guess that's more because not many of our instructors edit assignments when they travel. But I think it is common that people have their timezone set to "automatic" so it would change automatically when they travel.
Also, again, I'm not sure if it was bad testing on my part when I said that the server and user timezone preference can be the same, or if some other patch (maybe or ) fixed that, but that's no longer failing that way. So now... if you make the server, user preference, and OS timezones all different, it will fail.
I don't have edit permission on this JIRA, so if you could update the title that would be cool.

Andrea Schmidt December 3, 2019 at 8:55 PM
Yes, the time on the computer was 8:58 PM EST when the quiz was created, which would have been 6:58 MST, so the modified time is showing MST time.

Sam Ottenhoff December 3, 2019 at 8:39 PM
> Notice the open time is "now"
The open time should be whatever is set by the instructor. I realize that the default time goes to the computer time zone, but I just don't think it's a priority issue.
> , while the modified time is 2 hours earlier
But modified time is correctly showing in the preferred time zone, right?
Details
Priority
MajorAffects versions
Components
Assignee
Core TeamCore TeamReporter
Andrea SchmidtAndrea SchmidtEnvironment
21x: https://trunk-mysql.nightly.sakaiproject.org/, build: 2acbb58a
Win10: Firefox, Chrome
Details
Details
Priority
Affects versions
Components
Assignee

Reporter

brought up a test case in and SAK-40226. If the user's preferred time and the user's local time are in different time zones, the times get out of whack on the assessments page.
I think one question that needs to be answered is if the preferred and local time are different, which time should actually be used when creating a quiz?
1_mham_mtn_local_est_preferred.mp4
This video is when the instructor's local time is set to mountain time, but preferred time is set to eastern time. At first, things look correct, times are saving correctly, updating correctly, and display as set on the assessments page.
Going into the other computer as a different instructor, local, preferred and server time are all eastern, the times set by the instructor in mountain time are actually displaying as the same time for the instructor in the eastern time. (1a_different_instructor_est.mp4)
2_mham_est_local_mtn_preferred.mp4
Instructor's local time is eastern, but preferred time is set to mountain time. Now the times on the "publish" page display "mst" behind the available and due times, but the times are actually eastern time.
If the user's preferred time zone and the local time zone are the same, this is working correctly now.