Properly convert the data into a number of seconds by using duration_cast

This commit is contained in:
louiz’
2016-12-10 04:15:49 +01:00
parent f9c31cb129
commit 379fe026fb
+1 -1
View File
@@ -130,7 +130,7 @@ void Database::store_muc_message(const std::string& owner, const Iid& iid,
line.owner = owner;
line.ircChanName = iid.get_local();
line.ircServerName = iid.get_server();
line.date = date.time_since_epoch().count() / 1'000'000'000;
line.date = std::chrono::duration_cast<std::chrono::seconds>(date.time_since_epoch()).count();
line.body = body;
line.nick = nick;