musl: time-util: introduce get_tzname() helper function

musl leaves the DST timezone name unset if there is no DST.
The helper function maps that back to no DST.
This commit is contained in:
Yu Watanabe
2025-11-13 03:13:55 +09:00
parent 3ac4d68498
commit 6431f2e072
6 changed files with 24 additions and 16 deletions
+1
View File
@@ -149,6 +149,7 @@ static inline char* format_timestamp(char *buf, size_t l, usec_t t) {
#define FORMAT_TIMESTAMP_STYLE(t, style) \
format_timestamp_style((char[FORMAT_TIMESTAMP_MAX]){}, FORMAT_TIMESTAMP_MAX, t, style)
const char* get_tzname(bool dst);
int parse_gmtoff(const char *t, long *ret);
int parse_timestamp(const char *t, usec_t *ret);