I have a SaaS system with several clients around the world. However, each customer is in only one time zone. Communication between the client and my central server is done using WCF.
Now there is the planning aspect for the system, and the time should be stored in terms of local time. But I find that when I send a class marked with a DataContract attribute that has a DataMember property of type DateTime via the WCF interface, the system becomes too smart by half, and this translates the time into server time. OTOH, if I pass the DateTime value directly through the WCF interface as a parameter, time comes verbatim, like client time.
It causes me a lot of headaches. Is there something I can set up somewhere so that the WCF service does not translate time to local (server) time?
EDIT: Well, I donβt know what I did, but I was working on some related things, and the problem seemed to just go away! Therefore, I would like to try my answers, but in fact I can not reproduce my problems now ... If I had time for academic exercises, I would look deeper, but right now, if it did not break ...
source share