phpCopy<?php
$Object = new DateTime();
$Object->setTimezone(new DateTimeZone('Europe/Amsterdam'));
$DateAndTime = $Object->format("d-m-Y h:i:s a");
echo "The current date and time in Amsterdam are $DateAndTime.
";
$Object->setTimezone(new DateTimeZone('America/Toronto'));
$DateAndTime = $Object->format("d-m-Y h:i:s a");
echo "The current date and time in Toronto are $DateAndTime.";
?>