From 82ccd9e34fe87d31d9909fed754950b2c75bc6ac Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Wed, 22 Feb 2017 10:46:58 +0100 Subject: [PATCH] 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 --- iptables.c | 4 ++-- 1 file 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) { -- 2.30.2