02.06.2020, 01:48
tentei assim:
e nгo funcionou
PHP Code:
stock ConvertDay(number)
{
number = gettime() + (number * 86400);
new hours = 0, mins = 0, secs = 0, string[100];
hours = floatround(number / 3600);
mins = floatround((number / 60) - (hours * 60));
secs = floatround(number - ((hours * 3600) + (mins * 60)));
new days = 0;
if(hours >= 24)
{
days = floatround((hours/24), floatround_floor);
hours = hours % 24;
}
if(days > 0)
{
if(days == 1)
format(string, 100, "%d dia, %02d:%02d:%02d", days, hours, mins, secs);
else
format(string, 100, "%d dias, %02d:%02d:%02d", days, hours, mins, secs);
}
else if(hours > 0)
{
format(string, 100, "%02d:%02d:%02d", hours, mins, secs);
}
else
{
format(string, 100, "%02d:%02d", mins, secs);
}
return string;
}