Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
1212b868
提交
1212b868
authored
1月 09, 2018
作者:
Evgenij Ryazanov
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Update outdated javadoc of LocalDateTimeUtils.
Conversion methods provided by JDK are not used anymore for many reasons.
上级
c312b552
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
4 行增加
和
16 行删除
+4
-16
LocalDateTimeUtils.java
h2/src/main/org/h2/util/LocalDateTimeUtils.java
+4
-16
没有找到文件。
h2/src/main/org/h2/util/LocalDateTimeUtils.java
浏览文件 @
1212b868
...
@@ -27,22 +27,10 @@ import org.h2.value.ValueTimestampTimeZone;
...
@@ -27,22 +27,10 @@ import org.h2.value.ValueTimestampTimeZone;
* <p>This class is implemented using reflection so that it compiles on
* <p>This class is implemented using reflection so that it compiles on
* Java 7 as well.</p>
* Java 7 as well.</p>
*
*
* <p>For LocalDate and LocalTime the conversion methods provided by
* <p>Custom conversion methods between H2 internal values and JSR-310 classes
* the JDK are used. For OffsetDateTime a custom conversion method is
* are used without intermediate conversions to java.sql classes. Direct
* used because it has no equivalent in JDBC. For LocalDateTime a
* conversion is simpler, faster, and it does not inherit limitations and
* custom conversion method is used instead of the one provided by the
* issues from java.sql classes and conversion methods provided by JDK.</p>
* JDK as well.</p>
*
* <p>Using the JDK provided conversion method for LocalDateTime would
* introduces some errors in edge cases. Consider the following case:
* at 2016-03-27 02:00 in Europe/Berlin the clocks were set to
* 2016-03-27 03:00. This means that 2016-03-27 02:15 does not exist in
* Europe/Berlin. Unfortunately java.sql.Timestamp is in the the time
* zone of the JVM. That means if you run a JVM with the time zone
* Europe/Berlin then the SQL value 'TIMESTAMP 2016-03-27 02:15:00' can
* not be represented. java.time.LocalDateTime does not have these
* limitations but if we convert through java.sql.Timestamp we inherit
* its limitations. Therefore that conversion must be avoided.</p>
*
*
* <p>Once the driver requires Java 8 all the reflection can be removed.</p>
* <p>Once the driver requires Java 8 all the reflection can be removed.</p>
*/
*/
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论