I have recently moved to a new managed server running PHP 5.4
This is giving me inconsistent date conversion when applied to a Date field value in the mysql table.
I had been using this formula before in PHP 5.3 and had no problems
$values["DateField"] is pulled from the field "DateField" in the table where dates are in this format -- 2014-04-17 the field type is DATE
the conversion that is supposed to happen is to: 17-04-2014
But I am finding intermittent cases where the field reads a date value in July such as -- 2014-07-25
But the php Email script where date("d-m-Y",strtotime($values["DateField"])) is used to convert that date to -- 25-07-2014
comes back with the value 25-05-2014 ----- the DAY is correct, the Year is correct but the MONTH is May, the current month
I see that the official PHP forum changelog shows bugs for date time functions that are being reported
Has someone here had experience with PHP 5.4 specifically regarding doing such a string conversion correctly?
I have tried such things as -- new DateTime($values["TimeField"]))->format('d/m/Y');
But that fails because it totally injects TODAY's date no matter what $values["TimeField"] may be from the database table.
Has a genius here a working formula?