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

Qt5 ibase returns time always 00:00:00

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P1: Critical
    • 5.1.1
    • 5.0.0
    • SQL Support
    • None
    • Windows 7x64, Visual Studio 2010/2012, Qt5.0.0, Firebird 2.5.1, 2.5.2 both working fine with 4.7.x - 4.8.x
    • 9d0b190f4b27e64d0e5d532c6a819dae076c3274

    Description

      iBase Timestamp query returns wrong value:

      Code:

              QSqlDatabase db = QSqlDatabase::addDatabase("QIBASE");
      	db.setHostName("localhost");
      	db.setPort(3050);
      	db.setDatabaseName("C:\\Test.FDB");
      	db.setUserName("sysdba");
      	db.setPassword("masterkey");
      	db.open();
      	QSqlQuery q(db);
      	q.exec("select cast('2013-01-22 23:58:00' as timestamp) from rdb$database;");
      	q.next();
      	qDebug() << q.value(0); // outputs the first RETURN/OUT value
      

      Result: QVariant(QDateTime, QDateTime("Tue Jan 22 00:00:00 2013"))

      Attachments

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

        Activity

          People

            mitch_curtis Mitch Curtis
            sparkiss Ray Park
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes