title: SimpleDateFormat change date while converting it to String
body: <p>In my app, I am using <code>SimpleDateFormat</code> to convert the Date object to a string. But sometime when I change the time zone one by one to test whether the date I enter is the same as the date converted to a string, I found that it shows a different date. For example, suppose I have <code>Thu Mar 15 00:00:00 GMT+08:00 2012</code> in my Date object, Now when I convert it to a string using SimpleDateFormat it works fine, but when I change the time zone one by one and check whether the date converted to string is same as it stored in Date object then in some cases it shows as <code>14-Mar-2012</code> instead of showing <code>15-Mar-2012</code>. Why this happen? Can anyone please suggest me how to solve this out?</p>
  <p>Code I have used:</p>
  <pre><code>SimpleDateFormat m_sdFormatter = new SimpleDateFormat(&quot;dd-MMM-yyyy&quot;);
  String selected_date = m_sdFormatter.format(btnSelectedDt.getTime());
  </code></pre>