Ignore:
Timestamp:
05/02/12 23:45:10 (10 years ago)
Author:
Philipp Spitzer <philipp@…>
Branches:
master, qt5
Children:
0b595d2
Parents:
0dc6313
Message:

This at least partly fixes #42 ("fun with time zones").

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/orm/ormrecord.h

    r0dc6313 ra96e91c  
    216216    if (colType == QVariant::DateTime && value.canConvert<QDateTime>())
    217217    {
    218         return value.toDateTime().toTime_t();
     218        QDateTime dateTime = value.toDateTime();
     219        dateTime.setTimeSpec(Qt::UTC); // this is to avoid that dateTime.toTime_t changes the time depending on the local time zone
     220        return dateTime.toTime_t();
    219221    }
    220222
Note: See TracChangeset for help on using the changeset viewer.