From 80018938532754ac5ac126df758a15815cb0ff21 Mon Sep 17 00:00:00 2001 From: Kousuke Saruta Date: Wed, 5 Aug 2020 16:38:33 +0900 Subject: [PATCH] Fixed time zone for unit-tests.log. --- core/src/test/scala/org/apache/spark/SparkFunSuite.scala | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/core/src/test/scala/org/apache/spark/SparkFunSuite.scala b/core/src/test/scala/org/apache/spark/SparkFunSuite.scala index 581786ce0a70c..8d103002a7496 100644 --- a/core/src/test/scala/org/apache/spark/SparkFunSuite.scala +++ b/core/src/test/scala/org/apache/spark/SparkFunSuite.scala @@ -65,6 +65,12 @@ abstract class SparkFunSuite with Logging { // scalastyle:on + // Initialize the logger forcibly to let the logger log timestamp + // based on the local time zone depending on environments. + // The default time zone will be set to America/Los_Angeles later + // so this initialization is necessary here. + log + // Timezone is fixed to America/Los_Angeles for those timezone sensitive tests (timestamp_*) TimeZone.setDefault(TimeZone.getTimeZone("America/Los_Angeles")) // Add Locale setting