how can I convert a Java timestamp like this one 1335997853142
to a format that php can read?
1335997853142
should be 02 May 2012 22:30:53
Java gives you a timestamp in milliseconds. PHP uses Unix seconds, so divide by 1000:
print(date("r", 1335997853142/1000)
it is not a java timestamp, it is milliseconds since epoch (1970-01-01 00:00:00 GMT)
Which php supports too except in seconds so the following should work in php:
date('choose your format', javaMilliseconds / 1000);