Welcome Guest, Not a member yet? Register   Sign In
Oh good god, PLEASE help... PHP date() vs. MySQL FROM_UNIXTIME()
#1

[eluser]Developer13[/eluser]
I am not sure why I'm hung up on this issue, but I am, and it's driving me INSANE!!!

Code:
// The following line outputs 1320040800 (good)
echo strtotime('10/31/2011');

// The following line outputs 10/31/2011 00:00:00 (still good)
echo date('m/d/Y H:i:s', '1320040800');

// The following line outputs 2011-10-30 23:00:00 (what the holy MOTHER@#$%^@#$!??!??)
echo $this->db->query('SELECT FROM_UNIXTIME(1320040800) AS ts')->row()->ts;

Seriously... WTF is going on with this? This is driving me SO insane I'm starting to become normal... and that can't happen!




Theme © iAndrew 2016 - Forum software by © MyBB