在PHP中欧洲/伦敦和UTC有区别吗?


Is there a difference between Europe/London and UTC in PHP?

我知道UTC和GMT实际上是一回事。

BST(英国标准时间)是GMT +- 1小时,取决于DST(日光节约时间)。

考虑到这一点,如何在PHP中解释欧洲/伦敦?基本上是UTC/GMT吗?

如何在PHP中解释欧洲/伦敦?基本上是UTC/GMT吗?

它们不一样(UTC/GMT没有夏令时)。写这篇文章时,他们相隔一个小时:

$utc = new DateTime('now', new DateTimeZone('UTC'));
echo $utc->format('Y-m-d H:i:s'); // output: 2013-06-03 15:37:08
$el = new DateTime('now', new DateTimeZone('Europe/London'));
echo $el->format('Y-m-d H:i:s'); //  output: 2013-06-03 16:37:08