Timezone offset for a future date.

Discussion in 'ASP .Net' started by =?Utf-8?B?Sm9ubnk=?=, Oct 18, 2007.

  1. I have an ASP.NET 2.0 C# web application that is contacting an Exchange
    server using WEBDAV. It allows the users to look up appointments for a
    future date. The problem I have is determining the correct client time zone.
    Note that Exchange stores everything in UTC time.

    I am able currently able to use javascript to ask the client what time zone
    they are in, but this is only for the "today" (the current day) and not for a
    day in the future. To my knowledge there is no client side call that can be
    preformed to determine the timezone offset for a future date.

    So even if I pass the timezone offset from the client to the server, there
    is no Timezone manager class to my knowledge that will take that offset and
    translate it into a Timezone object of which I could then use to look up the
    offset for a future date.

    Please let me know if a solution for this exists. The only thing I can
    think of is writing a huge TimezoneManager class to handle this issue, I hope
    a better workournd exists.
     
    =?Utf-8?B?Sm9ubnk=?=, Oct 18, 2007
    #1
    1. Advertising

  2. =?Utf-8?B?Sm9ubnk=?=

    Kelly Herald Guest

    Check out this link on CodeProject

    http://www.codeproject.com/csharp/timezoneconversions.asp



    "Jonny" <> wrote in message
    news:...
    >I have an ASP.NET 2.0 C# web application that is contacting an Exchange
    > server using WEBDAV. It allows the users to look up appointments for a
    > future date. The problem I have is determining the correct client time
    > zone.
    > Note that Exchange stores everything in UTC time.
    >
    > I am able currently able to use javascript to ask the client what time
    > zone
    > they are in, but this is only for the "today" (the current day) and not
    > for a
    > day in the future. To my knowledge there is no client side call that can
    > be
    > preformed to determine the timezone offset for a future date.
    >
    > So even if I pass the timezone offset from the client to the server, there
    > is no Timezone manager class to my knowledge that will take that offset
    > and
    > translate it into a Timezone object of which I could then use to look up
    > the
    > offset for a future date.
    >
    > Please let me know if a solution for this exists. The only thing I can
    > think of is writing a huge TimezoneManager class to handle this issue, I
    > hope
    > a better workournd exists.
     
    Kelly Herald, Oct 19, 2007
    #2
    1. Advertising

  3. I thought about it more and what I want is not possible. The problem is that
    the client can not tell you what timezone it is in. All it can do is give
    you an offset. At first you might think this is enough to tell what timezone
    you are in, but it isn't. The problem is that there is almost always more
    than one timezone for each offset. This by itself would not be a problem if
    all of the timezones in each offset shared the same rules, but they don't.
    They may have different dates for when DST occurs, or it may not occur at
    all. So unless there was a way for the browser to pass the timezone (not the
    offset) from the operating system, this can not be done.

    I thought it must have been possible because Outlook Web Access (OWA) seems
    to get it right. Then after speaking to an email administrator, I found out
    that OWA stores each users timezone in the Exchange database, which is kinda
    cheating.

    The code project aritcle mentioned gives access to the system timezone, but
    this is for the server not the client, which is somewhat worthless in a web
    application. The article is useful though because it can provide a list of
    timezones so you can have your end user select one.

    It's too bad this information has to be presented to the user, when it is
    clearly available on their computer.

    Thanks for your help.


    "Kelly Herald" wrote:

    > Check out this link on CodeProject
    >
    > http://www.codeproject.com/csharp/timezoneconversions.asp
    >
    >
    >
    > "Jonny" <> wrote in message
    > news:...
    > >I have an ASP.NET 2.0 C# web application that is contacting an Exchange
    > > server using WEBDAV. It allows the users to look up appointments for a
    > > future date. The problem I have is determining the correct client time
    > > zone.
    > > Note that Exchange stores everything in UTC time.
    > >
    > > I am able currently able to use javascript to ask the client what time
    > > zone
    > > they are in, but this is only for the "today" (the current day) and not
    > > for a
    > > day in the future. To my knowledge there is no client side call that can
    > > be
    > > preformed to determine the timezone offset for a future date.
    > >
    > > So even if I pass the timezone offset from the client to the server, there
    > > is no Timezone manager class to my knowledge that will take that offset
    > > and
    > > translate it into a Timezone object of which I could then use to look up
    > > the
    > > offset for a future date.
    > >
    > > Please let me know if a solution for this exists. The only thing I can
    > > think of is writing a huge TimezoneManager class to handle this issue, I
    > > hope
    > > a better workournd exists.

    >
    >
    >
     
    =?Utf-8?B?Sm9ubnk=?=, Oct 23, 2007
    #3
    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. Lance Riedel

    Translated Offset to Source Offset

    Lance Riedel, Oct 14, 2003, in forum: XML
    Replies:
    2
    Views:
    502
    Patrick TJ McPhee
    Oct 15, 2003
  2. Chad

    User Timezone offset.

    Chad, Jun 8, 2007, in forum: ASP .Net
    Replies:
    1
    Views:
    379
    PlatinumBay
    Jun 9, 2007
  3. Sanjay
    Replies:
    2
    Views:
    422
    Sanjay
    Jul 18, 2007
  4. Leendert Bottelberghs

    update: timezone offset calc and date formatting

    Leendert Bottelberghs, Apr 8, 2005, in forum: Perl Misc
    Replies:
    0
    Views:
    203
    Leendert Bottelberghs
    Apr 8, 2005
  5. Roy Smith
    Replies:
    4
    Views:
    276
    Roy Smith
    Jan 27, 2013
Loading...

Share This Page