You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2019/02/20 16:07:53 UTC

[GitHub] gianm commented on a change in pull request #6937: Select query failing if miliseconds used as time for indexing

gianm commented on a change in pull request #6937: Select query failing if miliseconds used as time for indexing
URL: https://github.com/apache/incubator-druid/pull/6937#discussion_r258554752
 
 

 ##########
 File path: core/src/main/java/org/apache/druid/java/util/common/DateTimes.java
 ##########
 @@ -107,7 +107,23 @@ public static DateTime utc(long instant)
 
   public static DateTime of(String instant)
   {
-    return new DateTime(instant, ISOChronology.getInstanceUTC());
+    try {
+      Integer seconds = Integer.valueOf(instant);
 
 Review comment:
   This code won't work for timestamps that are near the epoch. I think it's a bit too clever and we should stick to only working on milliseconds timestamps and ISO8601 strings.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org