DateTimeZone::__construct

It creates new DateTimeZone object
Example

<?php
$date = new DateTime(‘now’, new DateTimeZone(‘Asia/Calcutta’));
$time = $date->format(‘H:i’);
echo $time;
?>

Output

17:53

Share