Timezone offset for a future date.

G

Guest

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.
 
G

Guest

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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top