ICEfaces
  1. ICEfaces
  2. ICE-6217

Non-English locales lead to an exception when parsing dates

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0-Beta2
    • Fix Version/s: 2.0.0
    • Component/s: Framework
    • Labels:
      None
    • Environment:
      ICEfaces 2

      Description

      In our class:

       icefaces/core/src/main/java/org/icefaces/impl/util/Util.java, to

      We set up a static DateFormat:

      public static final DateFormat HTTP_DATE = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss zzz");

      However, if the default is something other than English, a parsing exception can occur. The forum poster points to the relevant W3C spec:

      http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html

      and suggests making the following adjustment.

      public static final DateFormat HTTP_DATE = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss zzz", Locale.ENGLISH);

        Issue Links

          Activity

          Repository Revision Date User Message
          ICEsoft Public SVN Repository #23148 Wed Nov 17 15:14:48 MST 2010 mircea.toma ICE-6217 Make sure English locale is used for parsing and formatting the HTTP dates.
          Files Changed
          Commit graph MODIFY /icefaces2/trunk/icefaces/core/src/main/java/org/icefaces/impl/util/Util.java

            People

            • Assignee:
              Mircea Toma
              Reporter:
              Deryk Sinotte
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: