You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by rd...@apache.org on 2003/09/10 00:57:00 UTC

cvs commit: jakarta-commons/betwixt/src/java/org/apache/commons/betwixt/strategy DefaultObjectStringConverter.java

rdonkin     2003/09/09 15:57:00

  Modified:    betwixt/src/java/org/apache/commons/betwixt/strategy
                        DefaultObjectStringConverter.java
  Log:
  Fixed problem with Date conversion on non-english default locales
  
  Revision  Changes    Path
  1.5       +8 -6      jakarta-commons/betwixt/src/java/org/apache/commons/betwixt/strategy/DefaultObjectStringConverter.java
  
  Index: DefaultObjectStringConverter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/betwixt/src/java/org/apache/commons/betwixt/strategy/DefaultObjectStringConverter.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- DefaultObjectStringConverter.java	24 Aug 2003 16:54:56 -0000	1.4
  +++ DefaultObjectStringConverter.java	9 Sep 2003 22:57:00 -0000	1.5
  @@ -64,6 +64,8 @@
   import java.text.SimpleDateFormat;
   import java.text.ParseException;
   
  +import java.util.Locale;
  +
   import org.apache.commons.beanutils.ConversionException;
   
   import org.apache.commons.betwixt.expression.Context;
  @@ -89,7 +91,7 @@
       
       /** Formats Dates to Strings and Strings to Dates */
       private static final SimpleDateFormat formatter 
  -        = new SimpleDateFormat("EEE MMM dd HH:mm:ss zzz yyyy");
  +        = new SimpleDateFormat("EEE MMM dd HH:mm:ss zzz yyyy", Locale.UK);
       
       /**
         * Converts an object to a string representation using ConvertUtils.