Thread: [Solved] Get remain time problem
View Single Post
loiraolhosazul
Member
Join Date: May 2020
Old 08-21-2021 , 21:38   Re: Get remain time problem
Reply With Quote #9

Quote:
Originally Posted by Bugsy View Post
Try this:
PHP Code:
public Test() 
{
    new 
iActionHour 22;
    
    new 
iYear iMonth iDay iHour iMinute iSecond;
    new 
iHours iMinutes iSeconds;

    
UnixToTimeget_systime() , iYear iMonth iDay iHour iMinute iSecond UT_TIMEZONE_SERVER );
    
    if ( 
iHour iActionHour )
    {
        
iHours = ( iActionHour iHour ) - 1
    }
    else
    {
        
iHours = ( iActionHour + ( 24 iActionHour ) ) - 1;
    }
    
    
iMinutes 60 iMinute;
    
iSeconds 60 iSecond;
    
    
server_print"%d hour%s, %d minute%s, %d second%s" iHours iHours == "" "s" iMinutes iMinutes == "" "s"iSeconds iSeconds == "" "s" );

worked, thank you! close
loiraolhosazul is offline