DateTime parameter is adjusted according to timezone

Ask a Question related to ASP.NET Web Services, Design and Development.

  1. #1

    Default 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

    Borr Guest

  2. Similar Questions and Discussions

    1. #40743 [Opn->Asn]: DateTime ignores the TimeZone object passed to the constructor
      ID: 40743 Updated by: derick@php.net Reported By: ddb at bitxtender dot de -Status: Open +Status: ...
    2. ANNOUNCE: DateTime::TimeZone 0.44
      0.44 2006-04-17 - This release is based on version 2006d of the Olson database. /*===================================================...
    3. ANNOUNCE: DateTime::TimeZone 0.43
      0.43 2006-04-13 - This release is based on version 2006c of the Olson database. - Added a link for AKST9AKDT (to America/Anchorage). ...
    4. DateTime - default Timezone ?
      Hi I can't seem to find a way to set a default timezone for all new DateTime objects. There's a class method for setting the default locale, but...
    5. DateTime being adjusted for time zone differences
      When a client is in one time zone and sends a dataset through our webservice which is in another timezone, it is adjusting the time values on all...
  3. #2

    Default 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
    >

    Dino Chiesa [Microsoft] Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139