Skip to content

Commit f68acae

Browse files
committed
This is just renderTemplate
1 parent 1c190c7 commit f68acae

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

modules/ingest-common/src/main/java/org/elasticsearch/ingest/common/DateProcessor.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,10 +115,9 @@ public IngestDocument execute(IngestDocument document) {
115115
// extract the timezone and locale to use for date parsing
116116
final ZoneId documentTimezone;
117117
final Locale documentLocale;
118-
final Map<String, Object> sourceAndMetadata = document.getSourceAndMetadata();
119118
try {
120-
documentTimezone = newDateTimeZone(timezone == null ? null : timezone.newInstance(sourceAndMetadata).execute());
121-
documentLocale = newLocale(locale == null ? null : locale.newInstance(sourceAndMetadata).execute());
119+
documentTimezone = newDateTimeZone(timezone == null ? null : document.renderTemplate(timezone));
120+
documentLocale = newLocale(locale == null ? null : document.renderTemplate(locale));
122121
} catch (Exception e) {
123122
throw new IllegalArgumentException("unable to parse date [" + value + "]", e);
124123
}

0 commit comments

Comments
 (0)