Skip to content

Commit 3d50179

Browse files
committed
fix forbidden api violation by avoiding default-locale usage
Signed-off-by: Jackie <[email protected]>
1 parent 77fcda9 commit 3d50179

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/main/java/org/opensearch/ad/ml/InsightsGenerator.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -217,10 +217,7 @@ private static String generateParagraphText(
217217
) {
218218
StringBuilder text = new StringBuilder();
219219

220-
DateTimeFormatter friendlyFormatter = DateTimeFormatter
221-
.ofPattern("MMM d, yyyy HH:mm z")
222-
.withLocale(Locale.ROOT)
223-
.withZone(ZoneOffset.UTC);
220+
DateTimeFormatter friendlyFormatter = DateTimeFormatter.ofPattern("MMM d, yyyy HH:mm z", Locale.ROOT).withZone(ZoneOffset.UTC);
224221
String startStr = friendlyFormatter.format(eventStart);
225222
String endStr = friendlyFormatter.format(eventEnd);
226223

0 commit comments

Comments
 (0)