-
Notifications
You must be signed in to change notification settings - Fork 2
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
Issue 2204 - inaccurate message stats due to nonexistant UTC to local changes #1547
base: main
Are you sure you want to change the base?
Conversation
@@ -1,6 +1,8 @@ | |||
import calendar | |||
from datetime import date, datetime, time, timedelta | |||
|
|||
import pytz |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we should be using pytz. It alternates between being stable and generating flaky weirdness, depending on the upgrade.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we have removed pytz in api when making changes so this would be putting it back.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think there should be any changes on the API side. It is the job of the front end to pass UTC time to the backend and convert the backend's UTC time to whatever it needs on the front end.
We do not want to do time conversions on the back end because it adds a lot of complexity and generates defects. DB time is always UTC, backend expects to receive UTC, backend sends UTC. Front end does all conversions because only front end knows the local time, etc.
This is for issue: #2204
Related to PR - 2314
Changes