Good day to all!

I wrote a f-tion, which a certain date comes to the input, and N days are added to it (the number of days is also transferred to the input.) Because Both "Ymd" and timestamp can be passed to the input, I decided to process this option:

if (false !== strtotime($date)) { $date = strtotime($date); } 

If strtotime returns false to input 1580446800 ("2020-01-31"), but if 1359403200 ("2013-01-28") is passed to input, then strtotime returns 38840756380.

What is the sacred idea, which I do not understand?

  • one
    Are you sure that the exact entrance to submit 2020-01-31? works correctly. Maybe where in the other part of the code there are some problems - Alexey Shimansky
  • I confirm the above. Everything works great. - ArchDemon
  • one
    What version of php? What wasps? 64/32? - E_p
  • win server 2008. 64 - kohhop
  • one
    php.net/manual/ru/function.strtotime.php and where it says that strtotime takes the timestamp - Naumov

0