summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2017-02-22 10:46:58 +0100
committerJo-Philipp Wich <jo@mein.io>2017-02-22 10:47:00 +0100
commit82ccd9e34fe87d31d9909fed754950b2c75bc6ac (patch)
tree95f475d8a141351c097249d74461037e71280dbc
parent1949e0cc6feb17d7c32312040da6fc75ea771035 (diff)
downloadfirewall3-82ccd9e34fe87d31d9909fed754950b2c75bc6ac.tar.gz
firewall3: fix handling of UTC times
The --utc parameter is deprecated and UTC times are the default now. To achieve local time, the --kenreltz param has to be passed instead so invert the logic and swap --utc with --kerneltz. Fixes #548. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
-rw-r--r--iptables.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/iptables.c b/iptables.c
index 2f28781..10bfea5 100644
--- a/iptables.c
+++ b/iptables.c
@@ -1019,8 +1019,8 @@ fw3_ipt_rule_time(struct fw3_ipt_rule *r, struct fw3_time *time)
fw3_ipt_rule_addarg(r, false, "-m", "time");
- if (time->utc)
- fw3_ipt_rule_addarg(r, false, "--utc", NULL);
+ if (!time->utc)
+ fw3_ipt_rule_addarg(r, false, "--kerneltz", NULL);
if (d1)
{