title: How to create JWT exp style date in Javascript
body: <p>I'll like to create JWT exp claim style date in Javascript. My app jwt claim returns an expiry date of 1424984529. I'm doing a test for token expiration using this:</p>
  
  <pre><code>if(jwt.exp &lt; Date.now())) {
    // do something
  }
  </code></pre>
  
  <p>As at writing Date.now() gives me 1424941329632 and jwt.exp gives 1424984529. Obviously, my test will always return true.</p>
  
  <p>So my question is, how do I mimic jwt-style exp date in Javascript? </p>