• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 169
  • Last Modified:

Set Timezone in ASP.Net

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.
Ray Turner
Ray Turner
  • 2
1 Solution
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?
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

Ray TurnerSenior ConsultantAuthor Commented:
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.
Ray TurnerSenior ConsultantAuthor Commented:
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now