if someone login from 10:00 until 11:00 it will be 1 hour login the problem is.. if someone login from 24:00 until 01:30 i got -22.5 hour login it's suppose to be 1.5 hour login anybody can help me with this simple problem (i'm stupid)
try using time("U") as your base for timestamping
It's based off of seconds since the epoch (birth of the net)
so you can do something similar to
$cur_date = date("U"); $show_date = date("Y-m-d", $cur_date);
echo $show_date;
-=Lazz=-