From 774807ed8c72b4161b67d78f05de6a08467a41ba Mon Sep 17 00:00:00 2001 From: jun-he Date: Tue, 30 Jul 2024 07:17:54 -0700 Subject: [PATCH] Improve SEL function getAsText to use Locale.US instead of the default one (#1) (#62) --- .../java/com/netflix/sel/type/SelJodaDateTimeProperty.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/netflix-sel/src/main/java/com/netflix/sel/type/SelJodaDateTimeProperty.java b/netflix-sel/src/main/java/com/netflix/sel/type/SelJodaDateTimeProperty.java index fff5906..175f0bc 100644 --- a/netflix-sel/src/main/java/com/netflix/sel/type/SelJodaDateTimeProperty.java +++ b/netflix-sel/src/main/java/com/netflix/sel/type/SelJodaDateTimeProperty.java @@ -14,6 +14,7 @@ import com.netflix.sel.visitor.SelOp; import java.util.Arrays; +import java.util.Locale; import org.joda.time.DateTime; /** Wrapper class to support org.joda.time.DateTime.Property. */ @@ -52,7 +53,7 @@ public DateTime.Property getInternalVal() { public SelType call(String methodName, SelType[] args) { if (args.length == 0) { if ("getAsText".equals(methodName)) { - return SelString.of(val.getAsText()); + return SelString.of(val.getAsText(Locale.US)); } else if ("withMinimumValue".equals(methodName)) { return SelJodaDateTime.of(val.withMinimumValue()); } else if ("withMaximumValue".equals(methodName)) {