Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e6210f3b authored by Jan Engelhardt's avatar Jan Engelhardt Committed by David S. Miller
Browse files

netfilter 08/09: xt_time: print timezone for user information



netfilter: xt_time: print timezone for user information

Let users have a way to figure out if their distro set the kernel
timezone at all.

Signed-off-by: default avatarJan Engelhardt <jengelh@medozas.de>
Signed-off-by: default avatarPatrick McHardy <kaber@trash.net>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent cd7fcbf1
Loading
Loading
Loading
Loading
+11 −0
Original line number Original line Diff line number Diff line
@@ -243,6 +243,17 @@ static struct xt_match xt_time_mt_reg __read_mostly = {


static int __init time_mt_init(void)
static int __init time_mt_init(void)
{
{
	int minutes = sys_tz.tz_minuteswest;

	if (minutes < 0) /* east of Greenwich */
		printk(KERN_INFO KBUILD_MODNAME
		       ": kernel timezone is +%02d%02d\n",
		       -minutes / 60, -minutes % 60);
	else /* west of Greenwich */
		printk(KERN_INFO KBUILD_MODNAME
		       ": kernel timezone is -%02d%02d\n",
		       minutes / 60, minutes % 60);

	return xt_register_match(&xt_time_mt_reg);
	return xt_register_match(&xt_time_mt_reg);
}
}