sysinstall: new component

This commit is contained in:
Lennart Poettering
2026-05-05 15:09:47 +02:00
committed by Lennart Poettering
parent ea07d7fec3
commit 5fbc7a7b12
15 changed files with 1911 additions and 0 deletions
+10
View File
@@ -1697,6 +1697,16 @@ int get_timezone(char **ret) {
return strdup_to(ret, e);
}
int get_timezone_prefer_env(char **ret) {
assert(ret);
const char *e = getenv("TZ");
if (e && e[0] == ':' && timezone_is_valid(e + 1, LOG_DEBUG))
return strdup_to(ret, e + 1);
return get_timezone(ret);
}
const char* etc_localtime(void) {
static const char *cached = NULL;
+1
View File
@@ -178,6 +178,7 @@ bool clock_supported(clockid_t clock);
usec_t usec_shift_clock(usec_t x, clockid_t from, clockid_t to);
int get_timezone(char **ret);
int get_timezone_prefer_env(char **ret);
const char* etc_localtime(void);
int mktime_or_timegm_usec(struct tm *tm, bool utc, usec_t *ret);