Convert Current Time to Indian Standard Time.

Posted by Gopesh9 under C# category on | Points: 40 | Views : 1323
Here is the code where you can change the Current Time to Indian Standard Time by the use of Lambda Expression.

DateTime time = TimeZoneInfo.ConvertTime(DateTime.Now, TimeZoneInfo.FindSystemTimeZoneById(TimeZoneInfo.GetSystemTimeZones().Where(time => time.StandardName.Contains("India Standard Time")).First().Id));
Console.WriteLine("Indian Standard Time is :" + time)

Comments or Responses

Login to post response