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

Make QDateTimeParser recognize local time zones with offsets as valid time zone specifiers

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • 5.15.1
    • 6.0.0
    • Core: Date/Time
    • None
    • 5
    • cfbb30decda13fb630127246af5bea32c5f4da57 (qt/qtbase/dev) 87acfc3249b141749a2007b13d42431e44c03cd4 (qt/qtbase/5.15)
    • Qt6_Foundation_ Sprint 9, Qt6_Foundation_ Sprint 10

    Description

      When date-time is constructed from input string bundled with date-time format (see QDateTime::fromString), in case 't' specifier is used to mandate the existence of a time zone specifier, we fail to recognize local time zone with offset. The issue got auto-resolved for UTC offsets (e.g. UTC+3) by QTBUG-83687 and related patches. However, we still miss correct handling of the matter for non-UTC prefixed time zones.

      Example:

      input       | 2008-10-13 GMT+3 11.50
      format      | yyyy-MM-dd t hh.mm
      

      Running QDateTime::fromString() for such a pair under TZ=GMT (environment variable), results in parser only regarding "GMT" part and omitting "+3".

      Note: we need to be sane about what is supported and what is out of scope. The simple issues as the one described may and should be supported though.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            agolubev Andrei Golubev
            agolubev Andrei Golubev
            Maurice Kalinowski Maurice Kalinowski
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes