HTTP directory display time differs from server by 8 hours

Source: Internet
Author: User
Tags local time

has been using Nginx HTTP service, the code to access the file address, did not seriously focus on access to the HTTP directory timestamp.
A problem was found when browsing the file today. The file timestamp displayed on the web is 8 hours compared to the server time.
The concrete expression looks:

Web Catalog Time

Server time

Obviously standard time GMT, did not add China East eight district.
The correct approach is to add the following statement in the Nginx configuration file about this directory field:

Autoindex_localtime on; #GMT时间 Change to local time

The effect is as follows:

UTC is the time standard we now use, GMT is the old time measurement standard.
UTC calculates time according to atomic clocks, and GMT calculates time according to the rotation and revolution of the Earth.
That is, the sun passes every day at the Royal Green Wedge Observatory in London, England, 12 o'clock noon.
Local time uses the gmt+ local timezone.

HTTP directory display time differs from server by 8 hours

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.