[MNT] Modernize datetime handling and standardize error logging - Closes #737#738
Open
MOHITKOURAV01 wants to merge 2 commits intoaiondemand:developfrom
Open
[MNT] Modernize datetime handling and standardize error logging - Closes #737#738MOHITKOURAV01 wants to merge 2 commits intoaiondemand:developfrom
MOHITKOURAV01 wants to merge 2 commits intoaiondemand:developfrom
Conversation
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.
LLM generated content, by Gemini 3 Flash
Changes
This PR modernizes the timestamp handling across the codebase and improves the internal logging and synchronization logic for better reliability.
Change Type: Changed/Fixed
Change Category: Internal/Other
Changelog Entry:
Modernized datetime handling by replacing deprecated methods with timezone-aware alternatives and standardized error logging.
datetime.utcnow()anddatetime.utcfromtimestamp()with timezone-awaredatetime.now(UTC)in core models (aiod_entry.py,bookmark.py), routers, and connectors to ensure Python 3.12+ compatibility.error_handling.pyto uselogging.exception()instead oftraceback.print_exc(), providing better traceability in production logs.synchronization.pyto utilize thecsvmodule for robust error reporting and removed redundant logic.test_bookmark_endpoints.pyto support timezone-aware timestamp comparisons.How to Test
The changes can be verified by running the existing test suite. No special environment setup is required beyond the standard development installation.
pip install -e .python -m pytest src/tests/src/tests/directory pass successfully without timezone mismatch errors.Checklist
Related Issues
Closes #737