Details
-
Bug
-
Resolution: Fixed
-
P1: Critical
-
6.3.1, 6.4.0 Beta3
-
None
-
21
-
Foundation PM Prioritized
Description
After migrating from PySide2 to PySide6, QDateEdit and QTimeEdit fields behave wrong. QTimeEdit is showing 23:00 as time when initialized with no time, QDateEdit shows date of yesterday.
I could track down the issue to the parent control of them both, QDateTimeEdit, which seems to be aware of its timezone, and is initialized with a date of Jan-01 (UTC+1, now we have DST = UTC+2).
When initializing the widget with setDate(QDate.currentDate()) first – probably this internally sets the timezone, the error is gone, but there's now 3 lines of code where one used to be, and this behaviour is prone to cause all kinds of hard to find issues. Plus, the constructor is now behaving unexpectedly.
Code for testing, and local output (screenshot) is attached.