- Modify the time zone in php.ini, locate ;date.timez/strong> remove the semicolon, and set the value to Asia/Shanghai or PRC, etc.
* 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 time zone 0, php.ini cannot be modified directly, only through this function Set
- gmmktime() to get the Unix practical stamp of the GMT (Greenwich Mean Time) date
- microtime() to return the current microseconds and Unix timestamp
- int mktime(int hour, int minute, int month, int day, int year [,int is_dst) returns the Unix practical stamp according to the given parameters. The parameters can be omitted from right to left. Any omission will be set to the current value of the local date and time. is_dst can be set to 1 during daylight saving time, otherwise it is 0, and it is not sure to -1, which is also the default value.
- Daylight Saving Time: Taking advantage of the precious time during the day, many countries in the world adopt the form prescribed by law. Every summer, the time used in this country is advanced by one hour, and some are advanced by half an hour or a few hours; in winter, it is again Set the forwarded time back. This time is "daylight saving time", which is a legal time. From 1986 to 1991, our country moved the time forward one hour from 2 o'clock in the morning on the second Sunday in April to 2 o'clock in the morning on the second Sunday in September. Daylight saving time is in effect. From 2 o'clock in the morning on the second Sunday in September, the forward time will be set back again until 2 o'clock in the morning on the second Sunday in April of the following year. Other countries, such as the United Kingdom, Germany, and the United States, also use daylight saving time.
- int time() specifically gets the timestamp of the current time
- int strtotime(string time [, int now]) Parses the time description of any English text into Unix time. If time is an absolute time, the now parameter has no effect , such as strtotime("20 October 2010")
- string date(string format,int timestamp) Formatting local time is generally date("Y-m-d H:i:s",timestamp)
- bool checkdate(int month, int day, int year) Verify the validity of time and date
*
').addClass('pre-numbering').hide();
$(this).addClass('has-numbering').parent().append($numbering);
for (i = 1; i ').text(i));
};
$numbering.fadeIn(1700);
});
});
The above has introduced the PHP time concept, including aspects of it. I hope it will be helpful to friends who are interested in PHP tutorials.