title: Convert UTC/GMT time to local time
body: <p>We are developing a C# application for a web-service client. This will run on Windows XP PC's.</p>
  
  <p>One of the fields returned by the web service is a DateTime field. The server returns a field in GMT format i.e. with a "Z" at the end.</p>
  
  <p>However, we found that .NET seems to do some kind of implicit conversion and the time was always 12 hours out.</p>
  
  <p>The following code sample resolves this to some extent in that the 12 hour difference has gone but it makes no allowance for NZ daylight saving.</p>
  
  <pre><code>CultureInfo ci = new CultureInfo("en-NZ");
  string date = "Web service date".ToString("R", ci);
  DateTime convertedDate = DateTime.Parse(date);            
  </code></pre>
  
  <p>As per <a href="http://www.timeanddate.com/worldclock/city.html?n=22" rel="noreferrer">this date site</a>:</p>
  
  <blockquote>
    <p>UTC/GMT Offset </p>
    
    <p>Standard time zone: UTC/GMT +12 hours<br>
    Daylight saving time: +1 hour<br>
    Current time zone offset: <strong>UTC/GMT +13 hours</strong>  </p>
  </blockquote>
  
  <p>How do we adjust for the extra hour? Can this be done programmatically or is this some kind of setting on the PC's?</p>