Solved

Set Timezone in ASP.Net

Posted on 2014-10-27
4
138 Views
Last Modified: 2014-11-04
How do I set the timezone in ASP.Net?  When an individual visits the website I want everyone to see the time, calendar, etc. as it is in a particular timezone.
0
Comment
Question by:Ray Turner
  • 2
4 Comments
 
LVL 1

Expert Comment

by:kayhustle
ID: 40407006
Not sure exactly what you mean.  Are you looking to load an asp .net web page and show time variables in the page in the respective user's time zone?
0
 
LVL 19

Accepted Solution

by:
mrwad99 earned 500 total points
ID: 40407021
You need to use the TimeZoneInfo class to achieve this.  You can enumerate all time zones using the GetSystemTimeZones() method, selecting just the ones you want.

Here is the exact article I used for reference when I had to research doing roughly the same thing:  http://www.dotnetcurry.com/showarticle.aspx?ID=593

HTH
0
 

Author Comment

by:Ray Turner
ID: 40407183
To kayhustle,

I want to all time/date related info (calendar, etc.) to show values based on the current time in a specific timezone.   For example; I want to display the calendar based on the current time/date in New York City.  I want convert the server date/time to the current date/time in New York City.
0
 

Author Closing Comment

by:Ray Turner
ID: 40422958
Thanks!
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

685 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question