I can convert an int to days, hours, minutes and seconds, but what is the calculation to reverse that and convert back to seconds?
Here's what I have for the first conversion:
<?php
$seconds = 12345;
$days = floor ($seconds / 60 / 60 / 24);
$hours = floor ($seconds / 60 / 60) % 24;
$minutes = floor ($seconds / 60) % 60;
$seconds = $seconds % 60;
?>