In the deprecations section of the release notes for Python 3.12, it was announced that the utcnow() and utcfromtimestamp() functions of the datetime.datetime module will be removed in a future version. This has caught the attention of web developers who frequently use these functions. The problem with these functions is that they return “naive” datetime objects, which lack a timezone. This can lead to confusion and incorrect timestamps when converting them. Although some argue that naive datetimes are unnecessary, they are still widely used, especially in web applications and databases. It is advised to switch to aware datetime objects as a replacement for the deprecated functions, and the author provides sample code for this transition.
https://blog.miguelgrinberg.com/post/it-s-time-for-a-change-datetime-utcnow-is-now-deprecated