【发布时间】:2014-03-13 03:56:03
【问题描述】:
我正在使用 Joda-time,我正在做这样的事情:
DateTimeZone timeZone = <Code that gets a TimeZone instance>
int offset = timeZone.getStandardOffset(new Date().getTime());
我想知道为什么对timezone.getStandardOffset() 的调用需要传入毫秒数。我怀疑这是为了考虑到时区偏移的历史变化? (例如,我们需要考虑到 2005 年那个疯狂的日子,当时布什先生决定当天的中心时间是 UTC+13,因为 13 比 -2 更大)
这是正确的吗?
【问题讨论】: