how to convert datetime zone to date in php code example
Example: convert one time zone datetime value to another using php
<?php
$date = new DateTime('2000-01-01', new DateTimeZone('Pacific/Nauru'));
echo $date->format('Y-m-d H:i:sP') . "\n";
$date->setTimezone(new DateTimeZone('Pacific/Chatham'));
echo $date->format('Y-m-d H:i:sP') . "\n";
?>
2000-01-01 00:00:00+12:00
2000-01-01 01:45:00+13:45