From 379fe026fb79a8c5523d157bbfe22d30c7fee0d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?louiz=E2=80=99?= Date: Sat, 10 Dec 2016 04:15:49 +0100 Subject: Properly convert the data into a number of seconds by using duration_cast --- src/database/database.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/database/database.cpp b/src/database/database.cpp index f7d309b..cb0c78f 100644 --- a/src/database/database.cpp +++ b/src/database/database.cpp @@ -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(date.time_since_epoch()).count(); line.body = body; line.nick = nick; -- cgit v1.2.3