netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* netfilter: xt_time: print timezone for user information
@ 2008-12-10 19:49 Jan Engelhardt
  2008-12-11 12:58 ` Patrick McHardy
  0 siblings, 1 reply; 2+ messages in thread
From: Jan Engelhardt @ 2008-12-10 19:49 UTC (permalink / raw)
  To: kaber; +Cc: Netfilter Developer Mailing List


commit 5f6c55d201590a9360135fa5dbea78a9e958edb6
Author: Jan Engelhardt <jengelh@medozas.de>
Date:   Wed Dec 10 20:48:26 2008 +0100

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: Jan Engelhardt <jengelh@medozas.de>
---
 net/netfilter/xt_time.c |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/net/netfilter/xt_time.c b/net/netfilter/xt_time.c
index 29375ba..93acaa5 100644
--- a/net/netfilter/xt_time.c
+++ b/net/netfilter/xt_time.c
@@ -243,6 +243,17 @@ static struct xt_match xt_time_mt_reg __read_mostly = {
 
 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);
 }
 


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: netfilter: xt_time: print timezone for user information
  2008-12-10 19:49 netfilter: xt_time: print timezone for user information Jan Engelhardt
@ 2008-12-11 12:58 ` Patrick McHardy
  0 siblings, 0 replies; 2+ messages in thread
From: Patrick McHardy @ 2008-12-11 12:58 UTC (permalink / raw)
  To: Jan Engelhardt; +Cc: Netfilter Developer Mailing List

Jan Engelhardt wrote:
> 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.

Applied, thanks.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-12-11 12:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-10 19:49 netfilter: xt_time: print timezone for user information Jan Engelhardt
2008-12-11 12:58 ` Patrick McHardy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).