From b71ec7282385b72e7e5d7aaf99890a0890e38eda Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Fri, 5 Nov 2010 19:34:57 +0100 Subject: Remove useless unix_time function --- bin/icli | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'bin') diff --git a/bin/icli b/bin/icli index d961ac7..d50b897 100755 --- a/bin/icli +++ b/bin/icli @@ -60,10 +60,6 @@ sub pretty_date { return time2str('%Y-%m-%d %H:%M:%S', $unix); } -sub unix_time { - return time2str('%s', localtime(time)); -} - sub read_objects_line { my ($line, $ref) = @_; @@ -306,7 +302,7 @@ sub dispatch_command { open(my $cmd_fh, '>', '/var/lib/icinga/rw/icinga.cmd') or die("Can't open: $!"); printf $cmd_fh ( "[%d] %s", - unix_time(), + time(), $str, ); close($cmd_fh) or die("Can't close: $!"); @@ -316,7 +312,7 @@ sub dispatch_command { sub recheck_host_all { my ($host) = @_; - dispatch_command('SCHEDULE_HOST_SVC_CHECKS', $host, unix_time()); + dispatch_command('SCHEDULE_HOST_SVC_CHECKS', $host, time()); say "Scheduled check of * on '$host'"; } @@ -325,7 +321,7 @@ sub recheck_service { if (have_service($host, $service)) { dispatch_command('SCHEDULE_SVC_CHECK', $host, $service, - unix_time()); + time()); say "Scheduled check of '$service' on '$host'"; } } -- cgit v1.2.3