title: Display Local Date/Time in ASP.NET MVC Razor View
body: <p>I have an ASP.NET MVC app. This app uses Razor as the view engine. I need to display a date/time to the user. My challenge is, the <code>DateTime</code> property on the model is in UTC time. I want to display the time as the user's local time. Currently, I have the following:</p>
  
  <pre><code>&lt;div&gt;
  @if (Model.LastModifiedOnUTC.HasValue) {
    Html.Raw(Model.LastModifiedOnUTC.ToString());
  }
  else {
    &lt;span&gt;This record has not been updated&lt;/span&gt;
  }
  &lt;/div&gt;
  </code></pre>
  
  <p>I want to display the <code>DateTime</code> as something like "Wednesday, February 11, 2015 at 3:27 PM". However, I'm not sure how to do this. When I do the above, an empty string is printed. Which doesn't make any sense to me.</p>
  
  <p>Thank you for any insights</p>