将MySQL时间戳格式化为PHP DateTime

How can I format a timestamp from MySQL to a date value in PHP?

Formatting and storing of a date can be perfectly seperated. Use strotime and strftime to calculate timestamps and use those with date.

In your view:

date('F d, Y at g a', strtotime($storedDate));

Wherever you store your date

date('Y-m-d H:i:s', strtotime($formattedData));
echo date('r', strtotime($mysql_datetime_column_value));

See the date() function in the PHP documentation for more detail.