I am really upset with the script I made, in which I did comparison of timestamps. I can see that the timestamps are totally different.
- For 2012-10-02 03:06:21, timestamp is: 1349190381
- For 2012-10-02 04:00:50, timestamp is: 1349150450
I can't understand why the second one timestamp is lower than the first, even if the time is bigger. How can I compare two dates?
I am getting these values by strtotime() function.
Clarification: I am using
$current_timestamp = strtotime(date('Y-m-d H:i:s'));
$till_date_timestamp = strtotime($database_object->till_date);
time()withstrtotime($dbobj->till_date)? Still wouldn't cater for timezone differences between PHP and MySQL though.