I have a time array like
[2023,1,3,17,0,0]
When I use Date.UTC in javascript, It produces the right result
My code
const utcDate1 = new Date(Date.UTC(2023, 1, 3, 17,0,0));
console.log(utcDate1.toUTCString());
result:
"Fri, 03 Feb 2023 17:00:00 GMT"
How to get the same result in php like javascript?
I tried with mktime in php but the return result is not what i expected. It differs by one month.
my php code:
echo date("d-m-Y H:i:s", mktime(17,0,0,1,3,2023));
result by PHP :
03-01-2023 17:00:00