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

Ah, that's because you're using an invalid format for the offset. The
schema specification says the offset has to be in the form hh:mm (where
the ':', as far as I know, is always required), such as:
"2002-10-10T12:00:00-05:00". Sorry I didn't notice this before.


thanks dennis for pointing out this. i'll fix it.

Is ADB currently generating dateTime values in this form (without the
required ':' character)? I'm surprised this works at all using other
frameworks, if so.

  - Dennis

Amila Suriarachchi wrote:
>
>
> On 2/17/07, *Dennis Sosnoski* <[EMAIL PROTECTED]
> <mailto:[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.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--
Amila Suriarachchi,
WSO2 Inc.

Reply via email to