I’d like to know the meaning of the alert message that occurs in the Linux time zone.
timedatectl
Warning: Ignoring the TZ variable. Reading the system’s time zone setting only.
Local time: Mon 2019-11-18 12:12:50 JST
Universal time: Mon 2019-11-18 03:12:50 UTC
RTC time: Mon 2019-11-18 03:12:50
Time zone: Asia/Tokyo (JST, +0900)
Tell me the cause of the warning message and how to resolve it.
2
Answers
First run
if it showed the right timezone then skip ahead to
ls -al /etc/localtime
, otherwise correct it usingas an example if you lived in Sweden you would run:
then after running this check the output of
if this points to the wrong timezone then run
followed by
substituting your region and your location with the same ones used in the last command.
That should fix it, though you might need to
reboot
for the changes to take affect.This command,
hwclock --localtime
, returns UTC time listed bytimedatectl
, instead to local.