Help: I have a server which is having time in GMT-07.00 hours. My local time is GMT+05.30 hours. I need to get current date and time from server and convert this date and time i
DateTime serverTime = DateTime.Now;
DateTime utcTime = serverTime.ToUniversalTime();
// convert it to Utc using timezone setting of server computer
TimeZoneInfo tzi = TimeZoneInfo.FindSystemTimeZoneById("India Standard Time");
DateTime localTime = TimeZoneInfo.ConvertTimeFromUtc(utcTime, tzi);
// convert from utc to local