bool IsNowWithinTimeServer(int f_startHour,   // godzina początkowa
                           int f_startMinute, // minuta początkowa
                           int f_startSecond, // sekunda początkowa
                           int f_stopHour,    // godzina końcowa
                           int f_stopMinute,  // minuta końcowa
                           int f_stopSecond)  // sekunda końcowa
  {
//---
   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;
  }