core
core copied to clipboard
Include Locale in java packaging
We need to include the jdk.localedata
in our java-seed that we use to run dotCMS
PR: #22723
@yolabingo Can you share the steps to test this change?
$date.getLocale().getAvailableLocales()
should return long list of locales, rather than just en_US_POSIX en en_US
and
$date.format( "MMMM yyyy", $date.getDate(), $date.getLocale().forLanguageTag("fr-CA") )
should return month name in French aout
Internal QA: Passed It is working as expected with the examples provided. Using this code snipped for example:
<b class="d-block">Locales: $date.getLocale().getAvailableLocales().size()</b>
<b class="d-block">Locale in French: $date.format( "MMMM yyyy", $date.getDate(), $date.getLocale().forLanguageTag("fr-CA") )</b>
#foreach($locale in $date.getLocale().getAvailableLocales())
<a class="text-capitalize">${locale.country}</a>#if(${velocityCount} < $date.getLocale().getAvailableLocales().size()), #end
#end
I get this output:
Fixed, tested on release-22.09 // Docker // FF
@erickgonzalez @jdotcms I wonder if the missing timezones are why the TimeZone startup task was not adjusting the offsets correctly?
@erickgonzalez @jdotcms I wonder if the missing timezones are why the TimeZone startup task was not adjusting the offsets correctly?
@wezell I am not sure if it is the case, @erickgonzalez do you know if their instance has just such as 3 locales, or bunch of them?
@swicken-dotcms this might might fix the timezone startup task. I am thinking this because that startup task does a timezone lookup and uses the timezone data to calculate the offset to update the dates with. It might be (I haven't tested) that if the timezone is not available in java that it just returns UTC, which would throw everyones dates off.