Time zone is not in effect

Glibc does not care about /etc/TZ file.

strace date
<Truncated output>
brk(0x490000)                           = 0x490000
openat(AT_FDCWD, "/etc/localtime", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
fstat(1, {st_mode=S_IFCHR|0622, st_rdev=makedev(0x4, 0x40), ...}) = 0
ioctl(1, TCGETS, {B115200 opost isig -icanon echo ...}) = 0
write(1, "Wed Sep  7 10:17:24 UTC 2022\n", 29Wed Sep  7 10:17:24 UTC 2022
) = 29
exit_group(0)                           = ?
+++ exited with 0 +++

When I only set the time zone, the date command cannot output the correct time

$ uci show system

Is this a bug or a mistake

For glibc you do need set option zonename ... and install the corresponding zoneinfo package.

1 Like

timezone for musl and /etc/TZ
zonename for glibc and /etc/localtime

thank you

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.