I already tried the following code in php
and did not work:
setlocale(LC_ALL, 'pt_BR.UTF-8', 'Portuguese_Brazil.1252');
My server apache
is in centos
and is running php 7.
You are displaying a date that comes from the English database: 01-SEP-2018
and the right is '01 -09-2018 '
I have already used the function DateTime
and it resolves, however when it comes null
, it displays the current date.
Should I update the language packs of centos
?
<?php
setlocale(LC_ALL, "pt_BR", "pt_BR.iso-8859-1",
"pt_BR.utf-8", "portuguese");
date_default_timezone_set('America/Sao_Paulo');
$datapagamento = $ct['DATA'];
?>
<tr>
<td><?php echo $datapagamento; ?></td>
<td>
The array
$ct
is populated with a return of a sql from the database.