亚马逊Debian的实例(RDS)MDT为UTC同步本地Debian的时间 [英] synchronize local Debian time with amazon Debian instances (RDS) MDT to UTC

查看:272
本文介绍了亚马逊Debian的实例(RDS)MDT为UTC同步本地Debian的时间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

它试图在我的亚马逊Debian的情况下,此命令

it tried this command on my amazon Debian instances

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

和我在当地的Debain情况下,它是这样

and in my local debain instances its like this

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

所以现在我怎样才能让我的本地的Debain机时间相同亚马逊实例时间

so now how can i make my local debain machine time as same as the amazon instance time

转换

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

在我的本地的Debain machinee

in my local debain machinee

推荐答案

有两个关于手头上的时间差问题:

There are two issues concerning the time difference at hand:

  1. 时区 - 本地Debian系统与本地时区运行,而EC2实例与的协调世界时(UTC)。后者是pretty的许多规范和RESP。用于服务器的最佳实践,您可以通过须藤的dpkg-重新配置的tzdata (见Ynhockey的回答的如何永久复位的时区Debian的?)。
  2. precision - 一方或双方你的系统表现出对UTC显著时钟偏移(减去时区偏移后两次都应该是相同的)。这是很容易通过安装网络时间协议(NTP)守护进程的设置自动的作为Debian的的日期时间,这可以归结为命令和apt-get安装NTP 和编辑 /etc/ntp.conf中目标更本地NTP服务器源,获取最佳的效果。
  1. Timezone - your local Debian system is running with your local timezone, whereas the EC2 instance is running with Coordinated Universal Time (UTC). The latter is pretty much the norm and resp. best practice for servers, you can adjust your local system via sudo dpkg-reconfigure tzdata (see Ynhockey's answer to How do I permanently reset the time zone in Debian?).
  2. Precision - either one or both of your systems exhibit significant clock skew against UTC (both times should be identically after subtracting the timezone offset). This is easily remedied by installing a Network Time Protocol (NTP) daemon to Set the time automatically as explained in Debian's DateTime, which boils down to sudo apt-get install ntp and editing /etc/ntp.conf to target more local NTP server sources for optimal results.

这篇关于亚马逊Debian的实例(RDS)MDT为UTC同步本地Debian的时间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆