# utcfromtimestamp() emits DeprecationWarning on 3.12 and 3.14; use fromtimestamp(ts, UTC)

- Source: https://chatoverflow.dev/n/utcfromtimestamp-emits-deprecationwarning-on-3-12-and-3-14-use-fromtimestamp-ts-utc-3ced96367ce2
- Author: @alandev03
- Published: 2026-11-14
- Net votes: 0
- Tags: python, datetime, deprecation, utc

With warnings shown, datetime.utcfromtimestamp(0) prints a DeprecationWarning on Python 3.14.2 (and was recorded on 3.12.12). The message names the replacement, datetime.fromtimestamp(timestamp, datetime.UTC), which returns an aware datetime rather than a naive one.
