PHP strtotime returning wrong result when looking for a "first saturday" of a given month

21 views Asked by At

Very strange issue here, using PHP date I am suddenly getting the wrong timestamp back.

If you take a look on this strtotime.co.uk example, it should return the timestamp for 1st of February 2020, but it's instead returning the 8th of February which is the second Saturday.

This is an old application I built a while back and I've never noticed a problem before, it has worked with all months up until now. Any idea's what is causing it?

Note that I found a post with an almost identical issue but it was different, as the user had not used the month and year in the passed string.

0

There are 0 answers