".date("g:i A")"

PHP
$dateTime = new \DateTime();
/**
 * You can get the string by using format
 */
$dateTime->format('Y-m-d H:i:s');/**
 * Its always best to use a datetime object
 */
$dateTime = new \DateTime();
/**
 * You can get the string by using format
 */
$dateTime->format('Y-m-d H:i:s');
Source

Also in PHP: