On some occasions data() is converting my dates incorrectly.
My date formats look like so:
Fri Oct 25 15:00:00 EDT 2011
The date string comes from an external source, so I'm unable to change the format.
// output incorrect - Fri, 28 Oct 2011 15:00:00 -0400
date("r", strtotime("Fri Oct 25 15:00:00 EDT 2011"))
// output correct - Fri, 21 Oct 2011 15:00:00 -0400
date("r", strtotime("Fri Oct 21 15:00:00 EDT 2011"))
I can't figure out why just changing the day makes it fail to convert.
My end goal is to create a DateTime object but it suffers from the same problem.
// output - Fri Oct 28 19:00:00 EDT 2011
DateTime("Fri Oct 22 19:00:00 EDT 2011")