title: How to convert DateTime in Specific timezone?
body: <p>I find it hard to understand how UTC works.  </p>
  
  <p>I have to do the following but I'm still confused if I'd get the right result.  </p>
  
  <p>Objectives:  </p>
  
  <ol>
  <li>Ensure all saved dates in Database are in UTC format  </li>
  <li>Update DefaultTimezone is in Manila time  </li>
  <li>Ensure all returned dates are in Manila Time  </li>
  </ol>
  
  <p>So the code is:  </p>
  
  <pre><code>public ConvertDate(DateTime? dateTime)
  {
      if (dateTime != null)
      {
          Value = (DateTime)dateTime;
          TimeZone = GetFromConfig.DefaultTimeZone(); 
      }
  }
  
  
  public ConvertDate(DateTime? dateTime, int GMTTimeZone)
  {
      if (dateTime != null)
      {
          Value = (DateTime)dateTime;
          TimeZone = GMTTimeZone;
      }
  }
  
  
  public int TimeZone
  {
      get { return m_TimeZone; }
      set { m_TimeZone = value; }
  }
  
  
  DateTime m_Value;
  public DateTime Value
  {
      get { return m_Value; }
      set 
      { 
          m_Value = value;
          DateTime converted = m_Value.ToUniversalTime().ToLocalTime();
      }
  }
  </code></pre>
  
  <p>Sample usage:  </p>
  
  <pre><code>DateTime SampleInputFromUser = new DateTime(2012, 1, 22);
  ConvertDate newConversion = new ConvertDate(SampleInputFromUser, 21);
  DateTime answer = newConversion.Value;
  </code></pre>
  
  <p>Now I get confused for 'TimeZone'. I don't know how to use it to get the objectives.<br>
  Hope you understand my question and have the idea to get the objectives done.  </p>
  
  <p><strong>Edit</strong>  </p>
  
  <p>According to @raveturned answer, I get this following code:   </p>
  
  <p>***Added in ConvertDate method</p>
  
  <pre><code>TimeZoneInfo timeInfo = TimeZoneInfo.FindSystemTimeZoneById(GetFromConfig.ManilaTimeZoneKey());
  ManilaTime = TimeZoneInfo.ConvertTime(dateTime.Value, TimeZoneInfo.Local, timeInfo).ToUniversalTime();
  </code></pre>
  
  <p>**New Property  </p>
  
  <pre><code>DateTime _ManilaTime;
  public DateTime ManilaTime
  {
      get { return _ManilaTime; }
      set { _ManilaTime = value; }
  }
  </code></pre>