You can use the date and time formatters. The lesser known are D for abbreviated day of the week, M for abbreviated month, and j for day number without leading 0. For the time format you can use g, which is 12 hour time without leading zero and A for uppercase Ante meridiem and Post meridiem indication. The various letters and their meaning are listed on the documentation page of the date()
function.
You'll either need to escape the characters of at
by adding a backslash for each of them. Or you can choose to format in two steps:
echo date( 'D, M j, Y') . ' at ' . date('g:i A');
For a specific timestamp:
$timestamp = time();
echo date( 'D, M j, Y', $timestamp) . ' at ' . date('g:i A', $timestamp);
Using escaping and poored into a function:
function gmail_date($timestamp = null) {
// Allow passing no time, just like date() does.
if ($timestamp === null) $timestamp = time();
return date( 'D, M j, Y \a\t g:i A', $timestamp);
}
echo gmail_date(time());