DateTime parameter is adjusted according to timezone

Discussion in 'ASP .Net Web Services' started by Borr, Oct 28, 2003.

  1. Borr

    Borr Guest

    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
    Borr, Oct 28, 2003
    #1
    1. Advertising

  2. 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" <> wrote in message
    news:066b01c39d5c$4512d500$...
    > 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], Oct 28, 2003
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Christos TZOTZIOY Georgiou
    Replies:
    3
    Views:
    704
    Christos TZOTZIOY Georgiou
    Sep 13, 2003
  2. Tim Peters
    Replies:
    0
    Views:
    532
    Tim Peters
    Sep 9, 2003
  3. David Joseph Bonnici
    Replies:
    1
    Views:
    211
    Gunnar Hjalmarsson
    May 15, 2005
  4. Ami
    Replies:
    5
    Views:
    279
  5. Justin Voelker
    Replies:
    2
    Views:
    263
    Dr J R Stockton
    Dec 2, 2008
Loading...

Share This Page