Linux 时间与时区 (Date & Time)
# 获取时区
date +"%Z %z"/etc/localtime: 符号链接- e.g.,
/etc/localtime -> /etc/zoneinfo/Asia/Shanghai
- e.g.,
/etc/timezone: 纯文本时区名称
使用环境变量 (Environment Variable)
TZ=America/New_York date
TZ=Asia/Shanghai date配置 (Configuration)
# systemd
timedatectl set-timezone Etc/GMT-6-
tzdata: 时区数据包 -
GNU libc 读取
/etc/localtime
关联信息
反向链接、本文链接的其他页面和外部资料。
参考资料
其他外链1 条
- unix.stackexchange.com/questions/452559/what-is-etc-timezone-used-forunix.stackexchange.com/questions/452559/what-is-etc-timezone-used-for