I have an embedded Linux with a write lock on all system folders (including /etc) and only one folder being freely writable, called /writable
. /etc/localtime
is a symbolic link that points to /writable/localtime
.
My (test) application changes the timezone by copying a different timezone file into the location at /writable/localtime
, then calls tzset()
and tries to read tzname
.
However regardless of whether I copy the timezone information or turn the file into a symlink pointing elsewhere, tzset
does neither change tzname
, nor does it update the offsets (meaning using localtime
yields the same results).
Only after restarting the application, the new timezone takes effect.
Why?
You need to sign in to view this answers
Leave feedback about this