mirror of
https://github.com/systemd/systemd.git
synced 2025-03-31 14:50:15 +03:00
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:
parent
02b7005e38
commit
856ad0fdb6
@ -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");
|
||||
|
Loading…
x
Reference in New Issue
Block a user