Thread: [INC] Unix Time
View Single Post
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 08-24-2012 , 19:49   Re: [INC] Unix Time
Reply With Quote #12

Refer to this site to see the time-zone offsets. I used 01/01/2000 at 00:00:00 for easy math.

This will print out time for all time-zone offsets
PHP Code:
Test()
{
    new 
iTime iYear iMonth iDay iHour iMinute iSecond;

    for ( new 
TimeZones:tzZone UT_TIMEZONE_MIT tzZone TimeZones tzZone++ )
    {
        
iTime TimeToUnix2000 tzZone );
        
UnixToTimeiTime iYear iMonth iDay iHour iMinute iSecond );
        
        
server_print"%02d/%02d/%02d %02d:%02d:%02d" iMonth iDay iYear iHour iMinute iSecond );
    }

Output UT_TIMEZONE_MIT -> UT_TIMEZONE_NZDT, respectively
Spoiler

Time-zone offsets from the above link
Spoiler
__________________

Last edited by Bugsy; 08-24-2012 at 19:52.
Bugsy is offline