I have an interesting issue. I have a function for converting mm/dd/yyyy to database input format of yyyy-mm-dd (see attached code).
However, it only "half" works. For example, if I enter 04/15/2010, it comes out as 2011-03-04. Yet if I enter 04/01/2010, it comes out as expected, 2010-04-01. So, where the heck did I go wrong to yield the inconsistencies?
list($d, $m, $y) = explode('/', $date);
$mk=mktime(0, 0, 0, $m, $d, $y);