ALI OSS requesttimetooskewed

Source: Internet
Author: User
Tags cst time

PHP version Ali OSS SDK, when requested to throw requesttimetooskewed error, said time gap is too big, search the discovery is the server time setting problem.

After we installed the CentOS Linux operating system, the time to click on the system is not consistent with the current time, there are 8 hours, and in the installation of the system we choose the time zone is Shanghai, but the CentOS Linux default Bios time is UTC time ( UTC is an abbreviation for Coordinated Universal Time (Universal time coordinated), which is defined and recommended by the International Radio Advisory Committee and is maintained by the International Time Bureau (BIH) in seconds-based scale. UTC is equivalent to the average sun on the Prime meridian (that is, longitude 0 degrees), which used to be expressed in Greenwich Mean Time (GMT). Beijing time is 8 hours earlier than UTC time, with January 1, 1999 0000UTC as an example, UTC time is 0 points and Beijing time is January 1, 1999 8 o'clock in the morning. ), so we were 8 hours apart on time. At this time the BIOS time and the system time are of course inconsistent, one represents UTC time, and one represents the CST (+8 time zone), which is the time of Shanghai.

Let's try to synchronize the operating system time!

In the CentOS Linux Terminal command, execute the following command:

1, Vi/etc/sysconfig/clock #编辑时间配置文件

Zone= "Asia/shanghai"
Utc=false #设置为false, hardware clock is not the same as UTC time
Arc=false

2, Ln-sf/usr/share/zoneinfo/asia/shanghai/etc/localtime #linux的时区设置为上海时区

3, Ntpdate 0.cn.pool.ntp.org #对准时间

If you do not have an NTP server installed, you just need to execute the following command first:

Yum Install NTP #安装ntp服务器

4,/sbin/hwclock--SYSTOHC #设置硬件时间和系统时间一致并校准

Well, our CentOS Linux system time and computer hardware time is finally the CST time, and all are Shanghai time zone, finally is normal.

ALI OSS requesttimetooskewed

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.