date_default_timezone_set('GMT');
$datetime = array(
'year' => date('Y', time()),
'month' => date('m', time()),
'day' => date('d', time()),
'hour' => date('G', time()),
'minute' => date('i', time()),
'second' => date('s', time()),
);
I use this code to separate the time and then pass different segments into a jQuery date/timepicker as needed. Everything seemed fine, but I noticed after midnight GMT it was still selecting the day from my timezone, instead of the new day. The time was still correct for GMT, just not the day. Why the discrepancy?