Php timestamp and normal time display conversion code. LieHuo03.Net teaches 23 Cheng in webpage Development. the time for submitting a form is often converted to a 10-digit timestamp format, but it is difficult for some people to call it, in the case of LieHuo03.Net (LieHuo03.Net), the time for submitting a form is usually converted to a 10-digit timestamp format during web development, some of them are difficult to call, so how can we call and convert them?
A: For example, if the variable you call is $ liehuo_times, the output statement in php is: , How is it, simple?
The time saved in mysql is a timestamp with 10 digits
How can I convert a function to a normal time function output?
Time ();
Returns the current time, but returns an integer.
You can format it.
Date ("Y-m-d H: I: s", time ());
In this way, the connections are displayed in minutes.
Date ("Y-m-d", time (); year, month, and day only
Echo "the time zone of the local machine:". date ("T ")."
";
Echo "PHP timestamp (UNIX seconds):". mktime ()."
";
Echo "PHP time (after local formatting):". date ("Y-m-d H: I: s ")."";
?>