cloud-fan commented on a change in pull request #28101: [SPARK-31328][SQL] Fix rebasing of overlapped local timestamps during daylight saving time URL: https://github.com/apache/spark/pull/28101#discussion_r402336635
########## File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/util/DateTimeUtils.scala ########## @@ -1030,7 +1033,13 @@ object DateTimeUtils { cal.get(Calendar.SECOND), (Math.floorMod(micros, MICROS_PER_SECOND) * NANOS_PER_MICROS).toInt) .plusDays(cal.get(Calendar.DAY_OF_MONTH) - 1) - instantToMicros(localDateTime.atZone(ZoneId.systemDefault).toInstant) + val zonedDateTime = localDateTime.atZone(ZoneId.systemDefault) + val adjustedZdt = if (cal.get(Calendar.DST_OFFSET) == 0) { Review comment: can we add some comment here? people may not understand what `cal.get(Calendar.DST_OFFSET) == 0` means ---------------------------------------------------------------- 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 With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org