2个时区可以代表1个城市吗?
我想知道一个城市或州是否可以有 2 个或多个 GMT 时区。我知道一个国家/地区可以有多个 GMT 时区,但不确定是否也适用于州和城市。请分享您的知识。
I want to know if there can be 2 or more GMT timezones for one city or state. I know there can be more then one GMT timezone for a country, but not sure if it's for state and city too. Share your knowledge please.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
将问题解释为“是否有城市位于多个时区”,那么答案是“是”。美国有些州有多个时区(印第安纳州和亚利桑那州是其中两个)。
最近,TZ 邮件列表上出现了有关中国新疆地区的讨论,该地区是汉族和维吾尔族混居的地区。汉族似乎使用标准中国时区(亚洲/北京),但维吾尔族经常使用当地时区。现在,该信息已封装在 Olson 数据库中,维吾尔时区名称为 Asia/Urumqi。
例如,tzdata2010b.tar.gz 中的 zone.tab 文件,可从 ftp://elsie.nci.nih.gov/pub/tzdata2010b.tar.gz(代码为ftp://elsie.nci.nih.gov/pub/tzcode2009t.tar.gz)。 asia 文件中详细描述了如何以及为何进行更改。
请注意,Olson(时区)数据库现已 (2016-09-19) 从 IANA 获取,网址为 https: //www.iana.org/time-zones 而不是来自 NIH。您可以轻松获得当前版本;获取历史版本可能会更困难。
是的,世界各地的时区每年确实会改变 20 次,有时基本上是在没有通知的情况下发生的(也就是说,政府仅在改变前一两天立法改变)。
@basit 问:
我的意思是,在 2009 年期间,时区数据库出现了 20 个问题,因为至少有那么多地方的规则发生了变化。然而,任何特定国家通常只会改变一次规则 - 尽管在阿根廷,不同的国家在不同时间改变规则并使问题变得更加复杂。
我不清楚我们是否有足够的信息来告诉您记录数据多长时间。我倾向于说至少 12 个月,但这取决于你打算用它做什么。在某种程度上,您需要做的就是跟上 Olson 数据库 - 它会告诉您世界上几乎每个地方的时区规则。如果您有兴趣跟踪访问者的时区,那么您可以根据需要保留数据。因为并不是每个人都使用规范的大陆/城市表示法来表示他们的时区(例如,我倾向于使用旧的美国/太平洋表示法 - 它仍然受支持,但相当于 America/Los_Angeles)。 TZ=EST5EDT 等经典符号是不明确的;美国和澳大利亚都有使用 EST 作为缩写的时区,并且标准时间和夏令时之间切换的日期各不相同(看看 Olson 数据库中的大量数据)。
您还询问“时区更改需要多长时间”。我不确定你的意思。就“时钟发生变化(标准时间和夏令时之间)”而言,它是“瞬时的”;一秒是一个时区偏移;下一秒就是另一个。如果你的意思是“政府需要多长时间才能改变主意”,那就大不相同了。例如,欧洲和美国都有相对固定的规则,每隔几年就会改变一次;美国的规则稳定了大约20年,然后大约3年前他们改变了规则。欧洲也类似。另一方面,一些国家每年都会改变规则。我的印象是,一些伊斯兰国家在标准时和夏令时之间切换时会进行调整(反之亦然),部分取决于斋月的时间 - 如果在斋月期间发生变化,那么他们会提前或推迟它,以便规则在斋月期间不会改变。其他国家对这种边缘政策的持续存在有不同的原因——也许这相当于发布截止日期的政治意义。因此,人们可能需要相当长的时间才能决定特定年份的“最终”(即“下一版本”)规则。
网站 http://worldtimezone.com/ 在跟踪大多数这些特质方面做得非常好。
Interpreting the question to mean 'are there any cities which are in more than one time zone', then the answer is 'yes'. And there are American states with multiple time zones (Indiana and Arizona being two of them).
There has been recent discussion on the TZ mailing list about the area of China known as Xinjiang, which has a mixed population of Han Chinese and of Uyghurs. It seems that the Han use the standard Chinese time zone (Asia/Beijing), but the Uyghurs often use a local time zone. This is now encapsulated in the Olson database, with the name Asia/Urumqi for the Uyghur time zone.
So, for example, the zone.tab file in tzdata2010b.tar.gz, available from ftp://elsie.nci.nih.gov/pub/tzdata2010b.tar.gz (the code is ftp://elsie.nci.nih.gov/pub/tzcode2009t.tar.gz). There is an extensive description of how and why the change was made in the asia file.
Note that the Olson (Time Zone) database is now (2016-09-19) available from IANA at https://www.iana.org/time-zones rather than from NIH. You can get the current release easily enough; getting historical releases may be harder.
Yes, time zones really do change 20 times a year around the world, and sometimes at essentially no notice (that is, the government legislates the changes only a day or two before the change).
@basit asks:
What I mean is that during the course of 2009, there were 20 issues of the time zone database, because of changes in rules in at least that many places. However, any given country usually only changes their rules once - though with Argentina, different states were changing their rules at different times and compounding the problems.
I'm not clear that we have enough information to tell you how long to log the data for. I'd be inclined to say at least 12 months, but it depends what you are going to do with it. At one level, all you need to do is keep up with the Olson database - that will tell you the time zone rules for essentially everywhere in the world. If you are interested in tracking the time zones of your visitors, then you can keep the data for as long as you like. Since not everyone uses the canonical Continent/City notation for their time zone (I tend to use the older US/Pacific notation, for instance - which is still supported, but is equivalent to America/Los_Angeles). The classical notations such as TZ=EST5EDT are ambiguous; both the USA and Australia have timezones that use EST as an abbreviation, and the dates when the switch between standard and daylight saving time occurs varies (witness the mass of data in the Olson database).
You also ask 'how long does it take for a time zone to change'. I'm not sure what you mean. In terms of 'when the clocks change (between standard and daylight saving time)', it is 'instantaneous'; one second it is one time zone offset; the next second it is the other. If you mean 'how long does it take for governments to change their mind', it varies radically. For example, both Europe and the USA have relatively fixed rules that change every few years; the rule in the USA had been stable for about 20 years, then they changed the rules about 3 years ago. Europe is similar. On the other hand, some countries change their rules yearly. My impression is that some of the Islamic countries adjust when they switch between standard and daylight saving time (or vice versa) depending in part on when Ramadan falls - if the change would occur during Ramadan, then they bring it forward, or delay it, so that the rule does not change during Ramadan. Other countries have different reasons for the brinksmanship that goes on - maybe it is the political equivalent of a release deadline. So it may take quite a while for people to decide what the 'final' (meaning 'next edition') of the rules will be for a given year.
The web site http://worldtimezone.com/ does a pretty good job of keeping track of most of these idiosyncracies.
我想你的意思是“一个城市或州可以跨越两个时区吗?”。是的。 佛罗里达州墨西哥海滩 位于 CST 和 EST 之间的边界,该镇的部分地区位于 CST 和 EST 之间时区。
至于如何告诉计算机,我不知道。
I think you mean "Can one city or state span two time zones?". Yes. Mexico Beach, FL sits on the border between CST and EST with parts of the town in both time zones.
As for how you could tell a computer that, no idea.
全世界只有一个格林威治标准时间。至于时区,请参阅此处,其中显示了例如堪萨斯州内的遵守情况的变化。
There is only one gmt for the whole world. As for timezones, see here, showing variation of observance e.g. within Kansas.
任何任意管辖区都可能有多个时区,尽管大多数管辖区没有。
Any arbitrary jurisdiction may have multiple timezones, though the majority do not.
看看 http://www.worldtimezone.com/faq.html
Have a look at http://www.worldtimezone.com/faq.html