Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Services > DateTime parameter is adjusted according to timezone

Reply
Thread Tools

DateTime parameter is adjusted according to timezone

 
 
Borr
Guest
Posts: n/a
 
      10-28-2003
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

 
Reply With Quote
 
 
 
 
Dino Chiesa [Microsoft]
Guest
Posts: n/a
 
      10-28-2003
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" <(E-Mail Removed)> wrote in message
news:066b01c39d5c$4512d500$(E-Mail Removed)...
> 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
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Convert stored mysql DateTime of UTC datetime stamp into another timezone Justin Voelker Javascript 2 12-02-2008 08:23 PM
TimeZone calculation on Windows Vista with DateTime::TimeZone Ami Perl Misc 5 09-24-2007 07:27 AM
mx.DateTime to datetime.datetime mp Python 1 07-28-2006 10:57 PM
datetime: .datetime-.datetime = .timedelta, .time-.time=TypeError ? Christos TZOTZIOY Georgiou Python 3 09-13-2003 10:44 AM
RE: datetime: .datetime-.datetime = .timedelta, .time-.time=TypeError ? Tim Peters Python 0 09-09-2003 12:57 AM



Advertisments