How to convert php timestamp to java: First create a script sample file; then use the "javaTimeStamp=phpTimeStamp*1000" method to convert php timestamp to java timestamp.
Recommended: "PHP Video Tutorial"
java timestamp and php timestamp conversion
java timestamp is 13 digits, for example: javaTimeStamp=1475309160000
java ->php, divide by 1000, you will get 10 digits php timestamp
phpTimeStamp=javaTimeStamp/1000
php timestamp is 10 digits, for example :phpTimeStamp=1475309160
php -> java, multiply by 1000, you will get the 13-digit java timestamp
javaTimeStamp=phpTimeStamp*1000
The above is the detailed content of How to convert php timestamp to java. For more information, please follow other related articles on the PHP Chinese website!