I would like to convert a variable $uptime which is seconds, into days, hours, minutes and seconds.
$uptime
Example:
gmdate("d H:i:s",1640467);
Result will be 19 23:41:07. When it is just one second more than normal day, it is increasing the day value for 1 day. This is why it show 19. You can explode the result for your needs and fix this.