title: Compare timestamp with actual time (Java)
body: <p>I've got a time in <code>Timestamp</code> format, it's the expiration time of a product, and I must check if this product is expired.
  How can I do?</p>
  
  <p>I tried in this way, but actually the function always returns TRUE (I can't figure out why)</p>
  
  <pre><code>public boolean isAuctionExpired() {
  
      // expiration_time is setted before, is the expiration date of a product!
  
      Timestamp actualTimeStampDate = null;
  
      try {
          Date actual = new Date();
          actualTimeStampDate = new Timestamp(actual.getTime());
      } catch (Exception e) {
          System.out.println("Exception :" + e);
      }
  
      boolean expired = (expiration_time.getTime() &lt; actualTimeStampDate.getTime());
  
      // Everything seems ok, except the boolean
      System.out.println("product exp: "+expiration_time+", actual: "+actualTimeStampDate+" expired? "+expired);
  
      return expired;
  }
  </code></pre>
  
  <p>I think I'm doing a silly mistake, but i can't see it!</p>