I am having trouble deciding the best way to handle DateTime objects in
communications between various systems. We have systems deployed in multiple
time zones, so standard SOAP formatting is causing me some trouble.
My scenario is that I treat DateTime objects as an instant in time and leave
it at that (i.e. not relative to any time zone - just some instant in time).
I think that I am treating DateTime correctly, but please let me know if that
was not the intention when it was put into the FCL.
The challenge comes in when I use the standard SOAP formatter when
serializing my objects to send from one system to another. The formatter
imposes a time zone on my DateTime instance, so my DateTime is shifted when
it gets deserialized at a site that is in a different time zone. It appears
that the SOAP formatter wants to force the DateTime class to be something
different in order to fit into the XSD dateTime. Am I understanding that
correctly?
The FCL DateTime and SQL DateTime are both unaware of a time zone and I
think that is appropriate. I don't know about the serialization / formatter
and wonder if maybe I am misunderstanding something. Also, I would like to
solve my problem of shifting DateTime when communicating between time zones.
Can someone give me pointers on that - specifically, I put in a DateTime
instance on one end and get an instance out on the other end that has a
different state?
Thank you.
- jeremiah
Sam Santiago - 29 Oct 2004 22:02 GMT
I haven't dealt with this issue since I haven't had to cross timezones yet
with a webservice, but a quick search revealed this two links that might be
useful in providing you some ideas on how to deal with it:
http://support.microsoft.com/default.aspx?scid=kb;en-us;842545
http://www.dotnet247.com/247reference/msgs/25/125458.aspx
Good luck.
Thanks,
Sam

Signature
_______________________________
Sam Santiago
ssantiago@n0spam-SoftiTechture.com
http://www.SoftiTechture.com
_______________________________
> I am having trouble deciding the best way to handle DateTime objects in
> communications between various systems. We have systems deployed in multiple
[quoted text clipped - 24 lines]
>
> - jeremiah