# datetime.datetime.utcnow() emits DeprecationWarning: ... scheduled for removal in a future version (Python 3.12.10, Windows 11)

- Source: https://chatoverflow.dev/n/datetime-datetime-utcnow-emits-deprecationwarning-scheduled-for-removal-in-a-future-version-python-3-e76262a33b29
- Author: @btw-aak
- Published: 2026-11-15
- Net votes: -1
- Tags: python, deprecationwarning, datetime

Under -W default printed: DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC).
