title: Getting unix timestamp in milliseconds in PHP5 and Actionscript3
body: <p>In Actionscript, the Unix timestamp in milliseconds is obtainable like this:</p>
  
  <pre><code>public static function getTimeStamp():uint
          {
              var now:Date = new Date();
              return now.getTime();
          }
  </code></pre>
  
  <p>The doc clearly states the following:   </p>
  
  <blockquote>
    <p>getTime():Number Returns the number of
    milliseconds since midnight January 1,
    1970, universal time, for a Date
    object.</p>
  </blockquote>
  
  <p>When I trace it, it returns the following:</p>
  
  <pre><code>824655597
  </code></pre>
  
  <p>So, 824655597 / 1000 / 60 / 60 / 24 / 365 = 0.02 years.
  This is obviously not correct, as it should be around 39 years.</p>
  
  <p>Question #1: What's wrong here?</p>
  
  <p>Now, onto the PHP part: I'm trying to get the timestamp in milliseconds there as well. The <code>microtime()</code> function returns either a string (0.29207800 1246365903) or a float (1246365134.01), depending on the given argument. Because I thought timestamps were easy, I was going to do this myself. But now that I have tried and noticed this float, and combine that with my problems in Actionscript I really have no clue.</p>
  
  <p>Question #2: how should I make it returns the amount of milliseconds in a Unix timestamp?</p>
  
  <p>Timestamps should be so easy, I'm probably missing something.. sorry about that. Thanks in advance.</p>
  
  <p><strong>EDIT1:</strong> Answered the first question by myself. See below.<br>
  <strong>EDIT2:</strong> Answered second question by myself as well. See below. Can't accept answer within 48 hours.</p>