title: Converting from UTC Time to Local Time
body: <p>I'm working with the Microsoft CRM 2013 SDK for a project (MS CRM Online) that I'm working on. 
  As I've discovered everything that is generated back via the SDK shows in UTC time.</p>
  
  <p>I live in Australia (QLD) and I need to add 10 hours to this to represent the time in my timezone.</p>
  
  <p>I'm pulling a datetime field from the SDK and displaying that datetime into a ASP.NET Repeater. 
  I've wrapped a function around this to convert to the local timezone, however it fails with the following</p>
  
  <p>"No overload for method <code>AddAuQLDToUTC</code> takes two arguments"</p>
  
  <p>The function I'm using in the code behind file</p>
  
  <pre><code>public DateTime AddAuQLDToUTC(DateTime value) 
  {
     DateTime UpdatedDate = new DateTime(value.Year, value.Month, value.Day, value.Hour, value.Minute, value.Second, DateTimeKind.Utc);
     UpdatedDate = UpdatedDate.ToLocalTime();
     return UpdatedDate;
  }    
  </code></pre>
  
  <p>I can wrap this function around System.DateTime.Now and it adds 10 hours to this as it thinks it's UTC as I've add to the function which is what I expected. This proves that the function is working but for some odd reason it fails when wrapped around the repeater like below</p>
  
  <pre><code>&lt;%# AddAuQLDToUTC(DataBinder.Eval(Container.DataItem, "new_InspectionDate"), "{0:D}")%&gt;    
  </code></pre>
  
  <p>Any ideas?</p>