PHP date and time functions

date_default_timezone_set(); sets the default timezone time. The strtotime() function parses any English textual datetime description into a Unix timestamp. The getdate() function turns the generated timestamp into an array containing each part. The checkdate() function checks whether a date is valid, format checkdate(month,day,year). The mktime() function gets the timestamp of a date, format mktime(hour,minute,second,month,day,year). The strftime() function formats a timestamp into a date and time, format strftime(format,timestamp). The gmstrftime() function is used the same way as the strftime() function, except that gmstrftime() displays standard GMT time. I once ran into a date and time format specifier: %Z displayed Chinese encoded as GBK while the rest of my site used utf8, so I could only convert the encoding with the iconv() function, format iconv(original character encoding,character encoding to convert to,conversion target). PHP date and time functions