Conversation
There was a problem hiding this comment.
Pull request overview
This PR fixes the timezone-awareness issue for the date_started field by replacing Django's Now() database function with a custom now() utility function that properly returns timezone-aware datetime objects.
Key changes:
- Replaced
django.db.models.functions.Now()with a customnow()utility function for setting thedate_startedfield - The custom
now()function returns timezone-aware datetime objects based on Django'sUSE_TZsetting
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
auvipy
left a comment
There was a problem hiding this comment.
do we need to check if the schema migrations is needed for this change?
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
|
||
| if status == states.STARTED: | ||
| task_props['date_started'] = Now() | ||
| task_props['date_started'] = now() |
There was a problem hiding this comment.
I think we should also add tests to verify this change
Closes: #496