]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
os-util: determine distro EOL in UTC, not local timezone
authorLennart Poettering <lennart@poettering.net>
Mon, 23 Jan 2023 11:29:54 +0000 (12:29 +0100)
committerLennart Poettering <lennart@poettering.net>
Tue, 24 Jan 2023 14:32:42 +0000 (15:32 +0100)
Presumably vendors establish a global EOL time, hence its better to
interpret the date specification everywhere the same, instead of
timezone dependent.

src/basic/os-util.c

index 7b84dcb702141af4130bcc60272ee5f481f09792..7e794736343daa37ae201643b8ac72955a055dd6 100644 (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");