官网FAQ说明:https://www.uclibc.org/FAQ.html#timezones
Why does localtime() return times in UTC even when I have my timezone set?
The uClibc time functions get timezone information from the TZ environment variable, as described in the Single Unix Specification Version
3. See http://www.opengroup.org/onlinepubs/007904975/basedefs/xbd_chap08.html for details on valid settings of TZ. For some additional examples,
read https://www.uClibc.org/lists/uclibc/2002-August/004010.html in the uClibc mailing list archive.
You can store the value of TZ in the file '/etc/TZ' and uClibc will then automagically use the specified setting.
官网FAQ说明:https://sourceware.org/glibc/wiki/FAQ#How_can_I_set_the_timezone_correctly.3F
You first have to install yourself the timezone database, it is hosted at http://www.iana.org/time-zones.
Then, simply run the tzselect shell script, answer the question and use the name printed in the end by making a symlink /etc/localtime pointing to /usr/share/zoneinfo/NAME (NAME is the returned value from tzselect). That's all. You never again have to worry. Instead of the system wide setting of /etc/localtime}}, you can also set the {{{TZ environment variable.
The GNU C Library supports the extented POSIX method for setting the TZ variable, this is documented in the manual.