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 d275dae8ebb92d5d108716e8941cce6dba203228
Author: toaditi <[email protected]>
AuthorDate: Wed Jul 29 12:49:21 2026 +0530

    Fixed: Time zones always displayed using their daylight savings display 
name (OFBIZ-12731)
    
    Thanks to Daniel Watford for reporting this issue, suggesting the ZoneId
    display-name approach and, after the footer was fixed, testing trunk and
    identifying that the ListTimezones page was the remaining part; to Eugen 
Stan
    whose footer fix for OFBIZ-12721 (ca0433d0e4) this change follows; and to
    Jacques Le Roux for following up on both issues and noticing that the time
    zone name shown in the footer could not be found in the list.
    
    The time zone lookup list (partymgr/control/ListTimezones) built its display
    names with TimeZone#getDisplayName(useDaylightTime(), LONG, locale).
    useDaylightTime() answers whether the zone has DST rules at all, not whether
    DST is currently in effect, so every DST-observing zone was permanently 
shown
    with its summer name (e.g. 'British Summer Time' in December, 'Australian
    Eastern Daylight Time' during the southern winter).
    
    Use the same ZoneId#getDisplayName(TextStyle.FULL_STANDALONE, locale) call 
the
    footer has used since OFBIZ-12721. This shows the season-neutral generic 
name
    ('British Time', 'Central European Time') and makes the list entries match 
the
    name displayed in the footer.
---
 themes/common-theme/template/includes/ListTimezones.ftl | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/themes/common-theme/template/includes/ListTimezones.ftl 
b/themes/common-theme/template/includes/ListTimezones.ftl
index a728d38437..ec5c5b1374 100644
--- a/themes/common-theme/template/includes/ListTimezones.ftl
+++ b/themes/common-theme/template/includes/ListTimezones.ftl
@@ -26,13 +26,12 @@ under the License.
   </div>
   <table cellspacing="0" class="basic-table hover-bar">
     <#assign altRow = true>
-    <#assign displayStyle = Static["java.util.TimeZone"].LONG>
     <#assign availableTimeZones = 
Static["org.apache.ofbiz.base.util.UtilDateTime"].availableTimeZones()/>
     <#list availableTimeZones as availableTz>
       <#assign altRow = !altRow>
       <tr<#if altRow> class="alternate-row"</#if>>
         <td>
-          <a 
href="<@ofbizUrl>setSessionTimeZone</@ofbizUrl>?tzId=${availableTz.getID()}">${availableTz.getDisplayName(availableTz.useDaylightTime(),
 displayStyle, locale)} (${availableTz.getID()})</a>
+          <a 
href="<@ofbizUrl>setSessionTimeZone</@ofbizUrl>?tzId=${availableTz.getID()}">${availableTz.toZoneId().getDisplayName(Static["java.time.format.TextStyle"].FULL_STANDALONE,
 locale)} (${availableTz.getID()})</a>
         </td>
       </tr>
     </#list>

Reply via email to