Skip to content

fix : replace deprecated datetime.utcnow with timezone-aware alternative in code_review - #1484

Open
tmdeveloper007 wants to merge 2 commits into
komalharshita:mainfrom
tmdeveloper007:#1479
Open

fix : replace deprecated datetime.utcnow with timezone-aware alternative in code_review#1484
tmdeveloper007 wants to merge 2 commits into
komalharshita:mainfrom
tmdeveloper007:#1479

Conversation

@tmdeveloper007

Copy link
Copy Markdown
Contributor

Summary of What Has Been Done

Replaced all 5 occurrences of the deprecated datetime.utcnow() with the timezone-aware datetime.now(timezone.utc) in src/utils/code_review.py.

Changes:

  • Updated import: from datetime import datetime -> from datetime import datetime, timezone
  • Updated submit_code: datetime.utcnow() -> datetime.now(timezone.utc)
  • Updated start_review: datetime.utcnow().timestamp() -> datetime.now(timezone.utc).timestamp()
  • Updated start_review started_at: datetime.utcnow() -> datetime.now(timezone.utc)
  • Updated add_feedback_comment: datetime.utcnow() -> datetime.now(timezone.utc)
  • Updated complete_review: datetime.utcnow() -> datetime.now(timezone.utc)

Changes Made

  • 1 file changed, 6 insertions, 6 deletions

Impact it Made

  • Eliminates DeprecationWarning in Python 3.12+
  • All timestamps are consistently timezone-aware

Closes #1479

Note

Please assign this PR to the tmdeveloper007 account.

@vercel

vercel Bot commented Aug 4, 2026

Copy link
Copy Markdown

Someone is attempting to deploy a commit to the komalsony234-1530's projects Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix : replace deprecated datetime.utcnow with timezone-aware alternative in code_review

1 participant