<?php
function decimal_to_time($decimal) {
$hours = floor($decimal / 60);
$minutes = floor($decimal % 60);
$seconds = $decimal - (int)$decimal;
$seconds = round($seconds * 60);
return str_pad($hours, 2, "0", STR_PAD_LEFT) . ":" . str_pad($minutes, 2, "0", STR_PAD_LEFT) . ":" . str_pad($seconds, 2, "0", STR_PAD_LEFT);
}
echo decimal_to_time(1103);
- Output for 5.5.24 - 5.5.35, 5.6.8 - 5.6.28, 7.0.0 - 7.0.20, 7.1.0 - 7.1.20, 7.2.29 - 7.2.33, 7.3.16 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.29, 8.2.0 - 8.2.23, 8.3.0 - 8.3.11
- 18:23:00
preferences:
85.55 ms | 408 KiB | 5 Q