Details
-
Bug
-
Resolution: Cannot Reproduce
-
Not Evaluated
-
None
-
5.1.0
-
None
-
Win 7 64-bit, Qt 5.1, Firebird 2.5 (x32).
Description
Ibase driver returns wrong value as time part of TIMESTAMP.
Issue reported in:
https://bugreports.qt-project.org/browse/QTBUG-29261
This patch (from https://bugreports.qt-project.org/browse/QTBUG-29261):
--------------------
static QDateTime fromTimeStamp(char *buffer)
{
static const QDate bd(1858, 11, 17);
QTime t(0, 0, 0);//########## should be fixed like this to pass on isValid()
QDate d;
// have to demangle the structure ourselves because isc_decode_time
// strips the msecs
t = t.addMSecs(int(((ISC_TIMESTAMP*)buffer)->timestamp_time / 10));
d = bd.addDays(int(((ISC_TIMESTAMP*)buffer)->timestamp_date));
return QDateTime(d, t);
}
--------------------
is fully correct.