Tool/software: Linux
I want to change the system time by ntp but the system timezone is wrong. And I didn't find /etc/timezone in the filesystem. Where is it? Or there is other file which need to be change?
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Tool/software: Linux
I want to change the system time by ntp but the system timezone is wrong. And I didn't find /etc/timezone in the filesystem. Where is it? Or there is other file which need to be change?
Hello user4652979,
You need to install tzdata package to have the Time Zone data on your board. You can get it by OE build system and install it with opkg. Later change the time zone by using timedatectl command. Here I am attaching you one https://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/791/tzdata_5F00_2018f_2D00_r0_5F00_all.ipk package for reference.
root@am57xx-evm:~# opkg install tzdata_2018f-r0_all.ipk
Best regards,
Kemal
Yes, I can change the timezone. And I use "timedatectl set-ntp true" to enable the ntp. But the time didn't changed.
And I also found "ntpd -dsS" in the /usr/sbin. The command is different from the ondinary ntpd. If I want update the time after boot automaticly, can I use this command?
user4652979 said:And I use "timedatectl set-ntp true" to enable the ntp. But the time didn't changed.
Yes, but the time didn't change.
And I use "timedatectl status" to check the status which as follows:
Sat Apr 6 10:02:50 CST 2019 root@am57xx-evm:~# timedatectl Local time: Sat 2019-04-06 10:02:54 CST Universal time: Sat 2019-04-06 02:02:54 UTC RTC time: n/a Time zone: Asia/Shanghai (CST, +0800) Network time on: yes NTP synchronized: no RTC in local TZ: no
May be the time update period is too long. So, can I chage the period? I want to update the time when the system boot finished
After useing the command, the log is following:
[[0;1;32m●[[0m systemd-timesyncd.service - Network Time Synchronization Loaded: loaded (/lib/systemd/system/systemd-timesyncd.service; enabled; vendor preset: enabled) Active: [[0;1;32mactive (running)[[0m since Sat 2019-04-06 09:53:13 CST; 28min ago Docs: man:systemd-timesyncd.service(8) Main PID: 801 (systemd-timesyn) Status: "Idle." Tasks: 2 (limit: 4915) CGroup: /system.slice/systemd-timesyncd.service └─801 /lib/systemd/systemd-timesyncd Apr 06 09:53:13 am57xx-evm systemd[1]: Starting Network Time Synchronization... Apr 06 09:53:13 am57xx-evm systemd[1]: Started Network Time Synchronization.
So, the service stated, but the time didn't sync?
What is the size of your eMMC? Which arago-base-tisdk-image-am57xx-evm.tar.xz or tisdk-rootfs-image-am57xx-evm.tar.xz rootfs you are using?
I have just found the reason which is wrong ntp sync IP. After I change the IP address, the ntp-sync works properly.