QTBUG-71181 changed behavior of QDateTimeEdit::setDateTime starting from Qt 6. But this change isn't mentioned in https://doc.qt.io/qt-6/widgets-changes-qt6.html subpage of https://doc.qt.io/qt-6/modulechanges.html
Previosly in Qt5:
When setting this property the timespec of the QDateTimeEdit remains the same and the timespec of the new QDateTime is ignored.
Now in Qt6:
When setting this property, the new QDateTime is converted to the timespec of the QDateTimeEdit, which thus remains unchanged.
This is very confusing to find it after upgrade from Qt5 to Qt6 so I think it should be documented.