468,792 Members | 1,730 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,792 developers. It's quick & easy.

Wierd C# DateTime Parse Error..please help

We have a web service that gets data in xml format. In that Xml data, we
parse few date fields that are in this format

<data datefield="12/26/2008" timefield="16:33:45" ...>
we parse it into a DateTime field using DateTime.Parse( datefield ).Add(
TimeSpan.Parse( timefield ).

For some reason, on 26th of this month from 4pm to 5pm, for certain web
service calls, the date field was calculated incorrectly. Like a 12/26/2008
16:00:00 would be parsed as 12/27/2008 4:00:00. For some reason, the dates
were added by 12 hours automatically.

We have this code in production for a long..never found such an issue. It
happend only during the time mentioned above..and never before..and never
after. More
over, we have 2 servers in production, and this error happend on one of the
servers only. The other server processed the calls just fine.

We have same code deployed on both servers, and both these servers have same
configuration ( OS, patches and all ). Both these servers are identical.

Can you please tell me if you have faced such an issue before. I am not even
sure if its related to web service problem, or server problem, or database
problem.
The code was written in c#. Please let me know if you need more information.
thank you for your help..

Feb 29 '08 #1
1 2841
I've heard a roughly similar story. Can you determine if the caller is in a
different time zone when the call fails? There's a chance that it may be the
issue I've dealt with, basically a date deserialization issue.

--

Regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
The O.W.C. Black Book, 2nd Edition
Exclusively on www.lulu.com/owc $19.99
-------------------------------------------------------

"avnrao" <av****@discussions.microsoft.comwrote in message
news:63**********************************@microsof t.com...
We have a web service that gets data in xml format. In that Xml data, we
parse few date fields that are in this format

<data datefield="12/26/2008" timefield="16:33:45" ...>
we parse it into a DateTime field using DateTime.Parse( datefield ).Add(
TimeSpan.Parse( timefield ).

For some reason, on 26th of this month from 4pm to 5pm, for certain web
service calls, the date field was calculated incorrectly. Like a
12/26/2008
16:00:00 would be parsed as 12/27/2008 4:00:00. For some reason, the dates
were added by 12 hours automatically.

We have this code in production for a long..never found such an issue. It
happend only during the time mentioned above..and never before..and never
after. More
over, we have 2 servers in production, and this error happend on one of
the
servers only. The other server processed the calls just fine.

We have same code deployed on both servers, and both these servers have
same
configuration ( OS, patches and all ). Both these servers are identical.

Can you please tell me if you have faced such an issue before. I am not
even
sure if its related to web service problem, or server problem, or database
problem.
The code was written in c#. Please let me know if you need more
information.
thank you for your help..
Mar 1 '08 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Paul Beckett | last post: by
11 posts views Thread by Cor Ligthert | last post: by
6 posts views Thread by B.N.Prabhu | last post: by
5 posts views Thread by js | last post: by
reply views Thread by =?Utf-8?B?YXZucmFv?= | last post: by
reply views Thread by zhoujie | last post: by
2 posts views Thread by Marin | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.