Skip to content

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

Open
tmdeveloper007 wants to merge 1 commit into
komalharshita:mainfrom
tmdeveloper007:#1407
Open

fix : replaced deprecated datetime.utcnow with timezone-aware alternative in code_review#1412
tmdeveloper007 wants to merge 1 commit into
komalharshita:mainfrom
tmdeveloper007:#1407

Conversation

@tmdeveloper007

Copy link
Copy Markdown
Contributor

Summary of What Has Been Done

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

Changes Made

  • Changed from datetime import datetime to from datetime import datetime, timezone in the import statement
  • Replaced datetime.utcnow() with datetime.now(timezone.utc) in 5 locations across the following methods:
    • submit_code method (submitted_at timestamp)
    • start_review method (review_id generation and started_at timestamp)
    • add_feedback_comment method (created_at timestamp)
    • complete_review method (completed_at timestamp)

Impact it Made

  • Eliminates Python 3.12+ deprecation warnings for datetime.utcnow()
  • Uses the recommended timezone-aware datetime approach throughout the code review module
  • Correct timestamp generation for code submissions, reviews, and feedback

Closes #1407.

Note: Please assign this PR to the tmdeveloper007 account.

@vercel

vercel Bot commented Jul 27, 2026

Copy link
Copy Markdown

@tmdeveloper007 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.

@komalharshita komalharshita added type:bug Something isn't working level:beginner need review Further information is requested labels Jul 30, 2026
@komalharshita

Copy link
Copy Markdown
Owner

@tmdeveloper007 kindly resolve the merge conflicts

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

Labels

gssoc-2026 level:beginner need review Further information is requested 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

2 participants