From f7a17dff09aa2f7149285cf1df99ad3485444f56 Mon Sep 17 00:00:00 2001 From: tastytea Date: Fri, 2 Mar 2018 09:14:26 +0100 Subject: [PATCH] Bufgfix: time is in UTC now --- CMakeLists.txt | 2 +- src/mastobotmon.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 582b27a..c0f3873 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required (VERSION 3.7) project (mastobotmon - VERSION 0.1.1 + VERSION 0.1.2 LANGUAGES CXX ) diff --git a/src/mastobotmon.cpp b/src/mastobotmon.cpp index 2b156be..1665c6e 100644 --- a/src/mastobotmon.cpp +++ b/src/mastobotmon.cpp @@ -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);