title: Get wrong Date from parsing time string by SimpleDateFormat. (1 hour offset) [Android/Java]
body: <p>First of all, I would like to make clear that it is not daylight saving issue.</p>
  
  <p>Second, after trying hard, it seems related to the locale used in SimpleDateFormat.</p>
  
  <p>Third, it seems only to occur with PST/PDT timezone. UTC is ok.</p>
  
  <hr>
  
  <p>Here is the test code.</p>
  
  <p>Use US and ENGLISH locale to parse the same Date.</p>
  
  <pre><code>    try {
          Date date = new Date();
          SimpleDateFormat US_format = new SimpleDateFormat("MMM d HH:mm:ss z", Locale.US);
          SimpleDateFormat EN_format = new SimpleDateFormat("MMM d HH:mm:ss z", Locale.ENGLISH);
  
          US_format.setTimeZone(TimeZone.getTimeZone("America/Los_Angeles")); //Set PST Timezone
          String US_str =  US_format.format(date);
          Log.i("DEBUG", "US_str: " + US_str);
          Log.i("DEBUG", "US_str: " + US_format.format(US_format.parse(US_str)));
  
          EN_format.setTimeZone(TimeZone.getTimeZone("America/Los_Angeles")); //Set PST Timezone
          String EN_str =  EN_format.format(date);
          Log.i("DEBUG", "EN_str: " + EN_str);
          Log.i("DEBUG", "EN_str: " + EN_format.format(EN_format.parse(EN_str)));
      } catch (ParseException e) {
          Log.i("DEBUG", "Parsing Error");
      }
  </code></pre>
  
  <p>The result is</p>
  
  <blockquote>
    <p>02-26 19:42:42.863 I/DEBUG﹕ US_str: Feb 26 19:42:42 PST</p>
    
    <p>02-26 19:42:42.865 I/DEBUG﹕ US_str: Feb 26 <strong><em>18:42:42</em></strong> PST</p>
    
    <p>02-26 19:42:42.865 I/DEBUG﹕ EN_str: Feb 26 19:42:42 PST</p>
    
    <p>02-26 19:42:42.866 I/DEBUG﹕ EN_str: Feb 26 19:42:42 PST</p>
  </blockquote>
  
  <p>Is it a bug?
  Why is there a one-hour difference in Locate.US?</p>
  
  <p>====================================</p>
  
  <p>Update:
  It seems only to happen on Android 5.0 device.
  Other environments seems ok.</p>
  
  <p>Posted a bug on Android issue tracker. (Issue <a href="https://code.google.com/p/android/issues/detail?id=158265&amp;colspec=ID%20Type%20Status%20Owner%20Summary%20Stars" rel="nofollow">158265</a>)</p>