hotienvu commented on pull request #6233: URL: https://github.com/apache/incubator-pinot/pull/6233#issuecomment-722239601
Since the output we want is millis since epoch, this would still work regardless of whether user specify a time zone or not. ``` DateTimeFormat.forPattern("yyyyMMdd HH:mm:ss Z").withZoneUTC().parseMillis("19710101 00:00:00 +0800") -> 31507200000 DateTimeFormat.forPattern("yyyyMMdd HH:mm:ss Z").parseMillis("19710101 00:00:00 +0800") -> 31507200000 ``` However if we don't specify time timezone and our locale is not UTC e.g +0800 ``` DateTimeFormat.forPattern("yyyyMMdd HH:mm:ss").parseMillis("19710101 00:00:00") -> 31509000000 DateTimeFormat.forPattern("yyyyMMdd HH:mm:ss").withZoneUTC().parseMillis("19710101 00:00:00") -> 31536000000 ``` So I think it's better to enforce UTC in this case ---------------------------------------------------------------- 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: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org