PHP Time Zone Setup Summary _php tutorial

Source: Internet
Author: User
Tags echo date

PHP Time Zone Settings Summary


The code is as follows: 1, modify the php.ini, found in the php.ini Data.timezone = Remove the front of it, and then set data.timezone = "Asia/shanghai"; then, from the start Apache; If this is not done, there is still a time error, Open the httpd.conf file in Apache, add Phpinidir "php.ini" 2, use the function ini_set (' Date.timezone ', ' Asia/shanghai ') in the program Code of PHP 5 or later. or Date_default_timezone_set (' Asia/shanghai '); Some common time zone identifier descriptions: asia/shanghai– Shanghai asia/chongqing– Chongqing asia/urumqi– Urumqi asia/hong_kong– Hong Kong asia/macao– Macau asia/taipei– Taipei asia/singapore– Singapore

http://www.bkjia.com/PHPjc/1056647.html www.bkjia.com true http://www.bkjia.com/PHPjc/1056647.html techarticle The PHP time Zone Setup Summary code is as follows:? Date_default_timezone_set (PRC), echo date (y-m-d h:i:s), 1, modify php.ini, find php.ini in Data.timezone = Remove the front of it, and then set ...

  • 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.