Bug #4936

Timezone display changes in later JDK versions

Added by Michael Kay about 2 months ago. Updated about 1 month ago.

Start date:
Due date:
% Done:


Estimated time:
Legacy ID:
Applies to branch:
Fix Committed on Branch:
Fixed in Maintenance Release:


Test -t:format-dateTime-025b, and other similar tests, are failing under JDK 11 but passing under JDK 8; the timezone display has changed from HST to GMT-10:00.

(I've just discovered that I had already noted this problem in a comment in the test suite source back in August).


#1 Updated by Norm Tovey-Walsh about 1 month ago

I observe that the use of three letter codes for timezones has been deprecated in Java going back at least as far as Java7, so maybe they've just finally stopped supporting it. (A cursory attempt to find mention of it in release notes was unsuccessful.)

#2 Updated by Michael Kay about 1 month ago

The relevant code in Saxon is FormatDate.getNamedTimeZone(), which calls NamedTimeZone.getTimeZoneNameForDate(). This searches the possible timezones and identifies the relevant one as Pacific/Honolulu, and then calls TimeZone.getDisplayName() (at NamedTimeZone#347), which returns "HST".

I think this is technically caused by a version change to the TZdata database, rather than a change to the JDK, it's just that the default version of the TZData database changes for different JDK versions.

I'm going to handle it by allowing either result from the test.

#3 Updated by Michael Kay about 1 month ago

  • Status changed from New to Closed
  • Priority changed from Low to Normal

Closed. No software change; modified expected test results to accept the values returned by Java 11.

Please register to edit this issue

Also available in: Atom PDF