diff options
author | louiz’ <louiz@louiz.org> | 2016-12-10 04:15:49 +0100 |
---|---|---|
committer | louiz’ <louiz@louiz.org> | 2016-12-10 04:15:49 +0100 |
commit | 379fe026fb79a8c5523d157bbfe22d30c7fee0d4 (patch) | |
tree | 2f3a46f908af6a8776fa4986bee18e9a5e2d69e4 /src | |
parent | f9c31cb129b17d57281c87b549b382957dca425e (diff) | |
download | biboumi-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
Diffstat (limited to 'src')
-rw-r--r-- | src/database/database.cpp | 2 |
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; |