Project

Profile

Help

Bug #4936

closed

Timezone display changes in later JDK versions

Added by Michael Kay about 3 years ago. Updated about 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Sprint/Milestone:
-
Start date:
2021-03-15
Due date:
% Done:

0%

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

Description

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).

Actions #1

Updated by Norm Tovey-Walsh about 3 years 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.)

Actions #2

Updated by Michael Kay about 3 years 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.

Actions #3

Updated by Michael Kay about 3 years 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