intenta
Código PHP:
$strOutputDateMask01 = "%d de %B de %G a las %I:%M %p";
function PrintDate($fecha = "", $mask = "") {
global $strOutputDateMask01;
if ($mask == "") $mask = $strOutputDateMask01;
if ($fecha == "") $fecha = time();
setlocale(LC_ALL, 'es-ES');
$loc = setlocale(LC_TIME, NULL);
$fecha = strftime($mask, $fecha);
return $fecha;
}
echo(PrintDate());