what's the difference between php time and sql time
- by Ying
Can anyone tell me why the timestamp generated by the php time() function is so different from SQL datetime?
If i do a date('Y-m-d', time()); in php, it gives me the time now, as it should. If I just take the time() portion and do:
$now = time();
//then execute this statement 'SELECT * FROM `reservation` WHERE created_at < $now'
I get…