2 # Return system date & time to pacify G4PDQ
4 # Copyright (c) 1999 Dirk Koopman G1TLH
5 # Copyright (c) 2000 Iain Philipps G0RDI
7 # Shamelessly cribbed from time.pl:-
13 my ($self, $line) = @_;
14 my @list = split /\s+/, $line;
18 my $t = $main::systime;
20 push @out, $self->msg("time3", cldate($t, 1), ztime($t));
25 my @ans = Prefix::extract($l);
30 my $s = sprintf "%-9s %-20s", $pre, $a->name();
32 # UTC offset is in hours.minutes (too late to change it now) AND
33 # the wrong way round!
34 my $off = $a->utcoff();
35 my $frac = $off - int $off;
36 $off = (int $off) + (($frac*100)/60);
37 my ($sec,$min,$hour) = gmtime($t - 3600*$off);
38 my $buf = sprintf "%02d%02d", $hour, $min;
39 push @out, $self->msg("time2", $s, $buf, sprintf("%+.1f", -$off));