PHP/Date/gmstrftime
Версия от 13:37, 26 мая 2010; (обсуждение)
Adjusting time from UTC to another time zone
<source lang="html4strict">
<?php $now = time();
$now += $pc_timezones["PST"]; print gmstrftime("%c",$now); ?>
</source>
Handling DST with explicit offsets
<source lang="html4strict">
<?php $now = time(); $now -= 8 * 3600; $ar = localtime($now,true); if ($ar["tm_isdst"]) { $now += 3600; } print gmstrftime("%c",$now); ?>
</source>