Solved

Set Timezone in ASP.Net

Posted on 2014-10-27
4
130 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
Thanks!
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

One of the pain points with developing AJAX, JavaScript, JQuery, and other client-side behaviors is that JavaScript doesn’t allow for cross domain request for pulling content. For example, JavaScript code on www.johnchapman.name could not pull conte…
In an ASP.NET application, I faced some technical problems. In this article, I list them out and show the solutions that I found.  I hope it will be useful. Problem: After closing a pop-up window, the parent page should be refreshed automaticall…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

772 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

13 Experts available now in Live!

Get 1:1 Help Now