I have the following ungainly code to turn a date string into another date string.
//$invDate starts as a date string in format dd/mm/yyyy
$dateArray = explode('/', $invDate);
$invDate = $dateArray[0] .' '. date("F",mktime (1,1,1,$dateArray[1])) .' '. $dateArray[2];
I'm not particularly proud of it, but it produces an unambiguous date in a country where both US and UK methods of doing dates can produce confusion.
It's worked fine for ages, and then suddenly today it has started turning
01/06/2012
into
1 July 2012
I've looked at how mktime behaves, and can't see any reason why mktime (1,1,1,6)
should ever produce a date in July. Any ideas?