Thanks Dhaest ..
But one post says to get timezone info from registry .
To Read the registry for the timezone info is always not possible because IIS user may not have that privilege.
What I am doing currently is there is one hour offset from CST to EST .
So I am adding that offset in CST to convert to EST.
Will this work every time ?
I mean during daylightsaving etc.
I just want to know what is the perfect way to do it .
Main Topics
Browse All Topics





by: DhaestPosted on 2008-04-02 at 00:22:51ID: 21260738
You are going to have to do this yourself. Unfortunately, you can only get the TimeZone instance that corresponds to the current system time zone, not any others (which is foolish in my opinion). You will have to keep a table of timezones as well as the offsets, and then adjust your date time instance accordingly.
47referenc e/msgs/46/ 230600.asp x
A sample code can be found at
http://www.dotnet247.com/2