date('Y-m-d H:i:s',time()); 2014-09-01 05:06:01 date(' y-n-j G:i:s',time()); 14-9-1 5:06:01 mktime(hour,minute,second,month,day,year,is_dst) echo date("Y-m-d H:i:s",mktime(15,26,51,12,3,2001)); 2001-12-03 15:26:51 $time = strtotime("2010-09-08 07:06:05"); echo date("Y-m-d H:i:s",$time); 2010-09-08 07:06:05
详细参数见:http://www.php100.com/cover/php/331.html