2013-04-14 71 views

回答

1

看看在DateTimeDateTimeZone对象。

<?php 
$date = new DateTime('now', new DateTimeZone('Europe/London')); 

echo $date->format('r e'); // Sun, 14 Apr 2013 10:24:55 +0100 Europe/London 

$date->setTimezone(new DateTimeZone('America/New_York')); 

echo $date->format('r e'); // Sun, 14 Apr 2013 05:26:08 -0400 America/New_York 
+0

+1根据[手册页](http://php.net/manual/en/timezones.indian.php)的评论,我只是补充一点,印度本身是由“亚洲/加尔各答”时区处理的 - 你可能原谅它认为它会在'Indian/*'分支中的某个地方...... – Emissary

相关问题