Recently using PHP about time processing frequency is relatively high, now tidy up the knowledge points.
Time ()
The time () function returns the Unix timestamp for the current time.
$t =time (); Echo ($t. "
");
the $t object here outputs a number, This number indicates how many seconds have gone from 1970-01-01 to now.
It's not going to work. Use the DATE function to convert the object to the date we need.
Date (Format,,timestamp)
The date function is very flexible and can be used in a variety of ways to meet the various situations you encounter in the development process.
Format: Required, specifies the time stamp output format;
Timestamp: optional, time specified
Date_default_timezone_set (PRC); /* Transfer time to Beijing time, php5 default to Greenwich Mean Time */
Cond...
The above describes the PHP on time date strtotime basic parsing, including the aspects of the content, I hope the PHP tutorial interested in a friend helpful.