1date_default_timezone_set("Asia/Kolkata");
2// List of Supported Timezones https://www.php.net/manual/en/timezones.php
1echo date_default_timezone_get(); //UTC
2
3//Read more at https://www.php.net/manual/en/function.date-default-timezone-get.php
1$date = new \DateTime();
2$date->setTimezone(new \DateTimeZone('+0800')); //GMT
3echo $date->format('Y-m-d H:i:s');
4// 2020-11-20 15:23:49