Setting timezone to UTC (0) in PHP
Always try to use function which formats the time based on that timestamp named date() If we want to change the time. Because the time() function is a UNIX timestamp and depends on GreenwicMeanTime or UTC .So it cannot be changed.
If we count the number of milliseconds, since the Unix Epoch which means jan 1 1970 it is called a timestamp.
echo date('Y-m-d H:i:s T', time()) . "<br>\n"; date_default_timezone_set('UTC'); echo date('Y-m-d H:i:s T', time()) . "<br>\n";