synchronize local Debian time with amazon Debian instances (RDS) MDT to UTC

这一生的挚爱 提交于 2019-12-25 03:03:34

问题


it tried this command on my amazon Debian instances

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

and in my local debain instances its like this

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

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

i.e

convert

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

in my local debain machinee


回答1:


There are two issues concerning the time difference at hand:

  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.


来源:https://stackoverflow.com/questions/23322841/synchronize-local-debian-time-with-amazon-debian-instances-rds-mdt-to-utc

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!