Just adding the reply from @Kaminary, which was super useful for my system, in the sense that I could fix this bug easily by putting the:
$meuTimeZone = new DateTimeZone('America/Sao_Paulo');
Just below the POST entries arriving via XHR from communication with AJAX.
It is important to note that some Bugs like this are normal in all programming languages and it is essential to share this, as this serves as a test case to evolve the language in the next versions. PHP is a weakly typed but widely used language, easy to understand and with great support on the Internet (mainly in English). It’s even the one I like the most among the ones I’ve used.
According to the links of @lost in the comments of the question this should be solved in the next versions of PHP.
For systems, or part of systems, more critical recommend the use of ADA for example.
Which php version do you use?
– rray
php version 5.3
– Junior
Seems to be some bug this question has several links related, rs if you remove the time zone it returns 2.
– rray