PHP VERSION: 7.0.22

date_timezone.php

<?php
// datetimezone

ini_set('date.timezone''');
$date = new DateTime('now');
echo 
$date->format('Y-m-d H:i:s');

Output


2017-08-19 09:08:04
SOURCE CODE