You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@iotdb.apache.org by GitBox <gi...@apache.org> on 2021/04/14 02:16:03 UTC

[GitHub] [iotdb] HTHou commented on a change in pull request #3000: [IOTDB-1239]Incorrect datetime value can be inserted into iotdb succe…

HTHou commented on a change in pull request #3000:
URL: https://github.com/apache/iotdb/pull/3000#discussion_r612890822



##########
File path: service-rpc/src/main/java/org/apache/iotdb/rpc/RpcUtils.java
##########
@@ -244,7 +244,8 @@ public static String parseLongToDateWithPrecision(
           digits.insert(0, "0");
         }
       }
-      return datetime.substring(0, 19) + "." + digits + datetime.substring(19);
+      String timeZoneStr = datetime.substring(datetime.length() - 6);
+      return datetime.substring(0, datetime.length() - 6) + "." + digits + timeZoneStr;

Review comment:
       Hi, this PR looks good to me. 
   I think we should also be careful when the timestampPrecision is us or ns.
   Also, please check the failed tests. Thank you so much!
   




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org