diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2023-02-15 13:51:15 +0900 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2023-02-24 08:55:27 +0900 |
commit | 97c5f7ba1f50fcd7b982b995b46692c8cad4afaa (patch) | |
tree | 80f60643eeab6a48134fea970f6c2059ee19cb4a /src/basic/time-util.c | |
parent | a83c1baaeb510f1916d2d8cf0324d100708c7073 (diff) | |
download | systemd-97c5f7ba1f50fcd7b982b995b46692c8cad4afaa.tar.gz |
time-util: drop unnecessary assignment of timezone name
As mktime() does not use timezone neme.
Diffstat (limited to 'src/basic/time-util.c')
-rw-r--r-- | src/basic/time-util.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/basic/time-util.c b/src/basic/time-util.c index ea381da8f9..1206ecd1b2 100644 --- a/src/basic/time-util.c +++ b/src/basic/time-util.c @@ -631,7 +631,7 @@ static int parse_timestamp_impl(const char *t, usec_t *ret, bool with_tz) { { "Sat", 6 }, }; - const char *k, *utc = NULL, *tzn = NULL; + const char *k, *utc = NULL; struct tm tm, copy; usec_t usec, plus = 0, minus = 0; int r, weekday = -1, isdst = -1; @@ -746,7 +746,6 @@ static int parse_timestamp_impl(const char *t, usec_t *ret, bool with_tz) { /* Found one of the two timezones specified. */ t = strndupa_safe(t, e - t - 1); isdst = j; - tzn = tzname[j]; } } } @@ -757,8 +756,6 @@ static int parse_timestamp_impl(const char *t, usec_t *ret, bool with_tz) { return -EINVAL; tm.tm_isdst = isdst; - if (!with_tz && tzn) - tm.tm_zone = tzn; if (streq(t, "today")) { tm.tm_sec = tm.tm_min = tm.tm_hour = 0; |