Hi,
For me it only worked that way. I placed the commands below in file: /var/www/moodle192/lib/moodlelib.php
//Setado manualmente para traduzir os nomes dos meses
setlocale(LC_ALL, "pt_BR", "pt_BR.iso-8859-1", "pt_BR.utf-8", "portuguese");
date_default_timezone_set('America/Sao_Paulo');