<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
</head>
<body>
<div name="messageBodySection">
<div dir="auto"><span style="font-family:Arial;font-size: 16px">Thank you Fabian, hopefully Dirk will see this and implement the fix.</span><span style="font-size: 16px"><br /></span><span style="font-size: 16px"><br /></span><span style="font-family:Arial;font-size: 16px">73 Keith.</span></div>
</div>
<div name="messageReplySection">On 9 Apr 2025 at 10:49 +0100, Fabian Kurz via Dxspider-support <dxspider-support@tobit.co.uk>, wrote:<br />
<blockquote type="cite" style="border-left-color: grey; border-left-width: thin; border-left-style: solid; margin: 5px 5px;padding-left: 10px;">On Wed, Apr 09, 2025 at 09:06:28AM +0100, Keith, G6NHU via Dxspider-support wrote:<br />
<blockquote type="cite">Sorry, Dirk, your attempted fix didn’t work.<br />
<br />
07:50:01 (*) Argument " " isn't numeric in int at /spider/perl/DXUtil.pm line 645.<br />
07:50:01 (*) at /spider/perl/DXUtil.pm line 645.<br /></blockquote>
<br />
This comes from spider/cmd/show/cluster.pl line 11 where the uptime is calculated:<br />
<br />
$uptime = difft($main::starttime, ' ');<br />
<br />
The function difft() could be changed in the following way to make<br />
this warning disappear:<br />
<br />
diff --git a/perl/DXUtil.pm b/perl/DXUtil.pm<br />
index e88f93ec..9a3b7d0e 100644<br />
--- a/perl/DXUtil.pm<br />
+++ b/perl/DXUtil.pm<br />
@@ -642,7 +642,7 @@ sub difft<br />
$t -= $h * 3600;<br />
$m = int $t / 60;<br />
$out .= sprintf ("%s${m}m", $adds?' ':'') if $m;<br />
- if (($d == 0 && $adds) || (int $adds && $adds == 2)) {<br />
+ if (($d == 0 && $adds) || ($adds =~ /^\d+$/ && $adds == 2)) {<br />
$s = int $t % 60;<br />
$out .= sprintf ("%s${s}s", $adds?' ':'') if $s;<br />
$out ||= sprintf ("%s0s", $adds?' ':'');<br />
<br />
I just deployed this on DA0BCC-7 and there are no more warnings in the log.<br />
<br />
73<br />
Fabian, DJ5CW<br />
--<br />
Fabian Kurz Munich, Germany<br />
fabian@fkurz.net +49(174)6926713<br />
https://fkurz.net/ DJ5CW / SO5CW<br />
<br />
_______________________________________________<br />
Dxspider-support mailing list<br />
Dxspider-support@tobit.co.uk<br />
https://mailman.tobit.co.uk/mailman/listinfo/dxspider-support<br /></blockquote>
</div>
</body>
</html>