Raised This Month: $ Target: $400
 0% 

Simple doubt about getting time.


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 05-27-2009 , 10:44   Re: Simple doubt about getting time.
Reply With Quote #5

Quote:
Originally Posted by I need some help View Post
Oh thanks for answering. I tried this before but I haven't seen if it is working...
PHP Code:
    static currenttime[10]
    
get_time("%H"currenttime9)
    static 
secondarytime
    secondarytime 
str_to_num(currenttime)
    if(
secondarytime == 24 || secondarytime 10)
    {
        
g_happy true
    
}
    else
    {
        
g_happy false
    

Do you think that the == 24 is wrong?
Yes it is wrong because the hour value will never be 24 on a 24 hour clock. The hour range goes from 0 to 23 then back to 0.

0 = 12AM
12 = 12pm
23 = 11pm
23:59:59 = the highest time then back to 0:0:0
__________________
Bugsy is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 01:25.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode