6
I am making a calendar using PHP and JS and worked perfectly between 1902 and 2037, because from 2038 the function to catch the day of the week in PHP returns an incorrect value. Is there a specific reason for this?
Follow the code used in the first image to where it still works and in the second image where it starts to pick up the incorrect value.
In the image where you have the partition "|" on the left side is the day of the month week and on the right side the return of the function below.
function getDayWeek($date){
return date("w", strtotime($date));
}
Related: Timestamp limit January 19, 2038 and Limit to the strtotime function in php
– rray