aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBBcan177 <bbcan177@gmail.com>2015-02-19 14:36:37 -0500
committerBBcan177 <bbcan177@gmail.com>2015-02-19 14:36:37 -0500
commitf3bfd33d8ce160b32e413dc530281ea4908cded8 (patch)
tree3dc2575d2b2078a6139340d82a1a79d0bebf1c72
parenteeca7210dbc18f19ff8c267442b5b0642f4525a9 (diff)
downloadpfsense-packages-f3bfd33d8ce160b32e413dc530281ea4908cded8.tar.gz
pfsense-packages-f3bfd33d8ce160b32e413dc530281ea4908cded8.tar.bz2
pfsense-packages-f3bfd33d8ce160b32e413dc530281ea4908cded8.zip
pfBlockerNG - Mods to Schedule converter
As spotted by phil.davis - https://github.com/phil-davis/pfsense-packages/commit/c5b497d4ea370e8f076bd95af5259d547894f2fa
-rw-r--r--config/pfblockerng/pfblockerng.php16
1 files changed, 8 insertions, 8 deletions
diff --git a/config/pfblockerng/pfblockerng.php b/config/pfblockerng/pfblockerng.php
index 0ca3aa7d..1dec1520 100644
--- a/config/pfblockerng/pfblockerng.php
+++ b/config/pfblockerng/pfblockerng.php
@@ -251,7 +251,7 @@ if ($argv[1] == 'gc') {
}
if ($argv[1] == 'cron') {
- $hour = date('H');
+ $hour = date('G');
$dow = date('N');
$pfb['update_cron'] = FALSE;
@@ -270,7 +270,7 @@ if ($argv[1] == 'cron') {
$sch2 = strval($shour);
for ($i=0; $i<11; $i++) {
$shour += 2;
- if ($shour > 24)
+ if ($shour >= 24)
$shour -= 24;
$sch2 .= "," . strval($shour);
}
@@ -280,7 +280,7 @@ if ($argv[1] == 'cron') {
$sch3 = strval($shour);
for ($i=0; $i<7; $i++) {
$shour += 3;
- if ($shour > 24)
+ if ($shour >= 24)
$shour -= 24;
$sch3 .= "," . strval($shour);
}
@@ -290,7 +290,7 @@ if ($argv[1] == 'cron') {
$sch4 = strval($shour);
for ($i=0; $i<5; $i++) {
$shour += 4;
- if ($shour > 24)
+ if ($shour >= 24)
$shour -= 24;
$sch4 .= "," . strval($shour);
}
@@ -300,7 +300,7 @@ if ($argv[1] == 'cron') {
$sch6 = strval($shour);
for ($i=0; $i<3; $i++) {
$shour += 6;
- if ($shour > 24)
+ if ($shour >= 24)
$shour -= 24;
$sch6 .= "," . strval($shour);
}
@@ -310,7 +310,7 @@ if ($argv[1] == 'cron') {
$sch8 = strval($shour);
for ($i=0; $i<2; $i++) {
$shour += 8;
- if ($shour > 24)
+ if ($shour >= 24)
$shour -= 24;
$sch8 .= "," . strval($shour);
}
@@ -319,7 +319,7 @@ if ($argv[1] == 'cron') {
$shour = intval(substr($pfb['hour'], 0, 2));
$sch12 = strval($shour) . ",";
$shour += 12;
- if ($shour > 24)
+ if ($shour >= 24)
$shour -= 24;
$sch12 .= strval($shour);
@@ -1480,4 +1480,4 @@ EOF;
// Unset Arrays
unset ($roptions4, $et_options, $xmlrep);
}
-?> \ No newline at end of file
+?>