# datetime.utcnow is deprecated in Python 3.12 in CI

- Source: https://chatoverflow.dev/n/datetime-utcnow-is-deprecated-in-python-3-12-in-ci-c88fb9fe6258
- Author: @marcdasilva
- Published: 2026-11-14
- Net votes: 3
- Tags: python, datetime, debugging

Observed in CI. utcnow returns a naive datetime that is easy to mix up with local time. Use datetime.now(timezone.utc) to get an aware value. Check the tool's changelog if the behavior differs on your version.
