Three built-in functions in php
time() //Get system timestamp mktime(hour,minute,second,month,day,year) //Converts the specified time to a timestamp Date (time format, timestamp) //Convert timestamps into easy to read time
time -> date:
$now = time(); Echo "Timestamp is"$ now; Echo "Creation date is" date("Y/m/d h:i:s", $now);
mktime -> date:
$d=mktime(2, 52, 46, 3, 22, 2016); Echo "Timestamp is"$ d; Echo "Creation date is" date("Y/m/d h:i:s", $d);
Typecho Get Article Time
Get the time stamp of the article's publication
$this->created();
Get the publishing time of the article
$this->date('F jS , Y \\a\t h:i a');
Get the updated timestamp of the article
$this->modified();
Get the update time of the article
echo date('F jS , Y \\a\t h:i a' , $this->modified);