I think that [SPARK-46611][CORE] Remove ThreadLocal by replace SimpleDateFormat with DateTimeFormatter
introduced regression in UIUtils::formatBatchTime when timezone is defined. DateTimeFormatter is thread-safe and immutable according to JavaDoc so method DateTimeFormatter::withZone returns new instance when zone is changed. Following code has no effect: val oldTimezones = (batchTimeFormat.getZone, batchTimeFormatWithMilliseconds.getZone) if (timezone != null) { val zoneId = timezone.toZoneId batchTimeFormat.withZone(zoneId) batchTimeFormatWithMilliseconds.withZone(zoneId) } Suggested fix: introduce local variables for "batchTimeFormat" and "batchTimeFormatWithMilliseconds" and remove "oldTimezones" and "finally" block. I hope that I'm right. I just read the code. I didn't make any tests. Thank you Martin --------------------------------------------------------------------- To unsubscribe e-mail: dev-unsubscr...@spark.apache.org