本文整理了Java中java.time.zone.ZoneOffsetTransition.getDuration()
方法的一些代码示例,展示了ZoneOffsetTransition.getDuration()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZoneOffsetTransition.getDuration()
方法的具体详情如下:
包路径:java.time.zone.ZoneOffsetTransition
类名称:ZoneOffsetTransition
方法名:getDuration
[英]Gets the duration of the transition.
In most cases, the transition duration is one hour, however this is not always the case. The duration will be positive for a gap and negative for an overlap. Time-zones are second-based, so the nanosecond part of the duration will be zero.
[中]获取转换的持续时间。
在大多数情况下,过渡持续时间为一小时,但情况并非总是如此。对于间隙,持续时间为正,对于重叠,持续时间为负。时区是以秒为基础的,因此持续时间的纳秒部分将为零。
代码示例来源:origin: com.vaadin/vaadin-server
.ofSeconds(t.getInstant().getEpochSecond())
.toHours();
long duration = Math.max(t.getDuration().toMinutes(), 0);
transitionsList.add(epochHours);
transitionsList.add(duration);
代码示例来源:origin: com.github.seratch/java-time-backport
} else if (validOffsets.size() == 0) {
ZoneOffsetTransition trans = rules.getTransition(isoLDT);
localDateTime = localDateTime.plusSeconds(trans.getDuration().getSeconds());
offset = trans.getOffsetAfter();
} else {
代码示例来源:origin: com.github.seratch/java-time-backport
} else if (validOffsets.size() == 0) {
ZoneOffsetTransition trans = rules.getTransition(localDateTime);
localDateTime = localDateTime.plusSeconds(trans.getDuration().getSeconds());
offset = trans.getOffsetAfter();
} else {
内容来源于网络,如有侵权,请联系作者删除!