summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlouiz’ <louiz@louiz.org>2016-12-10 04:15:49 +0100
committerlouiz’ <louiz@louiz.org>2016-12-10 04:15:49 +0100
commit379fe026fb79a8c5523d157bbfe22d30c7fee0d4 (patch)
tree2f3a46f908af6a8776fa4986bee18e9a5e2d69e4
parentf9c31cb129b17d57281c87b549b382957dca425e (diff)
downloadbiboumi-379fe026fb79a8c5523d157bbfe22d30c7fee0d4.tar.gz
biboumi-379fe026fb79a8c5523d157bbfe22d30c7fee0d4.tar.bz2
biboumi-379fe026fb79a8c5523d157bbfe22d30c7fee0d4.tar.xz
biboumi-379fe026fb79a8c5523d157bbfe22d30c7fee0d4.zip
Properly convert the data into a number of seconds by using duration_cast
-rw-r--r--src/database/database.cpp2
1 files changed, 1 insertions, 1 deletions
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<std::chrono::seconds>(date.time_since_epoch()).count();
line.body = body;
line.nick = nick;