Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-106075

[Regr:5->6] QDateEdit and QTimeEdit showing the wrong date/time in summer

    XMLWordPrintable

Details

    • 21
    • Foundation PM Staging

    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.

      Attachments

        1. timeedit.py
          0.6 kB
        2. cap000258.png
          cap000258.png
          21 kB

        Activity

          People

            Eddy Edward Welbourne
            sbu Sebastian B.
            Vladimir Minenko Vladimir Minenko
            Alex Blasche Alex Blasche
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated: