Dates in the UI display with 2 digit year instead of 4 digit if CLDR provider is used (JDK11 default)

Description

Steps to Reproduce:

  1. Compile portal on JDK8

  2. Start portal on JDK11

  3. Login

  4. Add Calendar widget to the Welcome page

  5. Add a new event

  6. Save event

  7. Click on event on the scheduler

  8. Click "View Details"

  9. View date of the event

Also reproduced when viewing search results in the search portlet.

Expected Result:
Dates are shown using Month DD, YYYY format.

Actual Result:
Dates are shown using Month DD, YY format.

Not reproducible using JDK8 runtime. Reproducible on JDK8 if java.locale.providers=CLDR is set.

 

Attachments

2
  • 12 Nov 2018, 09:35 AM
  • 12 Nov 2018, 09:35 AM

Activity

Show:

Summer Zhang September 2, 2019 at 2:51 AM

Hi ,

Would it be possible for you to backport the fix to 7.1.x since this issue also affects 7.1.x? Please refer to this testray result. Thanks in advance.

Victor LR May 29, 2019 at 12:15 PM

PASSED Manual Testing following the steps in the description on:
7.2.x-private: 627cb834dce7bdc5a1d11c7e7306e1773b56c066

Dates render with YYYY format.

Anthony Chu May 17, 2019 at 9:17 AM
Edited

After setting -Djava.locale.providers=JRE,COMPAT,CLDR in setenv(.sh|.bat), this is the result:

tina.tian May 16, 2019 at 5:47 PM

Hi ,

Setting "java.locale.providers=JRE,COMPAT,CLDR" will work for both jdk8 and jdk11.

 

Tina

Victor LR May 16, 2019 at 9:34 AM

The workaround fixes this issue if applied on JDK11, but causes this issue if applied to JDK8.

Fixed
Pinned fields
Click on the next to a field label to start pinning.

Assignee

Victor LR

Reporter

Branch Version/s

7.2.x

Backported to Branch

Committed

Fix Priority

4

JDK

Oracle OpenJDK 11

Affects versions

Priority

Created November 12, 2018 at 9:35 AM
Updated July 25, 2023 at 11:54 PM
Resolved May 23, 2019 at 3:14 PM