From 378319d119956c95f2aeecc06a86a35bafd6dcc5 Mon Sep 17 00:00:00 2001 From: Konstantin Knauf Date: Sun, 3 Jan 2021 13:26:56 +0100 Subject: [PATCH] Set DateTimeFormatter locale to us. Resolves #1. --- src/main/java/com/github/knaufk/flink/faker/FakerUtils.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/github/knaufk/flink/faker/FakerUtils.java b/src/main/java/com/github/knaufk/flink/faker/FakerUtils.java index 69ff759..fe7f4a4 100644 --- a/src/main/java/com/github/knaufk/flink/faker/FakerUtils.java +++ b/src/main/java/com/github/knaufk/flink/faker/FakerUtils.java @@ -4,6 +4,7 @@ import java.math.BigInteger; import java.time.Instant; import java.time.format.DateTimeFormatter; +import java.util.Locale; import org.apache.flink.table.data.DecimalData; import org.apache.flink.table.data.StringData; import org.apache.flink.table.data.TimestampData; @@ -13,7 +14,8 @@ public class FakerUtils { public static final String FAKER_DATETIME_FORMAT = "EEE MMM dd HH:mm:ss zzz yyyy"; - private static DateTimeFormatter formatter = DateTimeFormatter.ofPattern(FAKER_DATETIME_FORMAT);; + private static DateTimeFormatter formatter = + DateTimeFormatter.ofPattern(FAKER_DATETIME_FORMAT, new Locale("us")); static Object stringValueToType(String value, LogicalTypeRoot logicalType) {