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

QOCI driver does not handle timezone information

    XMLWordPrintable

Details

    • 0900cf3581be3ff2b2e924ce0d845566c5df841e

    Description

      Similarly to QTBUG-36211, the QOCI driver for QSQL does not parse timezone info into QDateTimes when using toDateTime() or bindValue(). Apparently it always inserts with local timezone, and always retrieve data as if it was stored with local timezone.

      Following is a list of Oracle data type I tested with, and what I propose is the correct behavior. This is however ignoring the fact that the behavior should be dictated by what is done for any overlapping datatype in other drivers. Obviously for any datatype common between the drivers, the same should be done in all drivers.

      Type Description
      TIMESTAMP Timestamp is stored and retrieved in UTC
      DATE Same as for plain TIMESTAMP type
      TIMESTAMP WITH TIMEZONE Set the resulting QDateTime's timespec to be the correct timezone according to the field TZ value
      TIMESTAMP WITH LOCAL TIMEZONE Set the resulting QDateTimes timespec to be that of the Oracle server

      Attachments

        Issue Links

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

          Activity

            People

              andysh Andy Shaw
              ato Andreas
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes