But that's just the result of running PHP under Linux+apache, and if you run it under Windows, 2 function returns are: 2007-03-14 04:15:27.
Therefore, we should give a compatibility of the writing, unified use of gmdate, and manually set the current time zone, the wording improved as follows:
So no matter under the Linux+apache or Windows have the right results, of course, there is a benefit to write, when the site is facing the world, then the site users just set the time zone, the program automatically based on the time zone set by the user to calculate, When the information in the database is generated by only the current time (), then the release time in China + 8 time zone is: 2007-03-14 12:15:27, then the user in Europe + 2 time zone to see the release time of this information is: 2007-03-14 06:15:27, the time of this information is all correct.
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.