修改VPS上的时区,发现有 /etc/localtime 和 /etc/timezone 两个文件,请问二者功能是否类似?有什么区别?是由于不同的程序使用造成同时存在吗?
另外,使用file /etc/localtime得到如下内容:
/etc/localtime: timezone data, version 2, 4 gmt time flags, 4 std time flags, no leap seconds, 69 transition times, 4 abbreviation chars
如何查看/etc/localtime具体的时区信息(使用less无法查看timezone data)?
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
可以用 zdump 命令来读取 /etc/localtime 文件的内容:
/etc/timezone 的内容是时区,比如 Asia/ShangHai。