mirror of
https://gitee.com/dromara/hutool.git
synced 2026-02-09 09:16:26 +08:00
修复DateUnit毫秒转换问题(issue#4209@Github)
This commit is contained in:
@@ -35,6 +35,7 @@
|
||||
* 【core 】 修复`Calculator.conversion`方法计算包含%连接一元运算符的计算表达式的结果时逻辑缺陷(pr#4191@Github)
|
||||
* 【db 】 修复`SqlUtil.PATTERN_IN_CLAUSE`逻辑缺陷导致in语句参数不正确的问题(pr#4203@Github)
|
||||
* 【json 】 修复`ObjectMapper`过滤器对Bean复制无效的问题(pr#1431@Gitee)
|
||||
* 【core 】 修复`DateUnit`毫秒转换问题(issue#4209@Github)
|
||||
|
||||
-------------------------------------------------------------------------------------------------------------
|
||||
# 5.8.42(2025-11-28)
|
||||
|
||||
@@ -65,7 +65,7 @@ public enum DateUnit {
|
||||
*/
|
||||
public static DateUnit of(ChronoUnit unit) {
|
||||
switch (unit) {
|
||||
case MICROS:
|
||||
case MILLIS:
|
||||
return DateUnit.MS;
|
||||
case SECONDS:
|
||||
return DateUnit.SECOND;
|
||||
@@ -91,7 +91,7 @@ public enum DateUnit {
|
||||
public static ChronoUnit toChronoUnit(DateUnit unit) {
|
||||
switch (unit) {
|
||||
case MS:
|
||||
return ChronoUnit.MICROS;
|
||||
return ChronoUnit.MILLIS;
|
||||
case SECOND:
|
||||
return ChronoUnit.SECONDS;
|
||||
case MINUTE:
|
||||
|
||||
Reference in New Issue
Block a user