UTC time & local time (1)
The whole earth is divided into twenty-four time zones, each of which has its own local time. For international radio communication, a unified time is used for the sake of unification, called Universal coordination Time
PHP cross-Time Zone (UTC time) application solution. 1. set the internal time zone of the program to UTC time. (UTC can also be called GMT) PHP settings: date_default_timezone_set (UTC); Yii settings: add timeZoneUTC to configmain. php.
1. set the
1. Set the program's internal time zone to UTC time. (UTC can also be called GMT)
PHP Settings:
Date_default_timezone_set ("UTC");
Yii settings:
Added in config/main.php: ' timeZone ' = ' UTC ',
When this is set, the time that PHP generates is
To solve the problem of PHP cross-time zone, you need to set the internal time zone of the program to UTC time. (UTC can also be called GMT) and store the UTC time in the database. if you are interested, you can understand
1. set the internal time
Because of the recent international go to Oracle on MySQL, this inevitably involves time zone and timestamp issues. Do an experiment and summarize.OracleFirst look at the definition of Oracle Concepts for timestamp:The TIMESTAMP data type is an
1. Set the internal time zone of the program to UTC time. (UTC can also be called GMT) PHP settings:Date_default_timezone_set ("UTC ");Yii settings:Add 'timezone '=> 'utc' to config/main. php ',After this setting, the time generated by PHP is
Detailed description of the JavaScript UTC time conversion method, javascriptutc
I. Preface1. UTC: Universal Time Coordinated, coordinates the Universal Time.2. Greenwich Mean Time (GMT)Greenwich Mean Time (GMT) refers to the standard Time of the
1. Set the internal time zone of the program to UTC time. (UTC can also be called GMT)
PHP settings:
Date_default_timezone_set ("UTC ");
Yii settings:
Add 'timezone '=> 'utc' to config/main. php ',
After this setting, the time generated by PHP is
Linux time zone details and common time functions time and time zone The entire earth is divided into 24 time zones, each time zone has its own local time. ø UTC Time and GMT time We can think of Greenwich Mean Time (GMT = UTC), GMT and
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.