This is an automated email from the ASF dual-hosted git repository.
xingtanzjr pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/iotdb.git
The following commit(s) were added to refs/heads/master by this push:
new 2d43abfdf43 Fix DataTimeUtils convertLongToData bug (#10016)
2d43abfdf43 is described below
commit 2d43abfdf43106dd79e76d86841d35c1a26fdfc1
Author: Haonan <[email protected]>
AuthorDate: Thu Jun 1 12:41:22 2023 +0800
Fix DataTimeUtils convertLongToData bug (#10016)
---
server/src/main/java/org/apache/iotdb/db/utils/DateTimeUtils.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/server/src/main/java/org/apache/iotdb/db/utils/DateTimeUtils.java
b/server/src/main/java/org/apache/iotdb/db/utils/DateTimeUtils.java
index f7514da9eab..c7df46fbe94 100644
--- a/server/src/main/java/org/apache/iotdb/db/utils/DateTimeUtils.java
+++ b/server/src/main/java/org/apache/iotdb/db/utils/DateTimeUtils.java
@@ -668,10 +668,10 @@ public class DateTimeUtils {
String timePrecision =
IoTDBDescriptor.getInstance().getConfig().getTimestampPrecision();
switch (timePrecision) {
case "ns":
- timestamp /= 1000_000_000;
+ timestamp /= 1000_000;
break;
case "us":
- timestamp /= 1000_000;
+ timestamp /= 1000;
break;
}
return LocalDateTime.ofInstant(Instant.ofEpochMilli(timestamp),
ZoneId.systemDefault())