跨 DST 边界或跨时区的持续时间(以天为单位)

Duration in days over DST boundary or across timezones

我想知道 ISO-8601 或任何其他关于时间的流行标准是否解决了间隔跨越 DST 边界时的持续时间问题?

例如,2017-03-01T12:00:00-05:002017-03-02T12:00:00-05:00 之间的天数显然是 1 day

但是 2017-03-11T12:00:00-05:00(夏令时关闭)和 2017-03-12T12:00:00-04:00(夏令时开启)之间的天数呢?一方面,从中午到第二天中午 -- 好像 1 day。另一方面,实际经过的时间只有23 hours

此外,无论语义是什么,它们是否也适用于不同的地理时区(比如纽约一天中午与伦敦第二天中午)?

ISO 的相关部分 8601:2004(E)

2.2.6
calendar day
time interval starting at midnight and ending at the next midnight, the latter being also the starting instant of the next calendar day

NOTE 1 A calendar day is often also referred to as day

NOTE 2 The duration of a calendar day is 24 hours; except if modified by:

  • the insertion or deletion of leap seconds, by decision of the International Earth Rotation Service (IERS), or
  • the insertion or deletion of other time intervals, as may be prescribed by local authorities to alter the time scale of local time.

2.2.7
day
〈duration〉 duration of a calendar day

NOTE The term "day" applies also to the duration of any time interval which starts at a certain time of day at a certain calendar day and ends at the same time of day at the next calendar day

...

4.2.2.1

... no provisions have been made to prevent ambiguities in expressions that result from discontinuities in the time scale of local time (e.g. daylight saving time)

总而言之,“日”这个词要格外小心。虽然常见的“标准日”持续时间为 24 小时,但闰秒和本地时区转换都会影响其持续时间。

根据经验,默认情况下我倾向于考虑 的日历单位。也就是说,就像 monthyear 一样,它是日历系统的一部分,而不是计时系统。想想这三个部分协同工作以产生下面的正方形:

反之,时间的单位都是按国际单位second计算的,正好:

the duration of 9,192,631,770 periods of the radiation corresponding to the transition between the two hyperfine levels of the ground state of the caesium 133 atom

我们其他的时间单位都是从那里衍生出来的。 60 秒等于一分钟。 60 分钟等于一个小时。

虽然我们更愿意根据确切的时间量来定义天数,但由于时区、夏令时和闰秒的原因,我们不能总是协调两者。