Jan Willamowius
2019-04-27 8a0a306163dadf7e5aacae45dc589dd0d4f9db70
fix calculation of days left in license
1个文件已修改
3 ■■■■ 已修改文件
src/library/LicenseReader.cpp 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/library/LicenseReader.cpp
@@ -18,6 +18,7 @@
#include <fstream>
#include <sstream>
#include <stdlib.h>
#include <math.h>
#include "pc-identifiers.h"
#include "LicenseReader.h"
#include "base/StringUtils.h"
@@ -93,7 +94,7 @@
            double secs = difftime(
                seconds_from_epoch(to_date.c_str()),
                time(NULL));
            license->days_left = (int) secs / 60 * 60 * 24;
            license->days_left = round(secs / (60 * 60 * 24));
        }
    }
}