- var_dump: documentation ( source)
<?php
$date_utc = new DateTime('1895-01-01 05:17:32 UTC');
for($i = 1890; $i <= 1900 ; $i++) {
$date = new DateTime( $i. '-01-01T00:00', new DateTimeZone('America/Toronto'));
echo $date->format('Y-m-d H:i:s'), PHP_EOL;
if($i == 1895)
$utc_local = $date->format('U') . PHP_EOL;
}
if(isset($utc_local))
var_dump($date_utc->format('U') . ' => ' . $utc_local, $date->getTimezone()->getTransitions($utc_local, $utc_local));