From: janw Date: Tue, 16 Sep 2008 15:29:19 +0000 (+0000) Subject: Added datatype check. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=a478c233f442832ab90d98e62136f89b103c2cf1;p=gosa.git Added datatype check. git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.6-lhm@12487 594d385d-05f5-0310-b6e9-bd551577e9d8 --- 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;