-
Notifications
You must be signed in to change notification settings - Fork 473
Calculate time_since_last_sync in UTC time. #964
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
base: main
Are you sure you want to change the base?
Conversation
Fixes issue when DST is changed between calculation.
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.
Pull Request Overview
This PR fixes a DST (Daylight Saving Time) issue in the scheduler by ensuring time calculations use UTC instead of local time. This prevents incorrect time_since_last_sync calculations when DST transitions occur between sync operations.
Key Changes:
- Modified
current_timeto use UTC timezone instead of naive local time
💡 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you please also add test to verify the change? can you also link relevant issue as well?
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #964 +/- ##
=======================================
Coverage 88.18% 88.18%
=======================================
Files 32 32
Lines 1007 1007
Branches 105 105
=======================================
Hits 888 888
Misses 101 101
Partials 18 18 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
please also check the failing tests due to this change |
|
https://docs.python.org/3/library/datetime.html#datetime.UTC was added in Python 3.11. |
auvipy
left a comment
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 still need some additional unit tests
|
I make test to this. When drafting test I noticed that |
Fixes issue when DST is changed between calculation.