Heim  >  Fragen und Antworten  >  Hauptteil

Linux 中的 /etc/localtime 和 /etc/timezone 的区别是什么?

修改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)?

天蓬老师天蓬老师2742 Tage vor759

Antworte allen(1)Ich werde antworten

  • 大家讲道理

    大家讲道理2017-04-17 11:31:21

    可以用 zdump 命令来读取 /etc/localtime 文件的内容:

    zdump -v /etc/localtime
    

    /etc/timezone 的内容是时区,比如 Asia/ShangHai。

    Antwort
    0
  • StornierenAntwort