xml-rpc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jim Redman <...@ergotech.com>
Subject <dateTime.iso8601>
Date Sun, 14 Apr 2002 23:42:40 GMT
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 Redman
(505) 662 5156

View raw message