We have a MVC project and I need to display a UTC date converted to users local time. In my model I am passing the UTC date and in the view I am trying to do the following:<
All good answers. I did mine like this:
@Html.DisplayFor(m=> m.SomeDate.ToLocalTime() .ToString( CultureInfo.CurrentUICulture.DateTimeFormat.ShortDatePattern + " " + CultureInfo.CurrentUICulture.DateTimeFormat.LongTimePattern))