From: Jo-Philipp Wich Date: Wed, 22 Feb 2017 09:46:58 +0000 (+0100) Subject: firewall3: fix handling of UTC times X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=82ccd9e34fe87d31d9909fed754950b2c75bc6ac;p=project%2Ffirewall3.git 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 --- 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) {