Topic
  • 1 reply
  • Latest Post - ‏2013-02-20T15:19:55Z by SystemAdmin
KonradT.
KonradT.
3 Posts

Pinned topic Deserialization values of type xsd:DateTime that have'nt time zone/UTC info

‏2013-02-13T16:19:09Z |
Hello
I've integration with third party that send to ESB a messages with some attributes with xsd:DateTime
Some issues about values in that attributes comes to me.

I've done some investigation what exactly is sending to ESB. Suspicion goes to that serialized DateTime looks like "2011-12-25T03:49:17" without any information what time zone/UTC this value is.
After deserialization in ESB the value changes to "2011-12-25T03:49:17Z",
I've done some test with SOAPUi and mediation debug, and that confirms that DateTime after deserialization goes to an UTC time if it comes to ESB without time zone/UTC information. And that looks ok overall as i understand DateTime and time zones.

But i wonder what component is responsible for that behaviour?
and can i have some configration option to change it ?

Best regards.
Updated on 2013-02-20T15:19:55Z at 2013-02-20T15:19:55Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    289 Posts

    Re: Deserialization values of type xsd:DateTime that have'nt time zone/UTC info

    ‏2013-02-20T15:19:55Z  
    Hi,

    As per EMF(Eclipse Modeling Framework) design, if there is no timezone information provided for dateTime field, the dateTime value is considered as UTC, so the 'Z' is appended. There is work around for this. Either you have to change the data type of the dateTime field to 'string' or use custom code to remove Z.

    Cheers,
    Sachin