提交 32e51b75 authored 作者: Evgenij Ryazanov's avatar Evgenij Ryazanov

Change Javadoc of DateTimeUtils.zoneOffsetMillis

上级 83d7be8c
...@@ -109,12 +109,12 @@ public class DateTimeUtils { ...@@ -109,12 +109,12 @@ public class DateTimeUtils {
private static volatile TimeZone timeZone; private static volatile TimeZone timeZone;
/** /**
* Observed JVM behaviour is that if the timezone of the host computer is * Raw offset doesn't change during DST transitions, but changes during
* changed while the JVM is running, the zone offset does not change but * other transitions that some time zones have. H2 1.4.193 and later
* keeps the initial value. So it is correct to measure this once and use * versions use zone offset that is valid for startup time for performance
* this value throughout the JVM's lifecycle. In any case, it is safer to * reasons. This code is now used only by old PageStore engine and its
* use a fixed value throughout the duration of the JVM's life, rather than * datetime storage code has issues with all time zone transitions, so this
* have this offset change, possibly midway through a long-running query. * buggy logic is preserved as is too.
*/ */
private static int zoneOffsetMillis = createGregorianCalendar().get(Calendar.ZONE_OFFSET); private static int zoneOffsetMillis = createGregorianCalendar().get(Calendar.ZONE_OFFSET);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论