Dates in the UI display with 2 digit year instead of 4 digit if CLDR provider is used (JDK11 default)
Description
Attachments
- 12 Nov 2018, 09:35 AM
- 12 Nov 2018, 09:35 AM
is related to
Activity
Summer Zhang September 2, 2019 at 2:51 AM
Hi @Victor LR,
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 AMEdited
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 https://liferay.atlassian.net/browse/LPS-82010#icft=LPS-82010); additionally, the locale with the Czech language is rendered as "Czech Republic" (see https://liferay.atlassian.net/browse/LPS-87409#icft=LPS-87409)
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.tian May 16, 2019 at 5:47 PM
Hi @Victor LR @Joel Hendley @Anthony Chu,
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.
Steps to Reproduce:
Compile portal on JDK8
Start portal on JDK11
Login
Add Calendar widget to the Welcome page
Add a new event
Save event
Click on event on the scheduler
Click "View Details"
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.