I need times accurate to more than 1 second.

The current formatter is fixed:

         f = new SimpleDateFormat ("yyyyMMdd'T'HH:mm:ss");

Is there some reason why the milliseconds are not specified?  I think 
that iso8601 permits this.  So we could use the formatter:

        f = new SimpleDateFormat ("yyyyMMdd'T'HH:mm:ss.SSS");

and still be in compliance with the spec.  Can we add a constructor to 
Formatter that takes the string:

     /**
      * Uses the <code>DateFormat</code> string
      * provided.
      * @param format the formatting string
      */
     public Formatter (String format)
     {
         f = new SimpleDateFormat (format);
     }

Of course this opens something of a can of worms since the client does 
not read an iso8601 date, but only one that matches the format string.  
The format string happens to match the example in the spec., but that's 
only one of a (large) selection of valid formats.

Jim


-- 

Jim Redman
(505) 662 5156
http://www.ergotech.com

Reply via email to