Commit 8b85c48f authored by Michael A. Goulet's avatar Michael A. Goulet :cold_sweat:
Browse files

Explicitly set Locale.ENGLISH in DateTimeUtils

Some tests were failing on my box because I've got my locale set to
Portuguese; this shouldn't be an issue, since the NanoDB tests are
explicitly written in English. In order to fix Date parsing language-
agnostically, I just explicitly set the locale to `Locale.ENGLISH`.
parent 9b9b7286
Showing with 3 additions and 2 deletions
+3 -2
......@@ -11,6 +11,7 @@ import java.time.format.DateTimeParseException;
import java.time.temporal.Temporal;
import java.time.temporal.TemporalAmount;
import java.util.regex.Pattern;
import java.util.Locale;
/**
......@@ -26,8 +27,8 @@ public class DateTimeUtils {
private static final DateTimeFormatter DATE_FORMATS[] = {
DateTimeFormatter.ISO_LOCAL_DATE,
DateTimeFormatter.BASIC_ISO_DATE,
DateTimeFormatter.ofPattern("dd MMM yyyy"),
DateTimeFormatter.ofPattern("MMM dd yyyy")
DateTimeFormatter.ofPattern("dd MMM yyyy", Locale.ENGLISH),
DateTimeFormatter.ofPattern("MMM dd yyyy", Locale.ENGLISH)
};
/**
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment