Skip to content

Commit 4319903

Browse files
committed
Set locale to en_US prior to server startup
1 parent 6be48e7 commit 4319903

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

core/trino-main/src/main/java/io/trino/server/Server.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@
7474
import java.nio.file.Paths;
7575
import java.util.Collection;
7676
import java.util.List;
77+
import java.util.Locale;
7778
import java.util.Optional;
7879
import java.util.Set;
7980

@@ -95,6 +96,10 @@ public final void start(String trinoVersion)
9596

9697
private void doStart(String trinoVersion)
9798
{
99+
// Trino server behavior does not depend on locale settings.
100+
// Use en_US as this is what Trino is tested with.
101+
Locale.setDefault(Locale.US);
102+
98103
long startTime = System.nanoTime();
99104
verifyJvmRequirements();
100105
verifySystemTimeIsReasonable();

core/trino-main/src/main/java/io/trino/server/testing/TestingTrinoServer.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@
126126
import java.time.Instant;
127127
import java.util.HashMap;
128128
import java.util.List;
129+
import java.util.Locale;
129130
import java.util.Map;
130131
import java.util.Optional;
131132
import java.util.concurrent.CountDownLatch;
@@ -152,6 +153,10 @@ public class TestingTrinoServer
152153
Logging logging = Logging.initialize();
153154
logging.setLevel("io.trino.event.QueryMonitor", Level.ERROR);
154155
logging.setLevel("org.eclipse.jetty", Level.ERROR);
156+
157+
// Trino server behavior does not depend on locale settings.
158+
// Use en_US as this is what Trino is tested with.
159+
Locale.setDefault(Locale.US);
155160
}
156161

157162
public static final String SESSION_START_TIME_PROPERTY = "session_start_time";

0 commit comments

Comments
 (0)