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.
This commit is contained in:
Lennart Poettering
2023-01-24 15:32:42 +01:00
parent 02b7005e38
commit 856ad0fdb6
+1 -1
View File
@@ -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");