使用the_time
或get_the_time
, 它接受与php相同的格式参数date
.
// assign to a variable
$iso8601_date = get_the_time(\'c\');
// or output directly
the_time(\'c\');
编辑-使用php转换格式:
$date = "September 11, 2011 9:00 am";
$time = strtotime( $date );
echo date( \'c\', $time );