Date/Time: April / 08 / 2014 12:17:42pm UTC
Java timestamp: 1396959462222
PHP timestamp: 1396959462
Dividing by 1000 doesn't give exactly the right answer because it will give a double or float value, i.e. 1396959462.222 which is not what we want. We need an integer here like 1396959462. So correct way to convert Java timestamp to PHP timestamp would be by using intval():
$php_timestamp = intval($java_timestamp/1000);
In a real example, in one of my Android apps where I send Java timestamp to a PHP server, I do it as mentioned above. Also, for good security practice, I add a preg_replace() to make sure if someone added hack code in this field, it is removed:
$php_timestamp = intval(preg_replace('/[^0-9]/', '', $java_timestamp)/1000);
java.util.Calendar. That's all you get for this great question.