You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by ha...@apache.org on 2023/06/01 04:34:27 UTC
[iotdb] branch fix_convertLongToDate created (now 453b70aabb7)
This is an automated email from the ASF dual-hosted git repository.
haonan pushed a change to branch fix_convertLongToDate
in repository https://gitbox.apache.org/repos/asf/iotdb.git
at 453b70aabb7 Fix DataTimeUtils convertLongToData bug
This branch includes the following new commits:
new 453b70aabb7 Fix DataTimeUtils convertLongToData bug
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
[iotdb] 01/01: Fix DataTimeUtils convertLongToData bug
Posted by ha...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
haonan pushed a commit to branch fix_convertLongToDate
in repository https://gitbox.apache.org/repos/asf/iotdb.git
commit 453b70aabb7de0f062b364d9fea8a4db9d81d0f8
Author: HTHou <hh...@outlook.com>
AuthorDate: Thu Jun 1 12:34:11 2023 +0800
Fix DataTimeUtils convertLongToData bug
---
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())