UTC是否遵守夏令时? [英] Does UTC observe daylight saving time?

查看:718
本文介绍了UTC是否遵守夏令时?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试编写一个脚本,在该脚本中我想将任何时区转换为UTC并反转. 但是从某些地方我知道,在考虑或不考虑DST的情况下将任何时区转换为UTC时,都会给出相同的UTC时间. 例如: 如果我尝试将其转换为一个:

I am trying to write a script where i want to convert any timezone to UTC and reverse. But from some where i came to know that while converting any timezone to UTC with or without DST consideration it will give the same UTC time. For example: If i try to convert this one:

$mytime = '2011-03-31 05:06:00.000';
$myzone = 'America/New_York';

使用DST而不使用DST的UTC,我将获得..

to UTC with DST and without DST,i will get ..

(New_York->UTC DST=Yes)2011-03-31 09:06:00
(New_York->UTC DST=No)2011-03-31 09:06:00 ..........

这是核心吗?如果是,那么为什么??? 请任何人给我您的答案.

Is this corect ??If yes then why??? Please anybody give me your answers.

推荐答案

不,UTC本身从来没有DST.这是相对于其他时区表示的恒定参考框架.

No, UTC itself never has DST. It is the constant frame of reference other time zones are expressed relative to.

Wikipedia UTC页面中:

UTC不会随季节的变化而变化,但是如果时区所在区域遵守夏令时或夏令时,则当地时间或民用时间可能会发生变化.例如,冬季时UTC比美国东海岸的当地时间早5小时,而夏季则比当地时间早4小时.

UTC does not change with a change of seasons, but local time or civil time may change if a time zone jurisdiction observes daylight saving time or summer time. For example, UTC is 5 hours ahead of local time on the east coast of the United States during winter, but 4 hours ahead during summer.

换句话说,当某个时区观察到DST时,它与UTC的偏移量会在DST转换时发生变化,但这就是该时区观察DST而不是UTC的时间.

In other words, when a time zone observes DST, its offset from UTC changes when there's a DST transition, but that's that time zone observing DST, not UTC.

在不了解PHP时区处理的情况下,让我感到奇怪的是,您可以在转换中指定"with DST"或"without DST"-时区本身指定何时启动DST ...这不应该必须是您自己指定的东西.

Without knowing much about PHP time zone handling, it seems strange to me that you can specify "with DST" or "without DST" in a conversion - the time zones themselves specify when DST kicks in... it shouldn't have to be something you specify yourself.

这篇关于UTC是否遵守夏令时?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆