DateTime parameter is adjusted according to timezone

B

Borr

Hi,

I encountered a following problem : I have a web service,
and one of its methods gets parameter of DateTime type. My
server is found in another timezone, and it turns out that
DateTime that I pass from my client application arrives in
the server being adjusted according to difference of
timezones between client and server ! I am found 6 hours
east from the server - so DateTime that my web method gets
differs from DateTime I passed from the client application
by 6 hours.

Is it possible to cancel this adjust ? I want my web
service to get DateTime parameters "as is".

Best regards

Borr
 
D

Dino Chiesa [Microsoft]

This is a FAQ.

add
[XmlElement(DataType="date")]

to the DateTime field, it will serialize as an XML Schema "date".

Check the archives for more details.

-Dino
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top