title: Why is SimpleDateFormat not parsing my date correctly?
body: <p>I'm trying to avoid <a href="https://stackoverflow.com/questions/4113859/strange-date-and-time-parsing-problem-with-simpledateformat">reinstalling Eclipse to solve this</a>, so I hope someone can help with this date-parsing problem.  Here's what I do.</p>
  
  <pre><code>DateFormat dateFormat; 
  </code></pre>
  
  <p>That's a variable in my class.  I set it to the following.</p>
  
  <pre><code>dateFormat = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
  // Example input: 2010-11-07 16:00:00
  </code></pre>
  
  <p>When another method is called, I create a new java.sql.Date instance using strings that are passed in.   For the sake of clarity, here's a shortened version.</p>
  
  <pre><code>public void aMethod (String activateTime, String expireTime) {
      Date example = new Date(dateFormat.parse(activateTime).getTime());
      Date example2 = new Date(dateFormat.parse(expireTime).getTime());
  }
  </code></pre>
  
  <p>When I look at the strings resulting from these operations (just adding .toString() to instantiations above), I get output like the following</p>
  
  <pre><code>2010-10-30
  2010-11-29
  </code></pre>
  
  <p>... instead of the input strings, which are reported to be...</p>
  
  <pre><code>2010-10-30 17:00:00
  2010-11-29 16:00:00
  </code></pre>
  
  <p>Anyone know why it doesn't give me a date in the pattern I specified?</p>