Skip to content

Commit

Permalink
Merge pull request #6 from knaufk/datetimeparsing
Browse files Browse the repository at this point in the history
Set DateTimeFormatter locale to us. Resolves #1.
  • Loading branch information
knaufk authored Jan 4, 2021
2 parents f56be9c + 378319d commit 8f4d278
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main/java/com/github/knaufk/flink/faker/FakerUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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) {

Expand Down

0 comments on commit 8f4d278

Please sign in to comment.