tree-wide: stop assigning colon prefixed timezone to $TZ
glibc (and also musl, though we do not officially support it yet) silently ignores colon prefix in $TZ. Let's always not prefix the timezone. tzset(3) states: > A nonempty value of TZ can be one of two formats, either of which can > be preceded by a colon which is ignored. Addresses https://github.com/systemd/systemd/pull/38876#discussion_r2384347594.
This commit is contained in:
@@ -1022,7 +1022,7 @@ int parse_timestamp(const char *t, usec_t *ret) {
|
||||
if (timezone_is_valid(tz, LOG_DEBUG)) {
|
||||
SAVE_TIMEZONE;
|
||||
|
||||
if (setenv("TZ", strjoina(":", tz), /* overwrite = */ true) < 0)
|
||||
if (setenv("TZ", tz, /* overwrite = */ true) < 0)
|
||||
return negative_errno();
|
||||
|
||||
return parse_timestamp_impl(t, max_len, /* utc = */ false, /* isdst = */ -1, /* gmtoff = */ 0, ret);
|
||||
|
||||
Reference in New Issue
Block a user