all groups > dotnet distributed apps > october 2004 >
You're in the

dotnet distributed apps

group:

DateTime in communications


DateTime in communications Jeremiah Johnson
10/26/2004 1:51:02 PM
dotnet distributed apps:
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.

Re: DateTime in communications Sam Santiago
10/29/2004 2:02:25 PM
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

--
_______________________________
Sam Santiago
ssantiago@n0spam-SoftiTechture.com
http://www.SoftiTechture.com
_______________________________
"Jeremiah Johnson" <JeremiahJohnson@discussions.microsoft.com> wrote in
message news:08B5CE27-5BF4-44F5-9FB5-0BDA60B48381@microsoft.com...
[quoted text, click to view]

AddThis Social Bookmark Button