skip to Main Content

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


  1. First run

    sudo timedatectl
    

    if it showed the right timezone then skip ahead to ls -al /etc/localtime, otherwise correct it using

    sudo timedatectl set-timezone <your region>/<your location>
    

    as an example if you lived in Sweden you would run:

    sudo timedatectl set-timezone Europe/Stockholm
    

    then after running this check the output of

    ls -al /etc/localtime
    

    if this points to the wrong timezone then run

    sudo rm /etc/localtime
    

    followed by

    sudo ln -sf /usr/share/zoneinfo/<your region>/<your location> /etc/localtime
    

    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.

    Login or Signup to reply.
  2. timedatectl e hwclock

    This command, hwclock --localtime, returns UTC time listed by timedatectl, instead to local.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search