How to serialize datetime UTC in WCF to include "Z" at the end?

I have a WCF web service that is using ABAP, which expects a “Z” at the end for UTC time. The WCF service serializes it just fine, with the exception of "Z".

That is, he sends 2014-01-12T19: 43: 13, where I want him to send 2014-01-12T19: 43: 13Z.

I read a few posts related to this, but I hope there is a really elegant solution there. Adding another element / member that returns a string is not ideal.

Alternatively, is there a way to specify the format used so that the client can analyze the date using the specified format?

+3
source share
1 answer

, 500 - , , DateTime DateTimeKind Utc, ( UTC). , DateTimeOffset, DateTime DateTimeKind Utc, .

, DateTime.SpecifyKind(), .

+1

All Articles