19#define ACL_SUNDAY 0x01
20#define ACL_MONDAY 0x02
21#define ACL_TUESDAY 0x04
22#define ACL_WEDNESDAY 0x08
23#define ACL_THURSDAY 0x10
24#define ACL_FRIDAY 0x20
25#define ACL_SATURDAY 0x40
26#define ACL_ALLWEEK 0x7F
27#define ACL_WEEKDAYS 0x3E
40 static time_t last_when = 0;
45 if (when != last_when) {
47 memcpy(&tm, localtime(&when),
sizeof(
struct tm));
50 t = (time_t) (tm.tm_hour * 60 + tm.tm_min);
54 debugs(28, 3,
"aclMatchTime: checking " << t <<
" in " <<
55 data->
start <<
"-" << data->
stop <<
", weekbits=" <<
73 while (t !=
nullptr) {
75 s.
Printf(
"%c%c%c%c%c%c%c %02d:%02d-%02d:%02d",
95 long parsed_weekbits = 0;
97 for (Tail = &
next; *Tail; Tail = &((*Tail)->next));
103 if (*t < '0' || *t >
'9') {
155 if ((sscanf(t,
"%d:%d-%d:%d", &h1, &m1, &h2, &m2) < 4) || (!((h1 >= 0 && h1 < 24) && ((h2 >= 0 && h2 < 24) || (h2 == 24 && m2 == 0)) && (m1 >= 0 && m1 < 60) && (m2 >= 0 && m2 < 60)))) {
165 if ((parsed_weekbits == 0) && (
start == 0) && (
stop == 0))
170 q->
start = h1 * 60 + m1;
172 q->
stop = h2 * 60 + m2;
198 if (parsed_weekbits) {
202 q->
start = 0 * 60 + 0;
204 q->
stop = 24 * 60 + 0;
char config_input_line[BUFSIZ]
const char * cfg_filename
SBufList dump() const override
bool match(time_t) override
bool empty() const override
static char * strtokFile()
SBuf & Printf(const char *fmt,...) PRINTF_FORMAT_ARG2
#define debugs(SECTION, LEVEL, CONTENT)
std::list< SBuf > SBufList