From c935cbac699726e3ad016e43917ec832e3226c9b Mon Sep 17 00:00:00 2001 From: Matteo Varalta <matteo.varalta@txtgroup.com> Date: 周二, 23 4月 2019 17:07:40 +0800 Subject: [PATCH] Porting to Centos 7: xfs file system, cmake 2.8.11 in example, static linking for -lgcc_s --- src/library/LicenseReader.cpp | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/library/LicenseReader.cpp b/src/library/LicenseReader.cpp index e9abce6..37274f0 100644 --- a/src/library/LicenseReader.cpp +++ b/src/library/LicenseReader.cpp @@ -90,8 +90,9 @@ license->days_left = 999999; } else { strncpy(license->expiry_date, to_date.c_str(), 11); - double secs = difftime(time(NULL), - seconds_from_epoch(to_date.c_str())); + double secs = difftime( + seconds_from_epoch(to_date.c_str()), + time(NULL)); license->days_left = (int) secs / 60 * 60 * 24; } } -- Gitblit v1.9.1