Repository navigation
fix(cron): normalize interval run times to UTC - #1013
Open
Achordchan wants to merge 1 commit into
Open
Achordchan wants to merge 1 commit into
Achordchan wants to merge 1 commit into
Conversation
This branch has not been deployed
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.
Change Summary
Interval schedules currently format non-UTC clock times with a literal
+00:00suffix. For example, advancing2099-01-01T09:00:00+08:00by one hour produces10:00+00:00instead of02:00+00:00, shifting the next run by eight hours. This also affects persisted offset-bearingnext_run_atvalues advanced byJobManager.record_result().Convert interval results to UTC before formatting in both scheduling paths. Preserve the existing interpretation of naive interval base times as UTC. No new configuration or dependencies.
Tests cover positive/negative offsets, UTC, naive inputs and overdue fast-forwarding. The original implementation fails the offset regression cases. A temporary-directory check through
JobManagerand the JSON repository confirms the correct next run is persisted and reloaded.Validation:
python -m pytest tests/cron -q(106 passed), changed-file pre-commit checks, andgit diff --check. Full-repository pre-commit was also attempted; it reports existing lint/style failures, including.dev_scripts/webui/oss_distribution.py:140andms_agent/config/skills_manager.py:61. Unrelated automatic formatting was excluded from this patch.Prepared and tested with Codex assistance.
Related issue number
None; found while checking timezone handling in the cron parser and scheduler. This does not overlap #997's one-shot timestamp validation.
Checklist
pre-commit installandpre-commit run --all-filesbefore git commit, and passed lint check. Both ran; baseline failures are described above.