我需要在Linux系统(embedded式busybox发行版)上设置时区,但是我没有/ etc / timezone和/ usr / share / zoneinfo。 我如何设置时区?
我把硬件时钟设置为utc:hwclock –set –date = 18:15:30 –utc然后我想我可以在/ etc / profile中使用'export TZ = PST8PDT'来获得正确的date,但是这似乎并没有工作。 我仍然看到这个:
# date Wed May 30 18:17:42 PDT 2012
谢谢! 罗恩
必须在/ etc / TZ中设置正确的时区,使用–set和–utc标志将hwclock设置为utc,并使用hwclock –systohc将系统时间存储在硬件时钟中。
将其添加到/ etc / inittab:
setenv TZ CDT
CDT(中央)是时区。