Ok, some simple time basics for you.
Javascript date class ... when you pass a numeric value to the constructor, this is the number of milliseconds since Unix Epoch (January 1, 1970 00:00:00 GMT)
PHP Unix Epoch (1 1970 00:00:00 GMT).
PHP 1000.
echo strftime('%x', floor(1285565357893/1000));