E.g :
static void Main(string[] args)
{
TimeZoneInfo tInfo = TimeZoneInfo.FindSystemTimeZoneById("India Standard Time");
DateTime dTime = DateTime.UtcNow;
DateTime localTime = TimeZoneInfo.ConvertTimeFromUtc(dt, mountain);
}
MSDN link
Finding the Time Zones
TimeZone
TimeZone(.Net 1.0) is to get the CurrentTimeZone(ie local time zone only) . So based on local time zone only we can convert it into necessary DateTime. But in TimeZoneinfo class helps to convert into DateTime based on any TimeZone in the World.
E.g : for TimeZone
E.g : for TimeZone
static void Main(string[] args)
{
TimeZone tZ = TimeZone.CurrentTimeZone;
DateTime dT = DateTime.UtcNow;
}
2 comments:
I am looking for more information on different time zone, from where I can get this information........
Nicole
Cash Online Get Easy cash at your door step
sorry for delay in my reply !!!
have you gone through this link :http://msdn.microsoft.com/en-us/library/system.timezone.aspx
What else you want to know.Ask me i will try my level best
Post a Comment