title: Java SimpleDateFormat Unparseable date
body: <p>I'm having this awkward problem with simple date format.
  I'm parsing some strings from a file and want to convert them in Date object.
  Strings are like </p>
  
  <pre><code>"2012-04-19 18:33:10"
  </code></pre>
  
  <p>so my code is:</p>
  
  <pre><code>SimpleDateFormat sdf = new SimpleDateFormat("YYYY-MM-DD hh:mm:ss");
  sdf.setLenient(false);
  Date d1 = sdf.parse("2012-04-19 18:33:10");
  </code></pre>
  
  <p>which gives me </p>
  
  <pre><code>java.text.ParseException: Unparseable date: "2012-04-19 18:33:10"
  </code></pre>
  
  <p>Without the</p>
  
  <pre><code>setLenient(false)
  </code></pre>
  
  <p>the output date is </p>
  
  <pre><code>Sun Jan 01 18:33:10 CET 2012
  </code></pre>
  
  <p>which is very incorrect.</p>
  
  <p>I really don't understand why.</p>
  
  <p>Any help would be appreciated.</p>
  
  <p>Thanks in advance</p>