I am using Olson TimeZone, and I would like to convert the give datetime based on the TimeZone.
Given Time: Wednesday, September 24, 2008 12:00:00PM
Process... is to convert the Given Time based on the new TimeZone which is "Australia/Adelaide"
Result Should be:
Converted Time: Wednesday, September 24, 2008 1:00:00PM
I am having difficulty doing this process in PublicDomain. Can you share me some of your thougths on how to do this?
This should do what you want:
TzTimeZone perth = TzTimeZone.GetTimeZone("Australia/Perth");
TzTimeZone adelaide = TzTimeZone.GetTimeZone("Australia/Adelaide");
DateTime utc = perth.ToUniversalTime(DateTime.Parse("24-Sep-2008 12:00"));
DateTime inAdelaide = adelaide.ToLocalTime(utc);
There's more info on the CodeProject article: http://www.codeproject.com/KB/dotnet/Using_time_zones_in_NET.aspx