This is an automated email from the ASF dual-hosted git repository. dixitdeepak pushed a commit to branch trunk in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git
commit e79d62a33dc848ba4a2d329cee793d0198ebc3cf Author: toaditi <[email protected]> AuthorDate: Wed Jul 29 15:36:49 2026 +0530 Fixed: Time zones always displayed using their daylight savings display name (OFBIZ-12731) Thanks to Deepak Dixit for reviewing the ListTimezones fix and pointing out that the user profile page needed the same treatment. The Profile page (userprofile, available in every backoffice webapp) built its time zone names with the same TimeZone#getDisplayName(useDaylightTime(), LONG, locale) pattern in two places: the current time zone row and the available time zones drop-down. Both permanently showed the daylight savings name for every DST-observing zone, e.g. 'Australian Eastern Daylight Time' for Australia/Sydney during the southern winter. Use ZoneId#getDisplayName(TextStyle.FULL_STANDALONE, locale) as in ListTimezones.ftl and the footer (OFBIZ-12721), and remove the now unused displayStyle assign. This was the last remaining use of the useDaylightTime() display pattern in the framework. --- themes/common-theme/template/UserProfile.ftl | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/themes/common-theme/template/UserProfile.ftl b/themes/common-theme/template/UserProfile.ftl index 21e63b7fbb..f259f329a0 100644 --- a/themes/common-theme/template/UserProfile.ftl +++ b/themes/common-theme/template/UserProfile.ftl @@ -27,7 +27,6 @@ under the License. <#if !(selectedTimeZoneId?has_content) && timeZone??> <#assign selectedTimeZoneId = timeZone.getID()> </#if> -<#assign displayStyle = Static["java.util.TimeZone"].LONG> <#assign availableLocales = Static["org.apache.ofbiz.base.util.UtilMisc"].availableLocales()> <#assign availableTimeZones = Static["org.apache.ofbiz.base.util.UtilDateTime"].availableTimeZones()> @@ -40,7 +39,7 @@ under the License. <#assign lastTimeZoneDisplay = uiLabelMap.CommonNA> <#if lastTimeZoneId?has_content> <#assign lastTimeZone = Static["java.util.TimeZone"].getTimeZone(lastTimeZoneId)> - <#assign lastTimeZoneDisplay = lastTimeZone.getDisplayName(lastTimeZone.useDaylightTime(), displayStyle, locale) + " (" + lastTimeZone.getID() + ")"> + <#assign lastTimeZoneDisplay = lastTimeZone.toZoneId().getDisplayName(Static["java.time.format.TextStyle"].FULL_STANDALONE, locale) + " (" + lastTimeZone.getID() + ")"> </#if> <div class="screenlet"> @@ -113,7 +112,7 @@ under the License. <#list availableTimeZones as availableTz> <#assign availableTzId = availableTz.getID()> <option value="${availableTzId}"<#if availableTzId == selectedTimeZoneId!> selected="selected"</#if>> - ${availableTz.getDisplayName(availableTz.useDaylightTime(), displayStyle, locale)} (${availableTzId}) + ${availableTz.toZoneId().getDisplayName(Static["java.time.format.TextStyle"].FULL_STANDALONE, locale)} (${availableTzId}) </option> </#list> </select>

