Share how to set time zone in php

WBOY
Release: 2016-07-25 08:57:24
Original
1071 people have browsed it
  1. date.timezone = PRC
Copy the code

Set the time zone in the code, you can do this:

  1. date_default_timezone_set('Asia/Shanghai');
  2. date_default_timezone_set('Asia/Chongqing');
  3. date_default_timezone_set('PRC'); // PRC is the People's Republic of China
  4. ini_set('date.timezone',' Etc/GMT-8');
  5. ini_set('date.timezone','PRC');
  6. ini_set('date.timezone','Asia/Shanghai');
  7. ini_set('date.timezont','Asia/ Chongqing');
Copy code


source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template