Repository navigation
Fix --incremental-by-files skipping updated items east of UTC - #542
Merged
josegonzalez merged 1 commit intoNov 4, 2026
Merged
Conversation
The modification time of a saved issue, pull request or discussion was formatted in local time but labelled UTC, then compared with GitHub's UTC updated_at. East of UTC, items updated within the offset after they were saved were skipped and their changes missed; west of UTC, unchanged items were fetched again. The checkpoint time used when a repository has no updated_at or pushed_at had the same local-time mistake.
Iamrodos
force-pushed
the
fix/incremental-by-files-timezone
branch
from
November 3, 2026 22:44
b4e3c99 to
7f204b8
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
--incremental-by-filesskips an item when its saved file is newer than GitHub'supdated_at. The file time came fromdatetime.fromtimestamp(), which gives local time, but was labelledZand compared as UTC. East of UTC, an item updated shortly after its file was saved (within 11 hours in AEDT) looked unchanged, and the update was missed. West of UTC, unchanged items were fetched again. This PR compares in UTC.This PR makes the following changes:
get_repository_checkpoint_timehad the same mistake in its fallback for repositories with noupdated_atorpushed_at. It now usestime.gmtime()instead oftime.localtime().Compatibility
No breaking changes. Options, file formats, file names and the backup layout are unchanged, and existing backups work as they are. The fix changes only which items are skipped:
updated_atandpushed_at, so in practice the fallback isn't used, and existinglast_updatefiles aren't touched.Testing
tests/test_incremental_by_files.pyruns with the local time zone at UTC+10. For issues, pull requests and discussions, a file saved before the update is fetched again and one saved after is skipped. The checkpoint fallback is checked against UTC. The fetch-again cases and the checkpoint test fail without the fix.pytest: 186 passed under UTC, America/Los_Angeles and Australia/Sydney.flake8with CI's flags passes.--incremental-by-files. Fresh runs and immediate reruns matched, and both skipped all 866 issues and 422 pull requests on the rerun. With one issue file and one pull request file set an hour before theirupdated_at, master skipped both and this branch fetched exactly those two again.