title: javascript unix timestamp older than x
body: <p>I need to clarify an assumpton I have made with unix timestamps before I go and make something that messes my application flow, I can't visualise the numbers at all I don't wan't to do the opposite..</p>
  
  <p>There is a question here about this with php but not one that I can find with javascript</p>
  
  <p><a href="https://stackoverflow.com/questions/12403189/how-to-check-if-a-timestamp-is-an-hour-old">How to check if a timestamp is an hour old?</a></p>
  
  <p>My array of arrays will be built by my application like this</p>
  
  <pre><code>var list=[
  ['name0',1424300986716,1424301040055,1424301049633],
  ['name1',1424300998116,1424301019372,1424301059418],
  ['name2',1424301009043,1424301030315,1424301059418]
  //...
  ];
  </code></pre>
  
  <p>I would like to determin if the second column of timestamps has one which is over 24 hours <del>long</del> old (none of these are I just made them now), I need it to get the first one that it comes across not the oldest and return the array index</p>
  
  <p>if I run this test I get more confused as I am in italy I think some thing is screewy with the timezones or clock or I have the wrong idea</p>
  
  <pre><code>var now=(+new Date());
  
  var back24hrs=new Date((now-86400));
  
  console.log(now,back24hrs);
  
  // 1424303535659 Thu Feb 19 2015 00:50:49 GMT+0100 (W. Europe Standard Time)
  </code></pre>
  
  <p>It's thursday now that is now not back 24 hrs! I can't see how I am wrong..</p>
  
  <p>basicly my assumption is (current time - 24hrs) I think that part is correct but also less than or greater than the saved time?</p>
  
  <p>I was thinking of doing something like this:</p>
  
  <pre><code>function olderthan24hrs(column){
      var hrs24=86400;
      var i=list.length;
      while(i--){
          if((+new Date()-hrs24)&gt;list[i][column]){break;}
          }
      return i;
      }
  
  var choice=olderthan24hrs(2);
  </code></pre>
  
  <p>But I'm really not sure if that would be at all correct</p>