我正在使用嵌入式Linux(ARM/busybox)系统。它有 systemd 和 timedatectl 系统可执行文件,但没有 /etc/timezone、/usr/share/zoneinfo,也没有 zic 时区数据编译程序。
我在这个嵌入式系统上有足够的系统磁盘空间。
是否可以将 /usr/share/zoneinfo 内容从 amd64 Linux 实现“按原样”复制到我的嵌入式 ARM Linux 实现,以访问 timedatectl 提供的时区功能?
感谢您的帮助。
我最终从 Ubuntu 系统创建了 /usr/share/zoneinfo/ 的 tarball,将其复制并在嵌入式系统上解压缩,然后出现以下内容“刚刚工作。”
所以 /usr/share/zoneinfo 似乎与平台无关。
root@mityomapl138:~# timedatectl set-timezone America/New_York
root@mityomapl138:~# timedatectl
Warning: ignoring the TZ variable, reading the system's timezone setting only.
Local time: Thu 2024-01-18 11:13:37 EST
Universal time: Thu 2024-01-18 16:13:37 UTC
RTC time: Thu 2024-01-18 16:13:37
Timezone: America/New_York (EST, -0500)
NTP enabled: n/a
NTP synchronized: yes
RTC in local TZ: no
DST active: no
Last DST change: DST ended at
Sun 2023-11-05 01:59:59 EDT
Sun 2023-11-05 01:00:00 EST
Next DST change: DST begins (the clock jumps one hour forward) at
Sun 2024-03-10 01:59:59 EST
Sun 2024-03-10 03:00:00 EDT