I'm using a simple way to get a timer from the last action until now, with a cooldown to avoid exploit over a system I am programming.
I am using this formula:
$last_blood = $userRow['lastblood'];
$now_blood = time();
$cooldown_blood = 10800;
$timer_blood = $now_blood - $last_blood;
$next_blood = $cooldown_blood - $timer_blood;
$hours_blood = date("H:i:s", $next_blood);
The thing is that with 60M frame this cooldown system works like a charm, but this time I set it up to 10800 seconds (3 hours).
The $hours_blood
keeps stating that I need to wait 1 more hour than the expected.
Results: