updated sh/version copyright date
authordjk <djk>
Mon, 3 Jan 2000 14:18:09 +0000 (14:18 +0000)
committerdjk <djk>
Mon, 3 Jan 2000 14:18:09 +0000 (14:18 +0000)
added g4pdq compatible sh/date command

Changes
cmd/show/date.pl [new file with mode: 0644]
cmd/show/version.pl
perl/Messages
perl/cluster.pl

diff --git a/Changes b/Changes
index eeb6a55313669eea511fb1c8b00d09c30183ad87..32cd3f9baa7fd9c571646f1627ee0dd86d2dbfac 100644 (file)
--- a/Changes
+++ b/Changes
@@ -1,3 +1,8 @@
+03Jan00=======================================================================
+1. changed the copyright statement in sh/version!
+2. added sh/date with special "be compatible with ak1a" syntax for the output
+of sh/date with no arguments, otherwise the same as sh/time. A special favour
+to G4PDQ...
 01Jan00=======================================================================
 1. Fixed Julian routines to get rid of the millenium bug! (do as I say, not
 as I do!).
diff --git a/cmd/show/date.pl b/cmd/show/date.pl
new file mode 100644 (file)
index 0000000..264bc5e
--- /dev/null
@@ -0,0 +1,44 @@
+#
+# Return system date & time to pacify G4PDQ
+#
+# Copyright (c) 1999 Dirk Koopman G1TLH
+# Copyright (c) 2000 Iain Philipps G0RDI
+#
+# Shamelessly cribbed from time.pl:-
+#
+# $Id$
+#
+
+
+my ($self, $line) = @_;
+my @list = split /\s+/, $line;
+
+my $l;
+my @out;
+my $t = $main::systime;
+
+push @out, $self->msg("time3", cldate($t, 1), ztime($t));
+
+if (@list) {
+       foreach $l (@list) {
+               # prefixes --->
+               my @ans = Prefix::extract($l);
+               next if !@ans;
+               my $pre = shift @ans;
+               my $a;
+               foreach $a (@ans) {
+                       my $s = sprintf "%-9s %-20s", $pre, $a->name();
+
+                       # UTC offset is in hours.minutes (too late to change it now) AND
+            # the wrong way round!
+                       my $off = $a->utcoff();
+                       my $frac = $off - int $off;
+                       $off = (int $off) + (($frac*100)/60);
+                       my ($sec,$min,$hour) = gmtime($t - 3600*$off);
+                       my $buf = sprintf "%02d%02d", $hour, $min;
+                       push @out, $self->msg("time2", $s, $buf, sprintf("%+.1f", -$off));
+               }
+       }
+} 
+
+return (1, @out);
index 3ce52700ec8df523459943a90d94366e2cef17f4..fe0cf3d74e00826002e895e5f2bc38e936f177aa 100644 (file)
@@ -9,6 +9,6 @@
 my @out;
 
 push @out, "DX Spider Cluster version $main::version";
-push @out, "Copyright (c) 1998-1999 Dirk Koopman G1TLH";
+push @out, "Copyright (c) 1998-2000 Dirk Koopman G1TLH";
 
 return (1, @out);
index 54813c27596ad2ef64f29be61868d136429db5ee..75c24c2cb106695ac1894f45528a53a472c18810 100644 (file)
@@ -158,6 +158,7 @@ package DXM;
                                suser4 => 'User field name \'$_[0]\' doesn\'t exist',
                                time1 => 'Local Time: $_[0] $_[1], UTC $_[2]',
                                time2 => '$_[0] Local (standard) time: $_[1] ($_[2] Hours)',
+                               time3 => '$_[0]  $_[1]',
                                talks => 'Talk flag set on $_[0]',
                                talku => 'Talk flag unset on $_[0]',
                                usernf => '*** User record for $_[0] not found ***',
index 4f88ef02d0ee3925206311ec2c355f400811e5c2..373e595c9c25cd74e501d9fda29de17f3d3c5711 100755 (executable)
@@ -70,7 +70,7 @@ package main;
 
 @inqueue = ();                                 # the main input queue, an array of hashes
 $systime = 0;                                  # the time now (in seconds)
-$version = "1.38";                             # the version no of the software
+$version = "1.39";                             # the version no of the software
 $starttime = 0;                 # the starting time of the cluster   
 $lockfn = "cluster.lock";       # lock file name
 @outstanding_connects = ();     # list of outstanding connects