Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net Web Services (http://www.velocityreviews.com/forums/f64-asp-net-web-services.html)
-   -   DateTime parameter is adjusted according to timezone (http://www.velocityreviews.com/forums/t782064-datetime-parameter-is-adjusted-according-to-timezone.html)

Borr 10-28-2003 02:03 PM

DateTime parameter is adjusted according to timezone
 
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


Dino Chiesa [Microsoft] 10-28-2003 04:26 PM

Re: DateTime parameter is adjusted according to timezone
 
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



"Borr" <borisgur@excite.com> wrote in message
news:066b01c39d5c$4512d500$a001280a@phx.gbl...
> 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
>





All times are GMT. The time now is 06:07 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.