]> ToastFreeware Gitweb - toast/confclerk.git/blobdiff - src/sql/sqlengine.cpp
Import schedules with dates attached to events correctly.
[toast/confclerk.git] / src / sql / sqlengine.cpp
index 5097082f5e7490d9421811c2c4c4b4515f7b341c..e062387c1398481985bec0fcb442ceb8bad7b89d 100644 (file)
@@ -37,9 +37,6 @@
 
 #include <QDebug>
 
-const QString DATE_FORMAT ("yyyy-MM-dd");
-const QString TIME_FORMAT ("hh:mm");
-
 SqlEngine::SqlEngine(QObject *aParent): QObject(aParent) {
 #if QT_VERSION >= 0x050000
     QDir dbPath(QStandardPaths::writableLocation(QStandardPaths::DataLocation));
@@ -192,8 +189,6 @@ void SqlEngine::addEventToDB(QHash<QString,QString> &aEvent) {
     }
     QDate startDate = QDate::fromString(aEvent["date"], DATE_FORMAT);
     QTime startTime = QTime::fromString(aEvent["start"], TIME_FORMAT);
-    // consider day_change (note that if day_change is e.g. at 04:00 AM, an event starting at 02:00 AM has the previous date in the XML file)
-    if (startTime < conference.dayChangeTime()) startDate = startDate.addDays(1);
     QDateTime startDateTime;
     startDateTime.setTimeSpec(Qt::UTC);
     startDateTime = QDateTime(startDate, startTime, Qt::UTC);