[Error Code]:RequestTimeTooSkewed, [Message]:The difference between the request time and the current

来源:互联网 发布:网络技术服务工程师 编辑:程序博客网 时间:2024/06/05 13:21

  在做备份的时候,一直出现RequestTimeTooSkewed错误,发现是自己虚拟机的时间不对;

[root@localhost ~]# date

Fri Sep 22 13:57:42 EDT 2017

  执行完之后,在执行终端命令,查看时间还是一样,其实EDT和CST是有区别的,时区不一样

  EDT:指美国东部夏令时间,波士顿、纽约市、华盛顿哥伦比亚特区,都在这个时区内,跟北京时间有12小时的时差,晚12小时。

  CST:可以指下面两种:

    1. 美国中部标准时间(西六区,-6:00),中国是东八区(+8:00),北京时间比美国中部标准时间早14个小时。3:45 PM CST 是北京时间凌晨1:45。

    2. 中澳大利亚标准时间(+10:30),中国是东八区(+8:00),北京时间比中澳大利亚标准时间晚2个半小时。3:45 PM CST 是北京时间下午上午5:45。

  那么现在只要改成北京时间的时区CST就可以了,修改如下(我虚机是CentOS7的):

[root@localhost sysconfig]# mv /etc/localtime/etc/localtime.bak

[root@localhost sysconfig]# ln -s/usr/share/zoneinfo/Asia/Shanghai /etc/localtime

[root@localhost sysconfig]# date

Mon Sep 25 22:31:05 CST 2017

[root@localhost sysconfig]# date

Mon Sep 25 22:41:26 CST 2017(发现跟本机时间还是有点不同)

[root@localhost sysconfig]# date -s 10:52

Mon Sep 25 10:52:00 CST 2017(手动设置时间)

参考:http://blog.csdn.net/yjh314/article/details/51669238