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

May need to make America/Detroit in cron config configurable #1432

Closed
jonespm opened this issue Sep 13, 2022 · 2 comments · Fixed by #1489
Closed

May need to make America/Detroit in cron config configurable #1432

jonespm opened this issue Sep 13, 2022 · 2 comments · Fixed by #1489

Comments

@jonespm
Copy link
Member

jonespm commented Sep 13, 2022

Noticed this when I was reviewing the cron updates. I'm not sure if this is the same for other schools that might be hosted but this value that's used in the cron config should probably come from the django.conf settings.TIME_ZONE or a probably a new value to indicate the time zone in the database? There's 2 usages of this.

This looks like it was in the previous UDW config so it may not be an issue, or it might just not be one reported yet.

lar.posted_at at time zone 'America/Detroit' as grade_posted_local_date,

@cosimps
Copy link

cosimps commented Feb 16, 2023

Unizin supports making this configurable.

Currently, the Unizin hosted MyLA instances, both the django app and the cron, run with the America/Detroit timezone based on:

Unizin would prefer being able to set this via a config variable as it runs all of its hosted MyLA instances in the same cloud region that defaults the UTC time, so inheriting the timezone via a default compute method would not be ideal.

It appears as though the timezone setting is already configurable via both the TZ and TIME_ZONE variables.

It would be ideal for Unizin if the queries that MyLA runs respected those variables that are already being imported at runtime. Queries in question:

Also see #1484 as it pertains to this being computed correctly.

jonespm added a commit to jonespm/student-dashboard-django that referenced this issue Mar 6, 2023
Also Fixes tl-its-umich-edu#1432 - May need to make America/Detroit in cron config configurable
@jonespm jonespm moved this from To do to In progress in MyLA-2023.01.02 Mar 6, 2023
@zqian zqian removed their assignment Mar 9, 2023
MyLA-2023.01.02 automation moved this from In progress to Review/QA Mar 20, 2023
@jennlove-um jennlove-um moved this from Review/QA to Review/QA - DEV in MyLA-2023.01.02 Mar 29, 2023
@pushyamig
Copy link
Contributor

I changed the TZ value in .env to `"America/Chicago" and ran the cron, I see that assignment and submission tables where local data is present, it populated correct date based on timezone.

Test Pass

@pushyamig pushyamig moved this from Review/QA - DEV to Done in MyLA-2023.01.02 Apr 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

5 participants