A simple implementation of PHP Timestamp and specific time conversion, and a specific php time Conversion
Three built-in functions:
Time () // obtain the UNIX system timestamp mktime (hour, minute, second, month, day, year) // convert the specified time to the timestamp date (time format, timestamp) // converts the timestamp into a time for easy reading.
Time-> date:
$ Now = time (); echo "The timestamp is ". $ now; echo "created on ". date ("Y-m-d h: I: s", $ now); output: the time stamp is 1404610907. The creation date is 09:41:47.
Mktime-> date:
$ D = mktime (9, 41, 47, 7, 6, 2014); echo "The timestamp is ". $ d; echo "created on ". date ("Y-m-d h: I: s", $ d); output: the time stamp is 1404610907. The creation date is 09:41:47.
Note:
Generally, the time function is used to obtain the current timestamp by default during registration or login. When a business requires a specific time, the mktime function can be used to convert it to a specific timestamp according to the specific time, the date function can reverse the timestamp to a specific time for easy viewing.
The simple implementation of the above PHP Timestamp and specific time conversion is all the content that I have shared with you. I hope you can give us a reference and support for the customer's house.