Skip to content

Commit

Permalink
Fixed: Time zone display for JDK17+ (OFBIZ-12721) (#676)
Browse files Browse the repository at this point in the history
Use ZoneId API to get time zone display name

Thanks Ioan Eugen

jleroux: I did not find any timeZone.getDisplayName in in Java and Groovy files so I guess it's OK to close.
  • Loading branch information
ieugen authored Dec 5, 2023
1 parent 9935270 commit ca0433d
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ application {
? jvmArgs.tokenize()
: ['-Xms128M','-Xmx1024M',
'-Djdk.serialFilter=maxarray=100000;maxdepth=20;maxrefs=1000;maxbytes=500000', // OFBIZ-12592 and OFBIZ-12716
'--add-exports=java.base/sun.util.calendar=ALL-UNNAMED', // OFBIZ-12721
// '--add-exports=java.base/sun.util.calendar=ALL-UNNAMED', // OFBIZ-12721
'--add-opens=java.base/java.util=ALL-UNNAMED' // OFBIZ-12726
]
}
Expand Down
10 changes: 5 additions & 5 deletions themes/flatgrey/template/Footer.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,20 @@ under the License.
-->
<div id="footer">
<ul>
<li class="first">${nowTimestamp?datetime?string.short} - <a href="<@ofbizUrl>ListTimezones</@ofbizUrl>">${timeZone.getDisplayName(timeZone.useDaylightTime(), Static["java.util.TimeZone"].LONG, locale)}</a></li>
<li class="first">${nowTimestamp?datetime?string.short} - <a href="<@ofbizUrl>ListTimezones</@ofbizUrl>">${timeZone.toZoneId().getDisplayName(Static["java.time.format.TextStyle"].FULL_STANDALONE, locale)}</a></li>
<li><a href="<@ofbizUrl>ListLocales</@ofbizUrl>">${locale.getDisplayName(locale)}</a></li>
<li class="last"><a href="<@ofbizUrl>ListVisualThemes</@ofbizUrl>">${uiLabelMap.CommonVisualThemes}</a></li>
</ul>
<p>
<div class="poweredBy"><span class="footerTextColour">${uiLabelMap.CommonPoweredBy}
<a href="http://ofbiz.apache.org" class="noicon">OFBiz </a></span><span class="footerTextColour">Copyright 2001-${nowTimestamp?string("yyyy")}
<a href="http://www.apache.org" class="noicon">The Apache Software Foundation - www.apache.org</a></span>
<div class="poweredBy"><span class="footerTextColour">${uiLabelMap.CommonPoweredBy}
<a href="http://ofbiz.apache.org" class="noicon">OFBiz </a></span><span class="footerTextColour">Copyright 2001-${nowTimestamp?string("yyyy")}
<a href="http://www.apache.org" class="noicon">The Apache Software Foundation - www.apache.org</a></span>
<span class="footerTextColour">
${uiLabelMap.CommonRelease} <#include "ofbizhome://VERSION" ignore_missing=true/>
<#include "ofbizhome://runtime/GitInfo.ftl" ignore_missing=true/>
</span>
</div>

</p>
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions themes/helveticus/template/includes/Footer.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ under the License.
-->
<div id="footer-offset"></div>
<div id="footer">
<span>${nowTimestamp?datetime?string.short} - <a href="<@ofbizUrl>ListTimezones</@ofbizUrl>">${timeZone.getDisplayName(timeZone.useDaylightTime(), Static["java.util.TimeZone"].LONG, locale)}</a></span>
<span>${uiLabelMap.CommonCopyright} (c) 2001-${nowTimestamp?string("yyyy")}
<span>${nowTimestamp?datetime?string.short} - <a href="<@ofbizUrl>ListTimezones</@ofbizUrl>">${timeZone.toZoneId().getDisplayName(Static["java.time.format.TextStyle"].FULL_STANDALONE, locale)}</a></span>
<span>${uiLabelMap.CommonCopyright} (c) 2001-${nowTimestamp?string("yyyy")}
<a href="http://www.apache.org" target="_blank">The Apache Software Foundation</a>. ${uiLabelMap.CommonPoweredBy}
<a href="http://ofbiz.apache.org" target="_blank">Apache OFBiz.</a> ${uiLabelMap.CommonRelease}
<#include "ofbizhome://VERSION" ignore_missing=true/>
Expand Down
4 changes: 2 additions & 2 deletions themes/rainbowstone/template/includes/Footer.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ under the License.
-->
<div id="footer-offset"></div>
<div id="footer">
<span>${nowTimestamp?datetime?string.short} - <a href="<@ofbizUrl>ListTimezones</@ofbizUrl>">${timeZone.getDisplayName(timeZone.useDaylightTime(), Static["java.util.TimeZone"].LONG, locale)}</a></span>
<span>${uiLabelMap.CommonCopyright} (c) 2001-${nowTimestamp?string("yyyy")}
<span>${nowTimestamp?datetime?string.short} - <a href="<@ofbizUrl>ListTimezones</@ofbizUrl>">${timeZone.toZoneId().getDisplayName(Static["java.time.format.TextStyle"].FULL_STANDALONE, locale)}</a></span>
<span>${uiLabelMap.CommonCopyright} (c) 2001-${nowTimestamp?string("yyyy")}
<a href="http://www.apache.org" target="_blank">The Apache Software Foundation</a>. ${uiLabelMap.CommonPoweredBy}
<a href="http://ofbiz.apache.org" target="_blank">Apache OFBiz.</a> ${uiLabelMap.CommonRelease}
<#include "ofbizhome://VERSION" ignore_missing=true/>
Expand Down
2 changes: 1 addition & 1 deletion themes/tomahawk/template/Footer.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ under the License.
<#include "ofbizhome://runtime/GitInfo.ftl" ignore_missing=true/>
</li>
<li class="opposed">${nowTimestamp?datetime?string.short} -
<a href="<@ofbizUrl>ListTimezones</@ofbizUrl>">${timeZone.getDisplayName(timeZone.useDaylightTime(), Static["java.util.TimeZone"].LONG, locale)}</a>
<a href="<@ofbizUrl>ListTimezones</@ofbizUrl>">${timeZone.toZoneId().getDisplayName(Static["java.time.format.TextStyle"].FULL_STANDALONE, locale)}</a>
</li>
</ul>
</div>
Expand Down

0 comments on commit ca0433d

Please sign in to comment.