title: Why does SimpleDateFormat.parse().getTime() return an incorrect (negative) value?
body: <p>I have a time-stamp of type String and I am trying to convert it to a double (and find the result in seconds) and here is what I have done:</p>
  
  <pre><code>double mytimeStamp = 0;
  
  String timeStamp = new SimpleDateFormat(" mm ss S").format(new Date( ));   
  
  SimpleDateFormat dateFormat = new SimpleDateFormat(" mm ss S");
  
  try {
    mytimeStamp = ((double)dateFormat.parse(timeStamp).getTime())/1000;
  } catch (ParseException e1) {
    // TODO Auto-generated catch block
    e1.printStackTrace();
  }
  
  System.out.println("timeStamp is: "+ mytimeStamp);
  </code></pre>
  
  <p>The problem is that I obtain a value such as <code>-2722.515</code> and I don't know why.</p>
  
  <p>Why is it negative?</p>
  
  <p>Is there something wrong with the code?</p>
  
  <p>When I convert this time-stamp to <code>mm ss S</code> does not match with the real time and this seems to be another problem!</p>