Ok, it's a lot simpler then if I understand correctly. format_time() can do most of the work for you, see
http://cplusplus.com/reference/ctime/strftime/
PHP Code:
#include <amxmodx>
enum _:WeekDays
{
wdSunday,
wdMonday,
wdTuesday,
wdWednesday,
wdThursday,
wdFriday,
wdSaturday
}
enum _:TimeStringPos
{
tspDayOfWeek,
tspSpace,
tspHour
}
public plugin_init()
{
new szOutput[ 5 ] , iDayOfWeek , iHour;
//1624465533 = Wed Jun 23 2021 12:25:33 GMT-0400 (Eastern Daylight Time)
format_time( szOutput , charsmax( szOutput ) , "%w %H" , 1624465533 );
szOutput[ tspSpace ] = EOS;
iDayOfWeek = str_to_num( szOutput[ tspDayOfWeek ] );
iHour = str_to_num( szOutput[ tspHour ] );
if ( ( iDayOfWeek == wdWednesday ) && ( iHour == 12 ) )
{
server_print( "It is Wednesday at 12pm" );
}
}
__________________