Skip to content

fix : replaced deprecated datetime.utcnow with timezone-aware alternative in code_review - #1499

Open
tmdeveloper007 wants to merge 1 commit into
komalharshita:mainfrom
tmdeveloper007:fix/1494-code-review-datetime
Open

fix : replaced deprecated datetime.utcnow with timezone-aware alternative in code_review#1499
tmdeveloper007 wants to merge 1 commit into
komalharshita:mainfrom
tmdeveloper007:fix/1494-code-review-datetime

Conversation

@tmdeveloper007

Copy link
Copy Markdown
Contributor

Summary of What Has Been Done

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

Changes Made

  • Changed from datetime import datetime to from datetime import datetime, timezone in src/utils/code_review.py
  • Replaced 5 occurrences of datetime.utcnow() with datetime.now(timezone.utc):
    • Line 103: submitted_at timestamp
    • Line 131: review_id generation
    • Line 137: started_at timestamp
    • Line 181: created_at timestamp
    • Line 252: completed_at timestamp

Impact it Made

Eliminates deprecation warnings in Python 3.12+ and ensures correct timezone-aware timestamps in the code review system.

Closes #1494

Note: Please assign this PR to the tmdeveloper007 account.

@vercel

vercel Bot commented Aug 5, 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.

@github-actions github-actions Bot added gssoc-2026 type:bug Something isn't working labels Aug 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gssoc-2026 type:bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix : replace deprecated datetime.utcnow in code_review.py

1 participant