From 97b7f1f85fefcb1f892d32b57cdb650ebb3f6f48 Mon Sep 17 00:00:00 2001 From: pgomulka Date: Mon, 19 Oct 2020 14:31:55 +0200 Subject: [PATCH 1/5] Fix ingest timezone parsing When timezone paramter is specified it should recalculate the timezone provided in a date format --- docs/reference/release-notes/6.8.13.asciidoc | 53 +++++++++++++++++++ .../ingest/common/DateFormat.java | 20 +++---- 2 files changed, 64 insertions(+), 9 deletions(-) create mode 100644 docs/reference/release-notes/6.8.13.asciidoc diff --git a/docs/reference/release-notes/6.8.13.asciidoc b/docs/reference/release-notes/6.8.13.asciidoc new file mode 100644 index 0000000000000..e1026762f6caf --- /dev/null +++ b/docs/reference/release-notes/6.8.13.asciidoc @@ -0,0 +1,53 @@ +:es-issue: https://github.com/elastic/elasticsearch/issues/ +:es-pull: https://github.com/elastic/elasticsearch/pull/ + +[[release-notes-6.8.13]] +== {es} version 6.8.13 + +coming[6.8.13] + +Also see <>. + +[[enhancement-6.8.13]] +[float] +=== Enhancements + +Features/Java Low Level REST Client:: +* [client] Add simple support for gzip compression {es-pull}63230[#63230] (issue: {es-issue}62044[#62044]) + + + +[[bug-6.8.13]] +[float] +=== Bug fixes + +Audit:: +* Move RestRequestFilter to core {es-pull}63507[#63507] + +Authorization:: +* Ensure authz operation overrides transient authz headers {es-pull}61621[#61621] +* Relax the index access control check for scroll searches {es-pull}61446[#61446] + +CCR:: +* CCR should retry on CircuitBreakingException {es-pull}62013[#62013] (issue: {es-issue}55633[#55633]) +* Retry CCR shard follow task when no seed node left {es-pull}63225[#63225] +* Set timeout of auto put-follow request to unbounded {es-pull}61679[#61679] (issue: {es-issue}56891[#56891]) + +Features/Java Low Level REST Client:: +* [client] Decompressed gzip responses report inconsistent encoding values [ISSUE] {es-pull}63314[#63314] + +MULTIPLE AREA LABELS:: +* Add hlrc_rest_total_hits_as_int parameter in scroll request {es-pull}61685[#61685] (issue: {es-issue}61677[#61677]) +* Fix bwc of HLRC scroll search requests {es-pull}61696[#61696] (issue: {es-issue}61677[#61677]) + + + +[[upgrade-6.8.13]] +[float] +=== Upgrades + +Infra/Packaging:: +* Upgrade the bundled JDK to JDK 15 {es-pull}62580[#62580] + + + diff --git a/modules/ingest-common/src/main/java/org/elasticsearch/ingest/common/DateFormat.java b/modules/ingest-common/src/main/java/org/elasticsearch/ingest/common/DateFormat.java index a2bafd47d89f1..ed25b7239a08f 100644 --- a/modules/ingest-common/src/main/java/org/elasticsearch/ingest/common/DateFormat.java +++ b/modules/ingest-common/src/main/java/org/elasticsearch/ingest/common/DateFormat.java @@ -98,10 +98,10 @@ Function getFunction(String format, ZoneId zoneId, Locale DateFormatter dateFormatter = DateFormatter.forPattern(format) .withLocale(locale); - // if UTC zone is set here, the time zone specified in the format will be ignored, leading to wrong dates - if (isUtc == false) { - dateFormatter = dateFormatter.withZone(zoneId); - } +// // if UTC zone is set here, the time zone specified in the format will be ignored, leading to wrong dates +// if (isUtc == false) { +// dateFormatter = dateFormatter.withZone(zoneId); +// } final DateFormatter formatter = dateFormatter; return text -> { TemporalAccessor accessor = formatter.parse(text); @@ -121,11 +121,13 @@ Function getFunction(String format, ZoneId zoneId, Locale accessor = newTime.withZoneSameLocal(zoneId); } - if (isUtc) { - return DateFormatters.from(accessor, locale).withZoneSameInstant(ZoneOffset.UTC); - } else { - return DateFormatters.from(accessor, locale); - } +// if (isUtc) { +// return DateFormatters.from(accessor, locale).withZoneSameInstant(ZoneOffset.UTC); +// } else { +// return DateFormatters.from(accessor, locale); +// } + return DateFormatters.from(accessor, locale, zoneId) + .withZoneSameInstant(zoneId); }; } }; From 83024f0a56c7fce572c8fe6e053fceb91e5a87c5 Mon Sep 17 00:00:00 2001 From: pgomulka Date: Tue, 24 Nov 2020 11:08:00 +0100 Subject: [PATCH 2/5] implement defaulting and overriding --- docs/reference/release-notes/6.8.13.asciidoc | 53 ------------------- .../ingest/common/DateFormat.java | 15 ++---- .../ingest/common/DateFormatTests.java | 32 ++++++++++- 3 files changed, 33 insertions(+), 67 deletions(-) delete mode 100644 docs/reference/release-notes/6.8.13.asciidoc diff --git a/docs/reference/release-notes/6.8.13.asciidoc b/docs/reference/release-notes/6.8.13.asciidoc deleted file mode 100644 index e1026762f6caf..0000000000000 --- a/docs/reference/release-notes/6.8.13.asciidoc +++ /dev/null @@ -1,53 +0,0 @@ -:es-issue: https://github.com/elastic/elasticsearch/issues/ -:es-pull: https://github.com/elastic/elasticsearch/pull/ - -[[release-notes-6.8.13]] -== {es} version 6.8.13 - -coming[6.8.13] - -Also see <>. - -[[enhancement-6.8.13]] -[float] -=== Enhancements - -Features/Java Low Level REST Client:: -* [client] Add simple support for gzip compression {es-pull}63230[#63230] (issue: {es-issue}62044[#62044]) - - - -[[bug-6.8.13]] -[float] -=== Bug fixes - -Audit:: -* Move RestRequestFilter to core {es-pull}63507[#63507] - -Authorization:: -* Ensure authz operation overrides transient authz headers {es-pull}61621[#61621] -* Relax the index access control check for scroll searches {es-pull}61446[#61446] - -CCR:: -* CCR should retry on CircuitBreakingException {es-pull}62013[#62013] (issue: {es-issue}55633[#55633]) -* Retry CCR shard follow task when no seed node left {es-pull}63225[#63225] -* Set timeout of auto put-follow request to unbounded {es-pull}61679[#61679] (issue: {es-issue}56891[#56891]) - -Features/Java Low Level REST Client:: -* [client] Decompressed gzip responses report inconsistent encoding values [ISSUE] {es-pull}63314[#63314] - -MULTIPLE AREA LABELS:: -* Add hlrc_rest_total_hits_as_int parameter in scroll request {es-pull}61685[#61685] (issue: {es-issue}61677[#61677]) -* Fix bwc of HLRC scroll search requests {es-pull}61696[#61696] (issue: {es-issue}61677[#61677]) - - - -[[upgrade-6.8.13]] -[float] -=== Upgrades - -Infra/Packaging:: -* Upgrade the bundled JDK to JDK 15 {es-pull}62580[#62580] - - - diff --git a/modules/ingest-common/src/main/java/org/elasticsearch/ingest/common/DateFormat.java b/modules/ingest-common/src/main/java/org/elasticsearch/ingest/common/DateFormat.java index ed25b7239a08f..ddafa873e42dc 100644 --- a/modules/ingest-common/src/main/java/org/elasticsearch/ingest/common/DateFormat.java +++ b/modules/ingest-common/src/main/java/org/elasticsearch/ingest/common/DateFormat.java @@ -94,14 +94,9 @@ Function getFunction(String format, ZoneId zoneId, Locale format = format.substring(1); } - boolean isUtc = ZoneOffset.UTC.equals(zoneId); - DateFormatter dateFormatter = DateFormatter.forPattern(format) .withLocale(locale); -// // if UTC zone is set here, the time zone specified in the format will be ignored, leading to wrong dates -// if (isUtc == false) { -// dateFormatter = dateFormatter.withZone(zoneId); -// } + final DateFormatter formatter = dateFormatter; return text -> { TemporalAccessor accessor = formatter.parse(text); @@ -109,7 +104,7 @@ Function getFunction(String format, ZoneId zoneId, Locale // fill the rest of the date up with the parsed date if (accessor.isSupported(ChronoField.YEAR) == false && accessor.isSupported(ChronoField.YEAR_OF_ERA) == false - && accessor.isSupported(WeekFields.of(locale).weekOfWeekBasedYear()) == false) { + && accessor.isSupported(WeekFields.of(locale).weekBasedYear()) == false) { int year = LocalDate.now(ZoneOffset.UTC).getYear(); ZonedDateTime newTime = Instant.EPOCH.atZone(ZoneOffset.UTC).withYear(year); for (ChronoField field : FIELDS) { @@ -121,13 +116,9 @@ Function getFunction(String format, ZoneId zoneId, Locale accessor = newTime.withZoneSameLocal(zoneId); } -// if (isUtc) { -// return DateFormatters.from(accessor, locale).withZoneSameInstant(ZoneOffset.UTC); -// } else { -// return DateFormatters.from(accessor, locale); -// } return DateFormatters.from(accessor, locale, zoneId) .withZoneSameInstant(zoneId); + }; } }; diff --git a/modules/ingest-common/src/test/java/org/elasticsearch/ingest/common/DateFormatTests.java b/modules/ingest-common/src/test/java/org/elasticsearch/ingest/common/DateFormatTests.java index 518ac20cec724..6f9781704dec3 100644 --- a/modules/ingest-common/src/test/java/org/elasticsearch/ingest/common/DateFormatTests.java +++ b/modules/ingest-common/src/test/java/org/elasticsearch/ingest/common/DateFormatTests.java @@ -70,7 +70,7 @@ public void testParseJavaDefaultYear() { } public void testParseWeekBased() { - String format = randomFrom("YYYY-ww"); + String format = "YYYY-ww"; ZoneId timezone = DateUtils.of("Europe/Amsterdam"); Function javaFunction = DateFormat.Java.getFunction(format, timezone, Locale.ROOT); ZonedDateTime dateTime = javaFunction.apply("2020-33"); @@ -78,7 +78,7 @@ public void testParseWeekBased() { } public void testParseWeekBasedWithLocale() { - String format = randomFrom("YYYY-ww"); + String format = "YYYY-ww"; ZoneId timezone = DateUtils.of("Europe/Amsterdam"); Function javaFunction = DateFormat.Java.getFunction(format, timezone, Locale.US); ZonedDateTime dateTime = javaFunction.apply("2020-33"); @@ -86,6 +86,34 @@ public void testParseWeekBasedWithLocale() { assertThat(dateTime, equalTo(ZonedDateTime.of(2020,8,9,0,0,0,0,timezone))); } + public void testDefaultHourAtUtcWithUTCOverride() { + + String format = "yyyy-MM-dd"; + ZoneId timezone = ZoneId.of("UTC"); + Function javaFunction = DateFormat.Java.getFunction(format, timezone, Locale.ROOT); + ZonedDateTime dateTime = javaFunction.apply("2020-01-01");// this will default to + assertThat(dateTime, equalTo(ZonedDateTime.of(2020, 01, 01, 0, 0, 0, 0, timezone))); + } + + public void testDefaultHourAtUtcWithNonUTCOverride() { + String format = "yyyy-MM-dd"; + ZoneId timezone = ZoneId.of("-01:00"); + Function javaFunction = DateFormat.Java.getFunction(format, timezone, Locale.ROOT); + // this means that hour will be 00:00 at -01:00 as timezone was provided on in pattern + ZonedDateTime dateTime = javaFunction.apply("2020-01-01"); + assertThat(dateTime, equalTo(ZonedDateTime.of(2020, 01, 01, 0, 0, 0, 0, timezone))); + } + + public void testDefaultHourAtGivenTimezoneWithNonUTCOverride() { + String format = "yyyy-MM-dd XXX"; + ZoneId timezone = ZoneId.of("-01:00"); + Function javaFunction = DateFormat.Java.getFunction(format, timezone, Locale.ROOT); + // this means that hour will be 00:00 at -02:00 as timezone was provided. Converted to -01:00 as requested on timezone param + + ZonedDateTime dateTime = javaFunction.apply("2020-01-01 -02:00"); + assertThat(dateTime, equalTo(ZonedDateTime.of(2020, 01, 01, 1, 0, 0, 0, timezone))); + } + public void testParseUnixMs() { assertThat(DateFormat.UnixMs.getFunction(null, ZoneOffset.UTC, null).apply("1000500").toInstant().toEpochMilli(), equalTo(1000500L)); From df69b56af9a6a6eb62b616a6d1aa0b44778ec491 Mon Sep 17 00:00:00 2001 From: pgomulka Date: Tue, 24 Nov 2020 11:29:04 +0100 Subject: [PATCH 3/5] clean up tests --- .../ingest/common/DateFormatTests.java | 42 ++++++++++++------- 1 file changed, 26 insertions(+), 16 deletions(-) diff --git a/modules/ingest-common/src/test/java/org/elasticsearch/ingest/common/DateFormatTests.java b/modules/ingest-common/src/test/java/org/elasticsearch/ingest/common/DateFormatTests.java index 6f9781704dec3..7509e226759a5 100644 --- a/modules/ingest-common/src/test/java/org/elasticsearch/ingest/common/DateFormatTests.java +++ b/modules/ingest-common/src/test/java/org/elasticsearch/ingest/common/DateFormatTests.java @@ -86,16 +86,36 @@ public void testParseWeekBasedWithLocale() { assertThat(dateTime, equalTo(ZonedDateTime.of(2020,8,9,0,0,0,0,timezone))); } - public void testDefaultHourAtUtcWithUTCOverride() { + public void testNoTimezoneOnPatternAndOverride() { + { + String format = "yyyy-MM-dd'T'HH:mm"; + ZoneId timezone = ZoneId.of("UTC"); + Function javaFunction = DateFormat.Java.getFunction(format, timezone, Locale.ROOT); + // this means that hour will be 10:00 at UTC as timezone was provided on a pattern, + ZonedDateTime dateTime = javaFunction.apply("2020-01-01T01:00"); + assertThat(dateTime, equalTo(ZonedDateTime.of(2020, 01, 01, 01, 0, 0, 0, timezone))); + } + { + String format = "yyyy-MM-dd'T'HH:mm"; + ZoneId timezone = ZoneId.of("-01:00"); + Function javaFunction = DateFormat.Java.getFunction(format, timezone, Locale.ROOT); + // this means that hour will be 10:00 at -01:00 as timezone was provided on a pattern, + ZonedDateTime dateTime = javaFunction.apply("2020-01-01T01:00"); + assertThat(dateTime, equalTo(ZonedDateTime.of(2020, 01, 01, 01, 0, 0, 0, timezone))); + } + } - String format = "yyyy-MM-dd"; - ZoneId timezone = ZoneId.of("UTC"); + public void testTimezoneOnAPatternAndNonUTCOverride() { + String format = "yyyy-MM-dd'T'HH:mm XXX"; + ZoneId timezone = ZoneId.of("-01:00"); Function javaFunction = DateFormat.Java.getFunction(format, timezone, Locale.ROOT); - ZonedDateTime dateTime = javaFunction.apply("2020-01-01");// this will default to - assertThat(dateTime, equalTo(ZonedDateTime.of(2020, 01, 01, 0, 0, 0, 0, timezone))); + // this means that hour will be 01:00 at -02:00 as timezone was provided. Converted to -01:00 as requested on timezone -01:00 param + + ZonedDateTime dateTime = javaFunction.apply("2020-01-01T01:00 -02:00"); + assertThat(dateTime, equalTo(ZonedDateTime.of(2020, 01, 01, 02, 0, 0, 0, timezone))); } - public void testDefaultHourAtUtcWithNonUTCOverride() { + public void testDefaultHourDefaultedToTimezoneOverride() { String format = "yyyy-MM-dd"; ZoneId timezone = ZoneId.of("-01:00"); Function javaFunction = DateFormat.Java.getFunction(format, timezone, Locale.ROOT); @@ -104,16 +124,6 @@ public void testDefaultHourAtUtcWithNonUTCOverride() { assertThat(dateTime, equalTo(ZonedDateTime.of(2020, 01, 01, 0, 0, 0, 0, timezone))); } - public void testDefaultHourAtGivenTimezoneWithNonUTCOverride() { - String format = "yyyy-MM-dd XXX"; - ZoneId timezone = ZoneId.of("-01:00"); - Function javaFunction = DateFormat.Java.getFunction(format, timezone, Locale.ROOT); - // this means that hour will be 00:00 at -02:00 as timezone was provided. Converted to -01:00 as requested on timezone param - - ZonedDateTime dateTime = javaFunction.apply("2020-01-01 -02:00"); - assertThat(dateTime, equalTo(ZonedDateTime.of(2020, 01, 01, 1, 0, 0, 0, timezone))); - } - public void testParseUnixMs() { assertThat(DateFormat.UnixMs.getFunction(null, ZoneOffset.UTC, null).apply("1000500").toInstant().toEpochMilli(), equalTo(1000500L)); From f05dc5365f39b1a7e7b7ca68a002c5dfc70358c9 Mon Sep 17 00:00:00 2001 From: pgomulka Date: Tue, 1 Dec 2020 08:57:19 +0100 Subject: [PATCH 4/5] testcase for defaulting weekbased year and fix comments --- .../ingest/common/DateFormatTests.java | 20 +++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/modules/ingest-common/src/test/java/org/elasticsearch/ingest/common/DateFormatTests.java b/modules/ingest-common/src/test/java/org/elasticsearch/ingest/common/DateFormatTests.java index 7509e226759a5..f2d657ea93338 100644 --- a/modules/ingest-common/src/test/java/org/elasticsearch/ingest/common/DateFormatTests.java +++ b/modules/ingest-common/src/test/java/org/elasticsearch/ingest/common/DateFormatTests.java @@ -73,8 +73,16 @@ public void testParseWeekBased() { String format = "YYYY-ww"; ZoneId timezone = DateUtils.of("Europe/Amsterdam"); Function javaFunction = DateFormat.Java.getFunction(format, timezone, Locale.ROOT); - ZonedDateTime dateTime = javaFunction.apply("2020-33"); - assertThat(dateTime, equalTo(ZonedDateTime.of(2020,8,10,0,0,0,0,timezone))); + ZonedDateTime dateTime = javaFunction.apply("2019-33"); + assertThat(dateTime, equalTo(ZonedDateTime.of(2019,8,12,0,0,0,0,timezone))); + } + + public void testParseWeekBasedYear() { + String format = "YYYY"; + ZoneId timezone = DateUtils.of("Europe/Amsterdam"); + Function javaFunction = DateFormat.Java.getFunction(format, timezone, Locale.ROOT); + ZonedDateTime dateTime = javaFunction.apply("2019"); + assertThat(dateTime, equalTo(ZonedDateTime.of(2018,12,31,0,0,0,0,timezone))); } public void testParseWeekBasedWithLocale() { @@ -91,7 +99,7 @@ public void testNoTimezoneOnPatternAndOverride() { String format = "yyyy-MM-dd'T'HH:mm"; ZoneId timezone = ZoneId.of("UTC"); Function javaFunction = DateFormat.Java.getFunction(format, timezone, Locale.ROOT); - // this means that hour will be 10:00 at UTC as timezone was provided on a pattern, + // this means that hour will be 01:00 at UTC as timezone was not on a pattern, but provided as an ingest param ZonedDateTime dateTime = javaFunction.apply("2020-01-01T01:00"); assertThat(dateTime, equalTo(ZonedDateTime.of(2020, 01, 01, 01, 0, 0, 0, timezone))); } @@ -99,7 +107,7 @@ public void testNoTimezoneOnPatternAndOverride() { String format = "yyyy-MM-dd'T'HH:mm"; ZoneId timezone = ZoneId.of("-01:00"); Function javaFunction = DateFormat.Java.getFunction(format, timezone, Locale.ROOT); - // this means that hour will be 10:00 at -01:00 as timezone was provided on a pattern, + // this means that hour will be 01:00 at -01:00 as timezone was not on a pattern, but provided as an ingest param ZonedDateTime dateTime = javaFunction.apply("2020-01-01T01:00"); assertThat(dateTime, equalTo(ZonedDateTime.of(2020, 01, 01, 01, 0, 0, 0, timezone))); } @@ -109,7 +117,7 @@ public void testTimezoneOnAPatternAndNonUTCOverride() { String format = "yyyy-MM-dd'T'HH:mm XXX"; ZoneId timezone = ZoneId.of("-01:00"); Function javaFunction = DateFormat.Java.getFunction(format, timezone, Locale.ROOT); - // this means that hour will be 01:00 at -02:00 as timezone was provided. Converted to -01:00 as requested on timezone -01:00 param + // this means that hour will be 01:00 at -02:00 as timezone on a pattern. Converted to -01:00 as requested on ingest param ZonedDateTime dateTime = javaFunction.apply("2020-01-01T01:00 -02:00"); assertThat(dateTime, equalTo(ZonedDateTime.of(2020, 01, 01, 02, 0, 0, 0, timezone))); @@ -119,7 +127,7 @@ public void testDefaultHourDefaultedToTimezoneOverride() { String format = "yyyy-MM-dd"; ZoneId timezone = ZoneId.of("-01:00"); Function javaFunction = DateFormat.Java.getFunction(format, timezone, Locale.ROOT); - // this means that hour will be 00:00 at -01:00 as timezone was provided on in pattern + // this means that hour will be 00:00 (default) at -01:00 as timezone was not on a pattern, but -01:00 was an ingest param ZonedDateTime dateTime = javaFunction.apply("2020-01-01"); assertThat(dateTime, equalTo(ZonedDateTime.of(2020, 01, 01, 0, 0, 0, 0, timezone))); } From 6551ad60c994297828c32a7d778d0aebd054f9fe Mon Sep 17 00:00:00 2001 From: pgomulka Date: Wed, 2 Dec 2020 09:37:45 +0100 Subject: [PATCH 5/5] remove week of weekbased year change --- .../org/elasticsearch/ingest/common/DateFormat.java | 2 +- .../elasticsearch/ingest/common/DateFormatTests.java | 12 ++---------- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/modules/ingest-common/src/main/java/org/elasticsearch/ingest/common/DateFormat.java b/modules/ingest-common/src/main/java/org/elasticsearch/ingest/common/DateFormat.java index ddafa873e42dc..1a6d3cb4f7af8 100644 --- a/modules/ingest-common/src/main/java/org/elasticsearch/ingest/common/DateFormat.java +++ b/modules/ingest-common/src/main/java/org/elasticsearch/ingest/common/DateFormat.java @@ -104,7 +104,7 @@ Function getFunction(String format, ZoneId zoneId, Locale // fill the rest of the date up with the parsed date if (accessor.isSupported(ChronoField.YEAR) == false && accessor.isSupported(ChronoField.YEAR_OF_ERA) == false - && accessor.isSupported(WeekFields.of(locale).weekBasedYear()) == false) { + && accessor.isSupported(WeekFields.of(locale).weekOfWeekBasedYear()) == false) { int year = LocalDate.now(ZoneOffset.UTC).getYear(); ZonedDateTime newTime = Instant.EPOCH.atZone(ZoneOffset.UTC).withYear(year); for (ChronoField field : FIELDS) { diff --git a/modules/ingest-common/src/test/java/org/elasticsearch/ingest/common/DateFormatTests.java b/modules/ingest-common/src/test/java/org/elasticsearch/ingest/common/DateFormatTests.java index f2d657ea93338..3e3796e49e89c 100644 --- a/modules/ingest-common/src/test/java/org/elasticsearch/ingest/common/DateFormatTests.java +++ b/modules/ingest-common/src/test/java/org/elasticsearch/ingest/common/DateFormatTests.java @@ -73,16 +73,8 @@ public void testParseWeekBased() { String format = "YYYY-ww"; ZoneId timezone = DateUtils.of("Europe/Amsterdam"); Function javaFunction = DateFormat.Java.getFunction(format, timezone, Locale.ROOT); - ZonedDateTime dateTime = javaFunction.apply("2019-33"); - assertThat(dateTime, equalTo(ZonedDateTime.of(2019,8,12,0,0,0,0,timezone))); - } - - public void testParseWeekBasedYear() { - String format = "YYYY"; - ZoneId timezone = DateUtils.of("Europe/Amsterdam"); - Function javaFunction = DateFormat.Java.getFunction(format, timezone, Locale.ROOT); - ZonedDateTime dateTime = javaFunction.apply("2019"); - assertThat(dateTime, equalTo(ZonedDateTime.of(2018,12,31,0,0,0,0,timezone))); + ZonedDateTime dateTime = javaFunction.apply("2020-33"); + assertThat(dateTime, equalTo(ZonedDateTime.of(2020,8,10,0,0,0,0,timezone))); } public void testParseWeekBasedWithLocale() {