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