Solved

Set Timezone in ASP.Net

Posted on 2014-10-27
4
132 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

AJAX ModalPopupExtender has a required property "TargetControlID" which may seem to be very confusing to new users. It means the server control that will be extended by the ModalPopup, for instance, if when you click a button, a ModalPopup displays,…
User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
A short film showing how OnPage and Connectwise integration works.

914 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now