File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
src/main/java/org/apache/skywalking/banyandb/v1/client/metadata Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ Release Notes.
1212
1313* Fix MeasureQuery.SumBy to use SUM instead of COUNT
1414* Add missing FloatFieldValue type in the Measure write operation
15+ * Fix wrong result of the Duration.ofDay
1516
16170.6.0
1718------------------
Original file line number Diff line number Diff line change @@ -29,7 +29,8 @@ public class Duration {
2929 private static final Pattern DURATION_PATTERN =
3030 Pattern .compile ("(((?<day>\\ d+)d)?((?<hour>\\ d+)h)?((?<minute>\\ d+)m)?|0)" );
3131 private static final long MINUTES_PER_HOUR = 60 ;
32- private static final long MINUTES_PER_DAY = MINUTES_PER_HOUR * 24 ;
32+ private static final long HOURS_PER_DAY = 24 ;
33+ private static final long MINUTES_PER_DAY = MINUTES_PER_HOUR * HOURS_PER_DAY ;
3334
3435 @ EqualsAndHashCode .Exclude
3536 private volatile String text ;
@@ -100,6 +101,6 @@ public static Duration ofHours(long hours) {
100101 }
101102
102103 public static Duration ofDays (long days ) {
103- return ofHours (days * MINUTES_PER_DAY );
104+ return ofHours (days * HOURS_PER_DAY );
104105 }
105106}
You can’t perform that action at this time.
0 commit comments