title: How to convert “YYYY-MM-DD hh:mm:ss” to UNIX timestamp in Java?
body: <p>Or, maybe you know a better approach how to solve this problem. I get dates in the format of "YYYY—MM-DD HH:MM:SS" and need to calculate time difference between now then in approximate increments: 1 minute ago, 1 hour ago, etc.</p>
  
  <p>Any pointers much appreciated :)</p>