Solution for "set deafult timezone php"

$date = new \DateTime(); $date->setTimezone(new \DateTimeZone('+0800')); //GMT echo $date->format('Y-m-d H:i:s'); // 2020-11-20 15:23:49

php datetime set timezone

Similar codes for "set deafult timezone php"


Latest 'PHP' questions

Added before "set deafult timezone php"