(PHP 5 >= 5.2.0)
timezone_transitions_get — 别名 DateTimeZone::getTransitions()
此函数是该函数的别名: DateTimeZone::getTransitions()
gopalv at php dot net (2007-06-19 13:10:43)
From Derick's talk (http://talks.php.net/show/time-ffm2006/28)
<?php
$tz = new DateTimeZone("PST");
foreach (timezone_transitions_get($tz) as $tr)
if ($tr['ts'] > time())
break;
$d = new DateTime( "@{$tr['ts']}" );
printf("The timezone %s switches to %s on %s.<br/>The new GMT offset will be: %d (%s)\n",
$tz->getName(), $tr['isdst'] ? "DST" : "standard time",
$d->format('d M Y @ H:i'), $tr['offset'], $tr['abbr']
);
?>