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

Activity

Show:

Summer ZhangSeptember 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 LRMay 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 ChuMay 17, 2019 at 9:17 AM
Edited

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

  • JDK8: Timestamp is formatted YYYY (current ticket); however, the Catalan localization of Chinese has the diacritic in the wrong direction ( / instead of \, see ); additionally, the locale with the Czech language is rendered as "Czech Republic" (see )

  • JDK11: Timestamp is formatted YYYY (current ticket); the Catalan localization of Chinese has diacritic in the correct direction ( \ instead of /); the locale with the Czech language is rendered as "Czechia."

tina.tianMay 16, 2019 at 5:47 PM

Hi ,

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

 

Tina

Victor LRMay 16, 2019 at 9:34 AM

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

Fixed

Details

Assignee

Reporter

Branch Version/s

7.2.x

Backported to Branch

Committed

Fix Priority

4

JDK

Oracle OpenJDK 11

Git Pull Request

Components

Affects versions

Priority

Zendesk Support

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