From a478c233f442832ab90d98e62136f89b103c2cf1 Mon Sep 17 00:00:00 2001 From: janw Date: Tue, 16 Sep 2008 15:29:19 +0000 Subject: [PATCH] Added datatype check. git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.6-lhm@12487 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-si/modules/GosaSupportDaemon.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gosa-si/modules/GosaSupportDaemon.pm b/gosa-si/modules/GosaSupportDaemon.pm index 93e70a722..fb6fc7039 100644 --- a/gosa-si/modules/GosaSupportDaemon.pm +++ b/gosa-si/modules/GosaSupportDaemon.pm @@ -181,7 +181,7 @@ sub add_content2xml_hash { sub get_time { # Add an optional offset in seconds - my $offset = shift || 0; + my $offset = $1 if shift =~ /^(\d+)$/ || 0; my ($seconds, $minutes, $hours, $monthday, $month, $year, $weekday, $yearday, $sommertime) = localtime(time+$offset); $hours = $hours < 10 ? $hours = "0".$hours : $hours; -- 2.30.2