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

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top