sreevidya

In my application all pages need to have pst time. I am using .net 2.0 using C#. Can anyone please tell how to do it.

Re: Visual C# General PST Time using C#

TaylorMichaelL

.NET does not support changing time zones or otherwise doing anything other than working with the current time zone or UTC. If the application is running on a computer in PST then all local times will be displayed in PST. To ensure that any time values you store (in files or databases or whatever) display properly irrelevant of time zone you need to store the values internally in UTC and convert them to local time for display purposes only.

If you want to be able to arbitrarily display times in other time zones then you have to go to unmanaged code. Alternatively there are a couple of libraries that have been created to support time zones. I think http://www.michaelbrumm.com/simpletimezone.html is one of the better alternatives.

Michael Taylor - 5/4/07

http://p3net.mvps.org