diff options
Diffstat (limited to 'Swift/QtUI')
-rw-r--r-- | Swift/QtUI/QtHistoryWindow.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Swift/QtUI/QtHistoryWindow.cpp b/Swift/QtUI/QtHistoryWindow.cpp index 0a7c5b5..a0ccbf9 100644 --- a/Swift/QtUI/QtHistoryWindow.cpp +++ b/Swift/QtUI/QtHistoryWindow.cpp @@ -106,8 +106,11 @@ void QtHistoryWindow::addMessage(const std::string &message, const std::string & QString messageHTML(P2QSTRING(message)); messageHTML = Qt::escape(messageHTML); - QDateTime qTime = B2QDATE(time); - QDate date = qTime.date(); + + // note: time uses localtime + QDate date = QDate(time.date().year(), time.date().month(), time.date().day()); + QTime dayTime = QTime(time.time_of_day().hours(), time.time_of_day().minutes(), time.time_of_day().seconds()); + QDateTime qTime = QDateTime(date, dayTime); std::string id = "id" + boost::lexical_cast<std::string>(idCounter_++); |