From 780d82f8b97e67e93d4097de639f1e375223cda0 Mon Sep 17 00:00:00 2001 From: djk Date: Mon, 3 Jan 2000 14:18:09 +0000 Subject: [PATCH] updated sh/version copyright date added g4pdq compatible sh/date command --- Changes | 5 +++++ cmd/show/date.pl | 44 ++++++++++++++++++++++++++++++++++++++++++++ cmd/show/version.pl | 2 +- perl/Messages | 1 + perl/cluster.pl | 2 +- 5 files changed, 52 insertions(+), 2 deletions(-) create mode 100644 cmd/show/date.pl diff --git a/Changes b/Changes index eeb6a553..32cd3f9b 100644 --- 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 index 00000000..264bc5ed --- /dev/null +++ b/cmd/show/date.pl @@ -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); diff --git a/cmd/show/version.pl b/cmd/show/version.pl index 3ce52700..fe0cf3d7 100644 --- a/cmd/show/version.pl +++ b/cmd/show/version.pl @@ -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); diff --git a/perl/Messages b/perl/Messages index 54813c27..75c24c2c 100644 --- a/perl/Messages +++ b/perl/Messages @@ -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 ***', diff --git a/perl/cluster.pl b/perl/cluster.pl index 4f88ef02..373e595c 100755 --- a/perl/cluster.pl +++ b/perl/cluster.pl @@ -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 -- 2.43.0