开发者

XMLGregorianCalendar 2010-12-21T08:55:17E-7+01:00 E-7. What does E-7 mean

From a SOAP webservice, a date field开发者_StackOverflow is returned as the string:

2010-12-21T08:55:17E-7+01:00

which .NET has problems parsing. Jax has no problems with this. What does E-7 mean. And what can I do normalize it in a java server.

EDIT: I have a java server thats acts as a transistion from multiple servers with buggy timestamp. What can I do normalize it once it has been parsed by jax? .normalise() will give me UTC which I'm not sure I want.


In ISO 8601 time you always deal with Z = Zulu for UTC, but there are other military time zones as well (not part of the standard):

http://www.navycs.com/militarytime.html

E is for Echo and means the time zone UTC + 5.

I have no explanation for the -7 and +01:00 parts though.

Edit: Updated the post to make clear Z is the only allowed notation for ISO 8601 times.


Apologies for previous misreading. I can confirm that .NET can't parse it, like this:

using System;
using System.Runtime.Remoting.Metadata.W3cXsd2001;

class Test
{    
    static void Main()
    {
        string x = "2010-12-21T08:55:17E-7+01:00";
        DateTime dt = SoapDateTime.Parse(x);
        Console.WriteLine(dt);
    }
}

It looks like a bad SOAP service, to be honest. Looking at various bits of documentation around SOAP, it looks like SOAP date/time values should be xsd:dateTime values, which are formatted with ISO 8601 - and I can't see anything in the Wikipedia ISO 8601 page which would allow that. It's possible that Wikipedia is inaccurate, of course - but it's more likely that it's a bug in the SOAP service, IMO.

I suggest you look at the headers from the service to see if that gives a hint as to the underlying platform... then look for bugs reported against that platform producing invalid date/time values.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜