【问题标题】:synchronize local Debian time with amazon Debian instances (RDS) MDT to UTC将本地 Debian 时间与亚马逊 Debian 实例 (RDS) MDT 同步到 UTC
【发布时间】:2014-04-27 11:31:01
【问题描述】:

它在我的 amazon Debian 实例上尝试了这个命令

    root@ip-:~# date
    Sun Apr 27 11:26:34 UTC 2014

在我当地的 debain 实例中是这样的

  root@debian:~# date
  Sun Apr 27 16:56:56 MDT 2014

那么现在我怎样才能使我的本地 debain 机器时间与亚马逊实例时间相同

转换

   Sun Apr 27 16:56:56 MDT 2014 ->(to) Sun Apr 27 11:26:34 UTC 2014 this

在我本地的 debain machinee 中

【问题讨论】:

    标签: shell datetime amazon-web-services debian


    【解决方案1】:

    手头的时差有两个问题:

    1. 时区 - 您的本地 Debian 系统使用本地时区运行,而 EC2 实例使用 Coordinated Universal Time (UTC) 运行。后者几乎是常态。服务器的最佳实践,您可以通过 sudo dpkg-reconfigure tzdata 调整您的本地系统(请参阅 Ynhockey 对 How do I permanently reset the time zone in Debian? 的回答)。
    2. 精度 - 您的一个或两个系统对 UTC 表现出明显的时钟偏差(减去时区偏移后两个时间应该相同)。这很容易通过将Network Time Protocol (NTP) 守护程序安装到Set the time automatically 来解决,如Debian 的DateTime 中所述,归结为sudo apt-get install ntp 并编辑/etc/ntp.conf 以定位更多local NTP server sources 以获得最佳结果。

    【讨论】:

      猜你喜欢
      • 2014-11-02
      • 1970-01-01
      • 2017-03-07
      • 2014-05-21
      • 2018-04-17
      • 2017-09-15
      • 2017-02-25
      • 2010-12-28
      • 1970-01-01
      相关资源
      最近更新 更多