Make date handling Qt 4.6 compatible. Convert dates to local before
[dorian] / model / library.cpp
index a8c0db4..14082e5 100644 (file)
@@ -121,7 +121,7 @@ bool Library::add(const QString &path)
     beginInsertRows(QModelIndex(), size, size);
     Book *book = new Book(path);
     book->peek();
-    book->dateAdded = QDateTime::currentDateTimeUtc();
+    book->dateAdded = QDateTime::currentDateTime().toUTC();
     mBooks.append(book);
     save();
     endInsertRows();