Bufgfix: time is in UTC now

This commit is contained in:
tastytea 2018-03-02 09:14:26 +01:00
parent 3273434cfb
commit f7a17dff09
Signed by: tastytea
GPG Key ID: 59346E0EA35C67E5
2 changed files with 2 additions and 2 deletions

View File

@ -1,6 +1,6 @@
cmake_minimum_required (VERSION 3.7)
project (mastobotmon
VERSION 0.1.1
VERSION 0.1.2
LANGUAGES CXX
)

View File

@ -90,7 +90,7 @@ int main(int argc, char *argv[])
std::istringstream isslast(json[0]["created_at"].GetString());
struct std::tm tm = {0};
isslast >> std::get_time(&tm, "%Y-%m-%dT%T");
std::time_t time = mktime(&tm);
std::time_t time = timegm(&tm);
const auto now = std::chrono::system_clock::now();
const auto last = std::chrono::system_clock::from_time_t(time);