Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - raphmte

Pages: [1]
1
PHP / Wrong Time on America/Sao_Paulo
« on: December 02, 2020, 06:47:19 PM »
Good afternoon, after Brazil removed the daylight saving time and as I am new to CWP I realized that the time shown by PHP is being one hour longer than the correct time. The server time is correct.

Server time:
[root@tzrymg America]# date
Wed Dec  2 15:45:08 -03 2020

Time shown by PHP (code):
<?php
    date_default_timezone_set('America/Sao_Paulo');

    echo date('Y-m-d H:i:s');

Result:
America/Sao_Paulo
2020-12-02 16:45:12


Any ideas on how I can solve this? Thanks in advance.

Pages: [1]