Timestamp class
Date class
TimeZone class
First, learn about a structure of time and a function to get time.#include struct timeval { __time_t tv_sec; /* Seconds. */ __suseconds_t tv_usec; /* Microseconds. */ Tv_sec
Print new Date (),Fri 13:37:51 CST. The time zone of the Asia/shanghai is displayed, but the time zone shorthand for date toString is CST. What's more, Google CST turns out to be central standard time. Represents North American. I also thought that
A project in Western Europe, before taking time simple with DateTime.UtcNow.AddHours (1); Western Europe is in the 1th time zone.It was correct until March, but both the EU countries and Switzerland implemented daylight saving time from the last
Global 24 time Zones Division
The World Time Zone table, which can display time and place names in each of the world's time zones, is more sophisticated and complex than the two-way timetable, and usually the world time zone table's dial will mark
When PHP versions later than php5.3 are used, if it is time-related, "Php warning: Date () [function. DATE]: it is not safe to rely on the system's timezone settings. you are * required * to use the date. timezone setting or the
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
It took a long time to get confused. The scenario is that European digital TV applications (DVB-T standard) can get the current UTC time from air real-time signals, the UTC time of the program forecast, and the so-called offset value. The offset
Introduction
I stronugly believe that in most application we are building, we wowould need to store date and time. in some application, date and time play very important role, for instance: Marshal-similar application which cocould result big impact
Unified UTC Time scheme for Java projectsGods_ giant AntIntroductionThe recent team's individual projects after the framework upgrade, some time value has a 8-hour error, because of the wrong time data in the database to understand the UTC time (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
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.