【发布时间】:2020-05-09 10:20:22
【问题描述】:
我想知道为什么我位于 us-central1-a 区域的谷歌计算引擎虚拟机(Red Hat Enterprise Linux 7)使用格林威治时区。 NTP 服务器不工作?
【问题讨论】:
标签: google-cloud-platform google-compute-engine rhel7
我想知道为什么我位于 us-central1-a 区域的谷歌计算引擎虚拟机(Red Hat Enterprise Linux 7)使用格林威治时区。 NTP 服务器不工作?
【问题讨论】:
标签: google-cloud-platform google-compute-engine rhel7
查看文档CHAPTER 3. CONFIGURING THE DATE AND TIME:
默认情况下,系统配置为使用 UTC。
协调世界时(或 UTC)是主要时间标准 世界调节时钟和时间。大约在 1 秒内 0°经度处的平均太阳时,未针对日光进行调整 节约时间。它实际上是格林威治标准时间的继任者 (格林威治标准时间)。
我在us-central1-a 创建了测试虚拟机并检查了时间和NTP status:
$ timedatectl
Local time: Mon 2020-05-11 08:50:18 UTC
Universal time: Mon 2020-05-11 08:50:18 UTC
RTC time: Mon 2020-05-11 08:50:18
Time zone: UTC (UTC, +0000)
NTP enabled: yes
NTP synchronized: yes
RTC in local TZ: no
DST active: n/a
$ ntpstat
synchronised to NTP server (169.254.169.254) at stratum 3
time correct to within 1 ms
polling server every 64 s
一切看起来都像预期的那样。此外,我检查了其他区域的虚拟机,发现相同的默认设置。
您可以按照3.1.4. Changing the Time Zone 的说明更改时区:
要列出所有可用的时区,请在 shell 中键入以下内容 提示:
timedatectl list-timezones要更改当前使用的时区,请以 root 身份键入:
timedatectl set-timezone time_zone将 time_zone 替换为 timedatectl 列出的任何值 列出时区命令。
【讨论】: