0
I wonder how do I convert this JS code to PHP:
A = new Date(2020,1,1,0,0,0).getTime();
Although the result will always "be":
1580522400000
I’m doing like this:
$d = DateTime::createFromFormat('Y-n-j', '2020-2-1');
echo $d->getTimestamp();
1580580050
But the result is not matching. Because there are seconds I believe.
How to return the result 1580522400000
with PHP?
Procedural:
date("U", strtotime("2020-01-01"));
– Kazzkiq