Skip to content

Conversation

@Tim020
Copy link
Contributor

@Tim020 Tim020 commented Jan 6, 2026

Summary

Fixes #811 by replacing all deprecated datetime.utcnow() calls with timezone-aware datetime.now(UTC).

Changes Made

  • ✅ Replaced 6 occurrences of datetime.utcnow() across 4 files
  • ✅ Added UTC import from datetime module to all affected files
  • ✅ All 219 tests pass successfully

Files Modified

  • server/controllers/api/show/session/sessions.py (2 occurrences)
  • server/controllers/api/show/shows.py (2 occurrences)
  • server/controllers/api/show/script/script.py (1 occurrence)
  • server/controllers/api/show/script/revisions.py (1 occurrence)

Testing

  • ✅ Full test suite passes: 219 tests passing
  • ✅ No new deprecation warnings

Notes

Python 3.11+ deprecated datetime.utcnow() in favor of timezone-aware datetime objects. This PR updates the codebase to use the recommended approach: datetime.now(UTC).

🤖 Generated with Claude Code

@github-actions github-actions bot added large-diff server Pull requests changing back end code labels Jan 6, 2026
@Tim020 Tim020 added the claude Issues created by Claude label Jan 6, 2026
@github-actions
Copy link

github-actions bot commented Jan 6, 2026

Python Test Results

  1 files    1 suites   17s ⏱️
220 tests 220 ✅ 0 💤 0 ❌
225 runs  225 ✅ 0 💤 0 ❌

Results for commit 288a9aa.

♻️ This comment has been updated with latest results.

@github-actions
Copy link

github-actions bot commented Jan 6, 2026

Client Test Results

34 tests   34 ✅  0s ⏱️
 1 suites   0 💤
 1 files     0 ❌

Results for commit 288a9aa.

♻️ This comment has been updated with latest results.

…(UTC)

This commit addresses issue #811 by replacing all instances of the deprecated
datetime.utcnow() method with datetime.now(UTC) to use timezone-aware datetime
objects as recommended by Python 3.11+.

Changes:
- Updated 6 occurrences across 4 files
- Added UTC import from datetime module
- All tests pass (219/219)

Files modified:
- server/controllers/api/show/session/sessions.py
- server/controllers/api/show/shows.py
- server/controllers/api/show/script/script.py
- server/controllers/api/show/script/revisions.py

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@github-actions github-actions bot added small-diff Small pull request and removed large-diff labels Jan 6, 2026
@Tim020 Tim020 linked an issue Jan 6, 2026 that may be closed by this pull request
@Tim020 Tim020 enabled auto-merge (squash) January 6, 2026 12:52
@Tim020 Tim020 merged commit 46ac6d9 into dev Jan 6, 2026
14 checks passed
@Tim020 Tim020 deleted the issue/811 branch January 6, 2026 12:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

claude Issues created by Claude server Pull requests changing back end code small-diff Small pull request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Replace deprecated datetime.utcnow() with timezone-aware datetime

2 participants