php - PHP 中的 Europe/London 和 UTC 之间有区别吗?

标签 php time timezone utc

<分区>

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

BST(英国标准时间)是 GMT +- 1 小时,具体取决于 DST(夏令时)。

考虑到这一点,Europe/London 在 PHP 中是如何解释的?它基本上是 UTC/GMT 吗?

最佳答案

how is Europe/London interpreted in PHP? Is it basically 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

关于php - PHP 中的 Europe/London 和 UTC 之间有区别吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16900339/

相关文章:

R 中 difftime 的结果与 excel 和 timeanddate.com 不同

php - MySQL 具有多个类别 id 的搜索

php - REST 混合 JSON 和 XML?

time - 使用 elasticsearch 按营业时间过滤搜索结果

mysql - 服务器时区值 'KST' 无法识别 : How to fix server-side?

postgresql - 不同的时区输出错误的值

php - Laravel 4 Ajax 检查以包含 XMLHttpRequest(来自 Magnific Popup)

具有循环功能的 PHP HTML 模板

date - 跨语言/跨平台日期和时间传输

android - "Fri, 12 Sep 2014 05:00:23 GMT",SimpleDateFormat 有什么问题?