Date in Soap Message not the same as in the database

0
In the database the date is 25-01-1995. In the soap message the date is 24-01-1995. All the dates in thsi soap message are 1 day earlier than in the database. Is this a bug or do I need to add 1 day when sending dates to an other webservice? See soep message below. Created soap envelope : <soapenv:envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:body><mx:getmemberdetaillist xmlns:mx="http://fci.nl/"><mx:type>Rtf</mx:type><mx:members><mx:company><mx:id><mx:name><mx:code><mx:status>Member]]></mx:status><mx:department/><mx:vatnumber><mx:email><mx:phonenumber><mx:membersince><mx:revisiondate><mx:country><mx:code><mx:name></mx:country><mx:contacts><mx:person><mx:id><mx:prefix><mx:initials/><mx:firstname><mx:suffix/><mx:lastname><mx:email><mx:ischinesename><mx:position><mx:ranks><mx:contacttyperank><mx:rank><mx:contacttype><mx:value></mx:contacttype></mx:contacttyperank></mx:ranks><mx:communications><mx:communication><mx:primary><mx:type><mx:value></mx:communication></mx:communications></mx:person><mx:person><mx:id><mx:prefix><mx:initials/><mx:firstname><mx:suffix/><mx:lastname><mx:telephonenumber><mx:email><mx:ischinesename><mx:position><mx:ranks><mx:contacttyperank><mx:rank><mx:contacttype><mx:value>Correspondence]]></mx:value></mx:contacttype></mx:contacttyperank></mx:ranks><mx:communications><mx:communication><mx:primary><mx:type><mx:value></mx:communication><mx:communication><mx:primary><mx:type><mx:value></mx:communication></mx:communications></mx:person><mx:person><mx:id><mx:prefix><mx:initials/><mx:firstname><mx:suffix/><mx:lastname><mx:telephonenumber><mx:email><mx:westernname/><mx:ischinesename><mx:position><mx:ranks><mx:contacttyperank><mx:rank><mx:contacttype><mx:value></mx:contacttype></mx:contacttyperank><mx:contacttyperank><mx:rank><mx:contacttype><mx:value>ContactType]]></mx:value></mx:contacttype></mx:contacttyperank><mx:contacttyperank><mx:rank><mx:contacttype><mx:value></mx:contacttype></mx:contacttyperank></mx:ranks><mx:communications><mx:communication><mx:primary><mx:type><mx:value></mx:communication><mx:communication><mx:primary><mx:type><mx:value></mx:communication><mx:communication><mx:primary><mx:type><mx:value></mx:communication><mx:communication><mx:primary><mx:type><mx:value></mx:communication></mx:communications></mx:person><mx:person><mx:id><mx:prefix><mx:initials/><mx:firstname><mx:suffix/><mx:lastname><mx:telephonenumber><mx:email><mx:ischinesename><mx:position><mx:ranks><mx:contacttyperank><mx:rank><mx:contacttype><mx:value></mx:contacttype></mx:contacttyperank></mx:ranks><mx:communications><mx:communication><mx:primary><mx:type><mx:value></mx:communication><mx:communication><mx:primary><mx:type><mx:value></mx:communication></mx:communications></mx:person><mx:person><mx:id><mx:prefix><mx:initials/><mx:firstname><mx:suffix/><mx:lastname><mx:telephonenumber><mx:email><mx:ischinesename><mx:position><mx:ranks><mx:contacttyperank><mx:rank><mx:contacttype><mx:value></mx:contacttype></mx:contacttyperank><mx:contacttyperank><mx:rank><mx:contacttype><mx:value>ContactType]]></mx:value></mx:contacttype></mx:contacttyperank></mx:ranks><mx:communications><mx:communication><mx:primary><mx:type><mx:value></mx:communication><mx:communication><mx:primary><mx:type><mx:value></mx:communication></mx:communications></mx:person><mx:person><mx:id><mx:prefix><mx:firstname><mx:suffix/><mx:lastname><mx:ischinesename><mx:ranks/><mx:communications/></mx:person><mx:person><mx:id><mx:prefix><mx:firstname><mx:suffix/><mx:lastname><mx:ischinesename><mx:ranks><mx:contacttyperank><mx:rank><mx:contacttype><mx:value></mx:contacttype></mx:contacttyperank></mx:ranks><mx:communications/></mx:person></mx:contacts><mx:notes><mx:note><mx:type><mx:value></mx:note><mx:note><mx:type><mx:value></mx:note></mx:notes><mx:addresses><mx:address><mx:primary><mx:addresstype><mx:addressline><mx:addresscontinued><mx:postalcode><mx:city><mx:country><mx:code><mx:name></mx:country></mx:address><mx:address><mx:primary><mx:addresstype><mx:addressline><mx:addresscontinued><mx:postalcode/><mx:city><mx:country><mx:code><mx:name></mx:country></mx:address></mx:addresses><mx:communications><mx:communication><mx:primary><mx:type><mx:value></mx:communication><mx:communication><mx:primary><mx:type><mx:value></mx:communication><mx:communication><mx:primary><mx:type><mx:value></mx:communication></mx:communications><mx:ifisavailable><mx:sortorder></mx:company></mx:members></mx:getmemberdetaillist></soapenv:body></soapenv:envelope>
asked
1 answers
5

If you look at the time as well, it will most likely say 24-01-1995 22:00 in the message, and 25-01-1995 00:00 in the modeler. Notice the two hour time difference, which is also the time difference between current Dutch time and UTC.

If you only select a date in your application, I think it puts the time at 00:00 by default. If you map such a date to XML, it will print the UTC value, which is two hours earlier if you are in the Netherlands (one hour in winter time). Hence it becomes 24-01-1995.

I think a solution is to turn localization off. You can do this in the domain model by double clicking on the DateTime attribute and turning localization off. Carefully consider the consequences of turning off localization though - as the attribute will then always display the same date & time, regardless of which timezone the viewer is in.

answered