[Ajuda] gettime()
#1

Podemos definir:
PHP код:
minutos 60
horas 
60 60
dias 
24 60 60 
gettime trabalha com segundos, portanto a conversгo deve ser em segundos.

Supondo q eu queira converter os segundos em SEGUNDOS, MINUTOS, HORAS e DIAS.

PHP код:

new HORAS 5;
new 
Tempo HORAS 60 60;
Converter(Tempo);
stock Converter(SEGUNDOS)
{
    new 
MINUTOSHORASDIAS;
    
    if(
SEGUNDOS 59)
    {
        
SEGUNDOS 0;
        
MINUTOS += 1;
    }
    if(
MINUTOS 59)
    {
        
MINUTOS 0;
        
HORAS += 1;
    }
    if(
HORAS 23)
    {
        
HORAS 0;
        
DIAS += 1;
    }

Essa tecnica funciona com timers, porйm й falho com gettime.
Alguйm teria uma forma de converter isso sem includes e/ou plugins?
Reply


Messages In This Thread
gettime() - by F1N4L - 28.03.2016, 12:59
Re: gettime() - by PT - 28.03.2016, 13:47
Re: gettime() - by F1N4L - 28.03.2016, 13:54
Re: gettime() - by PT - 28.03.2016, 13:56
Re: gettime() - by F1N4L - 28.03.2016, 14:03
Re: gettime() - by Dayvison_ - 28.03.2016, 14:20
Re: gettime() - by F1N4L - 28.03.2016, 14:37
Re: gettime() - by ViniBorn - 28.03.2016, 17:48
Re: gettime() - by Crayder - 29.03.2016, 17:56
Re: gettime() - by F1N4L - 29.03.2016, 18:00

Forum Jump:


Users browsing this thread: 1 Guest(s)