datatime to local time in c# code example
Example 1: c# conver date utc to cst
DateTime currentTime = TimeZoneInfo.ConvertTime(DateTime.Now, TimeZoneInfo.FindSystemTimeZoneById("Central Standard Time"));
Example 2: convert datetime to user timezone c#
var utcTime = DateTime.UtcNow; // utc
var localTime = utcTime.ToLocalTime(); // users local time