title: Convert PHP Unix Timestamp to Javascript Timestamp format
body: <p>I'm throwing a unix timestamp from my php to my javascript and I noticed that PHP and Javascript timestamps are different (seconds vs. milliseconds) from the epoch. </p>
  
  <p>What I'm basically doing is to echo the php unixtime then add 3 zeroes (as to simply multiply it by 1000) but I noticed that when I check it, it shows that the time is off by around 4-8 hours.</p>
  
  <p>I am using canvas.js and I need to convert it using the unix timestamp</p>
  
  <p>For example:</p>
  
  <blockquote>
    <p>1434183780</p>
    
    <p>Jun 13 2015 8:23AM</p>
  </blockquote>
  
  <p>I add 3 zeroes</p>
  
  <blockquote>
    <p>1434183780000</p>
  </blockquote>
  
  <pre><code>echo "{ x:".$chartData[$loop]['time']."000 , y:1 }";
  </code></pre>
  
  <p>and what happens is the time becomes:</p>
  
  <blockquote>
    <p>Jun 13 2015 16:23PM</p>
  </blockquote>
  
  <p>Everything is working fine except that the time becomes completely distorted.</p>
  
  <p>How could I make it work without the time being changed once I put it on javascript? I'd prefer to keep it in unixtime as I still use it in that format when I do something else with it.</p>