0

In my Yocto distribution is installed the systemd-timesyncd service and the program timedatectl. I have configured a UTC NTP Server in the file /etc/systemd/timesyncd.conf. The systemd-timesyncd service works correctly and synchronizes date and time with the NTP server and so my system time is synchronized with the Universal Time (UTC).

I need to set my timezone and I know that I can use the command timedatectl (Here there is the manual page of timedatectl command). In particular the command to execute is:
timedatectl set-timezone <timezone>
But when I execute:
timedatectl list-timezones to get the list of all timezones available the output of the command is:

> timedatectl list-timezones
UTC

I don't find any file /usr/share/zoneinfo or /usr/zoneinfo.

I think I miss installing something in my distribution but I don't know what..

Thanks

frankfalse
  • 125
  • 9

1 Answers1

1

In my Yocto installation I need to add following setting:

# In the following assignment note the space before the package name "tzdata" 
IMAGE_INSTALL_append = " tzdata"

This installs the package tzdata and after this the command timedatectl list-timezones lists all timezones available.

In particular in my distribution the info about timezones are stored in /usr/share/zoneinfo.

Useful to find the solution is this link.

frankfalse
  • 125
  • 9