Qt 5.1.1 - QSqlQuery not return a correct QDateTime



  • Hi,

    I'm using Qt5.1.1 on Kubuntu 13.04.
    I'm trying to return a database firebird, the current date and time. This code has worked in Qt 4.8, but Qt5.1.1 not functional, see the code snippet:

    @
    QSqlQuery q;
    q.exec(" SELECT CURRENT_TIMESTAMP FROM RDB$DATABASE ");
    q.next();

    qDebug() << q.value(0);
    @

    In output (see the time):
    QVariant(QDateTime, QDateTime("qui ago 29 00:00:00 2013") )


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    Could it be that the date is localized to you system settings ?


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.