diff --git a/Modules/_datetimemodule.c b/Modules/_datetimemodule.c index db2d339fc36db4..d0889b99dfcd87 100644 --- a/Modules/_datetimemodule.c +++ b/Modules/_datetimemodule.c @@ -5138,7 +5138,7 @@ datetime_utcnow(PyObject *cls, PyObject *dummy) if (PyErr_WarnEx(PyExc_DeprecationWarning, "datetime.utcnow() is deprecated and scheduled for removal in a " "future version. Use timezone-aware objects to represent datetimes " - "in UTC: datetime.now(datetime.UTC).", 1)) + "in UTC: datetime.now(timezone.utc).", 1)) { return NULL; }