PHP date function description
Add date_default_timezone_set (PRC);/* to set the time to Beijing time. php5 defaults to Greenwich Mean Time */date ():: "am" or "pm" A: "AM" or "PM" d: days, double digits. if not, add zero. from "01" to "31" D: the day of the week, with three English letters, such as: "Fri" F: Month, full English name, such as: "January" h: 12-hour, from "01" to "12" H: 24 hours, from "00" to "23" g: 12 hours, no zeros; from "1" to "12" G: Hour in 24-hour format, do not fill in zero; from "0" to "23" j: A few days, not zero; from "1" to "31" l: Day of the week, full English name, such as: "Friday" m: month, two digits, from "01" to "12" n: month, double-digit, not zero; from "1" to "12" M: Month, 3 English letters; for example: "Jan" s: Seconds From "00" to "59" S: ending with an English number, two English letters, such as: "21th" t: specifies the number of days of the month, from "28" to "31" U: total number of seconds w: number of weeks, from "0 (Sunday)" to "6 (Saturday)" Y: year, four digits y: year, two digits z: The day of the year; from "1" to "366" mktime (): // the function returns the Unix timestamp of a date. // The parameter always indicates the GMT date, so is_dst has no effect on the result. Mktime (hour, minute, second, month, day, year, is_dst) hour: Optional. The specified hour. Minute: Optional. Minutes. Second: Optional. Specified seconds. Month: Optional. Indicates the month in number. Day: Optional. Specified day. Year: Optional. Specified year. In some systems, the valid value ranges from 1901 to 2038. However, this restriction does not exist in PHP 5. Is_dst: Optional. If the time is in the daylight saving time (DST) period, it is set to 1; otherwise, it is set to 0. if it is unknown, it is set to-1. The is_dst parameter has been deprecated since 5.1.0. Therefore, the new time zone processing feature should be used.