bool IsNowWithinTimeServer(int f_startHour,
int f_startMinute,
int f_startSecond,
int f_stopHour,
int f_stopMinute,
int f_stopSecond)
{
int f_startTime=3600*f_startHour+60*f_startMinute+f_startSecond;
int f_stopTime=3600*f_stopHour+60*f_stopMinute+f_stopSecond;
datetime f_timeCurrent=TimeCurrent()%86400;
if(f_stopTime<f_startTime)
{
if(f_timeCurrent>=f_startTime || f_timeCurrent<f_stopTime)
return true;
}
else
{
if(f_timeCurrent>=f_startTime && f_timeCurrent<f_stopTime)
return true;
}
return false;
}