Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recompute timezone adjustments for a given date. #2655

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

drgrice1
Copy link
Member

@drgrice1 drgrice1 commented Jan 10, 2025

Different dates can have different timezone adjustments in the case that the client timezone and server timezone are different and one of those time zones adheres to daylight savings time and the other does not. For example if the client timezone is America/Phoenix and the server timezone is America/Chicago. The America/Phoenix timezone does not adhere to daylight savings time and is always UTC-7 while America/Chicago is UTC-5 during daylight savings time, but is UTC-6 during standard time. So if an instructor is in the America/Phoenix timezone, but working on a server set for the America/Chicago timezone and selects a date that is during daylight savings time while they are currently not observing daylight savings time, then the current code use an incorrect differential of 1 hour because it uses the same differential for all dates.

So this computes the timezone adjustment for a given date so that the correct timezone differential for that time is used.

This fixes issue #2654.

Different dates can have different timezone adjustments in the case that
the client timezone and server timezone are different and one of those
time zones adheres to daylight savings time and the other does not. For
example if the client timezone is America/Phoenix and the server
timezone is America/Chicago.  The America/Phoenix timezone does not
adhere to daylight savings time and is always UTC-7 while
America/Chicago is UTC-5 during daylight savings time, but is UTC-6
during standard time. So if an instructor is in the America/Phoenix
timezone, but working on a server set for the America/Chicago timezone
and selects a date that is during daylight savings time, then the
current code use an incorrect differential of 1 hour because it uses the
same differential for all dates.

So this computes the timezone adjustment for a given date so that the
correct timezone differential for that time is used.

This fixes issue openwebwork#2654.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant