On 2/17/07, Dennis Sosnoski <[EMAIL PROTECTED]> wrote:

Did you actually try passing 2007-02-16T18:41:41.296+0530 to the
Utility.parseDateTime() method?


yes  I tried this
System.out.println("date value 1171631501296 ==> " + Utility.parseDateTime
("2007-02-16T18:41:41.296+0530"));

and gave me the exception
java.lang.NumberFormatException: For input string: ".296+0530"
   at java.lang.NumberFormatException.forInputString(
NumberFormatException.java:48)
   at java.lang.FloatingDecimal.readJavaFormatString(FloatingDecimal.java
:1207)
   at java.lang.Double.parseDouble(Double.java:220)
   at org.jibx.runtime.Utility.parseTime(Utility.java:799)
   at org.jibx.runtime.Utility.parseDateTime(Utility.java:833)

I don't know of any problems in this
area, though it's always possible you've discovered something new.

If you're able to make SimpleDateFormat work for you that's great. I
didn't say it couldn't be done, only that I didn't see exactly how to do
it in a way I trusted to always work properly. You are likely to still
run into problem using SimpleDateFormat if anyone tries using a date
prior to the Julian/Gregorian conversion, but that's probably not a
major concern for most people. :-)  However, I'd think that at a minimum
you'd need to always set the timezone to UTC (technically the correct
choice for schema, not GMT).


yes. that 's correct. I have to further findout about SimpleDateFormatter
class and xml Schema dataTime.


--
Amila Suriarachchi,
WSO2 Inc.

Reply via email to