Some browsers (IE from GoogleEarth) do not pass local information in the HTTP header for the request, therefore request.getLocale() returns null. When this happens the following tag fails even though a pattern and timezone are specified: <fmt:formatDate value="${d}" pattern="yyyy-MM-dd HH:mm z" timeZone="GMT"/> The above just prints out d.toString() SimpleDateFormat has all the elements it needs for a successful format, it should format the date as expected instead of using d.toString() Workaround: You can add the following to your JSP and it will work. <c:choose> <c:when test="${request.locale == null}"> <fmt:setLocale value="en_US" /> </c:when> </c:choose>
Another easy workaround without touching jsp pages is to set either the default fallback locale or the default locale via web.xml configuration <context-param> <param-name> javax.servlet.jsp.jstl.fmt.locale </param-name> <param-value> en </param-value> </context-param> <context-param> <param-name> javax.servlet.jsp.jstl.fmt.fallbackLocale </param-name> <param-value> en </param-value> </context-param>
JSTL replaced the i18n taglib, so this won't be worked on.