"why don't php and javascript's timestamps match?" Answer’s

0

JavaScript uses milliseconds as a timestamp, whereas PHP uses seconds. As a result, you get very different dates, as it is off by a factor 1000.

So remove three zeroes at the PHP side:

echo date('Y-m-d H:i:s', 1313690400);
Wednesday, March 31, 2021
 
MoarCodePlz
answered 11 Months ago
Only authorized users can answer the question. Please sign in first, or register a free account.
Not the answer you're looking for? Browse other questions tagged :