Fix up processing of dates with oldstyle timestamps for in
progress recordings.
+ Add support to specify the date we're running mythtv-status on
+ so that we can test various scenarios.
+
2013-10-27 Andrew Ruthven
Handle the handling in POD in Perl 5.18. Force the return code
=item lines to be handled correctly.
'file=s' => \$c->{'xml_file'},
's|save-file=s' => \$c->{'save_file'},
+ 'date=s' => \$c->{'date'},
'verbose' => \$verbose,
'help|?' => \$help,
) || pod2usage("\nUse --help for help.\n");
},
},
'subs' => {
- 'find_next' => sub { $warn_present ||= 1; $next_time = 'now' }
+ 'find_next' =>
+ sub {
+ $warn_present ||= 1;
+ $next_time = $c->{'date'} || 'now';
+ }
}
},
if $next_time eq 'Never' || $next_time eq 'now';
my $err;
- my $delta = DateCalc('now', $next_time, \$err, 0);
+ my $delta = DateCalc($c->{'date'} || 'now', $next_time, \$err, 0);
my $seconds = Delta_Format($delta, 'approx', 0, '%sh');
# If the next recording is more than 1 day in the future,
our $today = substr(ParseDate('today'), 0, 8);
our $tomorrow = substr(ParseDate('tomorrow'), 0, 8);
+if ($c->{'date'}) {
+ $today = substr(ParseDate($c->{'date'}), 0, 8);
+ $tomorrow = substr(DateCalc($c->{'date'}, ParseDateDelta('1 day')), 0, 8);
+}
+
+if ($verbose) {
+ print "Today: $today\n";
+ print "Tomorrow: $tomorrow\n";
+}
+
# If we're in return code only mode then we disable all blocks
# except for those explicitly enabled.
if ($return_code_only) {
Use colour when showing the status of the encoder(s).
+=item B<--date>
+
+Set the date to run as, used for debugging purposes.
+
=item B<-d, --description>
Display the description for the scheduled recordings.