From: Lennart Poettering Date: Mon, 23 Jan 2023 11:29:54 +0000 (+0100) Subject: os-util: determine distro EOL in UTC, not local timezone X-Git-Tag: v253-rc1~11^2~7 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=856ad0fdb69b3f93656f11568a91c8b7cb66cb79;p=thirdparty%2Fsystemd.git os-util: determine distro EOL in UTC, not local timezone Presumably vendors establish a global EOL time, hence its better to interpret the date specification everywhere the same, instead of timezone dependent. --- diff --git a/src/basic/os-util.c b/src/basic/os-util.c index 7b84dcb7021..7e794736343 100644 --- a/src/basic/os-util.c +++ b/src/basic/os-util.c @@ -362,7 +362,7 @@ int os_release_support_ended(const char *support_end, bool quiet) { return log_full_errno(quiet ? LOG_DEBUG : LOG_WARNING, SYNTHETIC_ERRNO(EINVAL), "Failed to parse SUPPORT_END= in os-release file, ignoring: %m"); - time_t eol = mktime(&tm); + time_t eol = timegm(&tm); if (eol == (time_t) -1) return log_full_errno(quiet ? LOG_DEBUG : LOG_WARNING, SYNTHETIC_ERRNO(EINVAL), "Failed to convert SUPPORT_END= in os-release file, ignoring: %m");