<i18n dev> RFR: 8349200: [JMH] time.format.ZonedDateTimeFormatterBenchmark fails [v2]

SendaoYan syan at openjdk.org
Tue Feb 4 02:40:59 UTC 2025


> Hi all,
> The JMH test "org.openjdk.bench.java.time.format.ZonedDateTimeFormatterBenchmark.parse" fails "java.time.format.DateTimeParseException: Text '2015:03:10:12:13:ECT' could not be parsed at index 17".
> The `ECT` standard for "America/Guayaquil" - "Ecuador Time", and since jdk23 the `ECT` TimeZone.SHORT doesn't support anymore. Below code snippet shows the difference between jdk22 and jdk23:
> 
> 
>         TimeZone tz = TimeZone.getTimeZone("America/Guayaquil");
>         System.out.println(tz.getDisplayName());
>         System.out.println(tz.getDisplayName(true, TimeZone.SHORT));
>         System.out.println(tz.getDisplayName(false, TimeZone.SHORT));
> 
> 
> - Java 22 output:
> 
> 
> ~/software/jdk/temurin/jdk-22.0.2+9/bin/java ~/compiler-test/zzkk/TimeZoneTest.java 
> Ecuador Time
> ECST
> ECT
> 
> 
> - Java 23 output:
> 
> 
> ~/software/jdk/temurin/jdk-23+37/bin/java ~/compiler-test/zzkk/TimeZoneTest.java 
> Ecuador Time
> GMT-04:00
> GMT-05:00
> 
> 
> This PR use `Z` TimeZone.SHORT instead of `ECT` will make this test more generic. Change has been verified locally, test-fix only, no risk.

SendaoYan has updated the pull request incrementally with one additional commit since the last revision:

  Use PST instead of Z

-------------

Changes:
  - all: https://git.openjdk.org/jdk/pull/23414/files
  - new: https://git.openjdk.org/jdk/pull/23414/files/56fde9bc..7c84581e

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=23414&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=23414&range=00-01

  Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
  Patch: https://git.openjdk.org/jdk/pull/23414.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/23414/head:pull/23414

PR: https://git.openjdk.org/jdk/pull/23414


More information about the i18n-dev mailing list