: This article mainly introduces the concept of php time. if you are interested in the PHP Tutorial, you can refer to it.
- Modify the time zone in php. ini and locate; date. timez/strong> to remove the semicolon and set the value to Asia/Shanghai or PRC.
* Date_default_timezone_set (timezone) timezone is a recognizable time zone name, such as PRC, Asia/Chongqing. Otherwise, the system uses UTC time zone. note: If the server uses 0 time zone, php cannot be directly configured. ini. you can only set this function.
- Gmmktime () obtains the Unix practice timestamp of the GMT (Greenwich Mean Time) date.
- Microtime () returns the current microsecond and Unix timestamp
- Int mktime (int hour, int minute, int month, int day, int year [, int is_dst) returns the Unix practice stamp based on the given parameter. the parameter can be omitted from right to left, any omission will be set to the current value of the local date and time. The is_dst value can be set to 1 during the period. Otherwise, the value is 0, and the value is-1, which is also the default value.
- Daylight saving time: many countries in the world adopt the form of laws and regulations by taking advantage of the precious time during the day. every summer, the time used in this country is raised by one hour, there are also half an hour or a few hours in advance; in winter, we will also set back the quick time. Such a time is "renewal time", which is a legal time. During this period, China allocated one hour of time each year from two o'clock on the second Sunday of to on the second Sunday, during renewal. Starting from two o'clock on the second Sunday of June 17, September, we will reset the set-up time until two o'clock on the second Sunday of June 23, April. Other countries, such as the UK, Germany, and the United States, also use daylight saving time.
- Int time () is used to obtain the timestamp of the current time.
- Int strtotime (string time [, int now]) resolves the time description of any English text to Unix time. if time is absolute time, the now parameter does not work, for example, strtotime ("20 October 2010 ")
- String date (string format, int timestamp) format the local time. Generally, the format is date ("Y-m-d H: I: s", timestamp)
- Bool checkdate (int month, int day, int year) verifies the validity of the time and date
*
'). AddClass ('pre-numbering '). hide (); $ (this ). addClass ('Has-numbering '). parent (). append ($ numbering); for (I = 1; I <= lines; I ++) {$ numbering. append ($ ('
'). Text (I) ;}; $ numbering. fadeIn (1700) ;}) ;}; script
The above introduces the concept of php time, including the content, hope to be helpful to friends who are interested in PHP tutorials.