+2013-01-29 Andrew Ruthven
+ MythTV 0.26 now uses UTC in the time/date attributes in Status.
+ We now convert it to the local timezone.
+
2012-07-07 Andrew Ruthven
Switch to using the exact mode when working out the time to the
next recording. Also, if the next recording is in 1 Hour, 1 Minute
use LWP::UserAgent;
use XML::LibXML;
use Date::Manip;
+use Date::Manip::Date;
use Getopt::Long;
use Text::Wrap;
use POSIX qw/strftime :sys_wait_h/;
my $return_code_only = 0;
-my $VERSION = '0.10.2';
+my $VERSION = '0.10.3';
# Some display blocks are disabled by default:
$c->{'display'}{'Shows due to Auto Expire'} = 0;
'name' => 'Status',
'type' => 'xpath',
'xpath' => "//Status",
- 'attrs' => [ qw/time date/ ],
- 'template' => "__date__, __time__",
- 'format' => 'one line'
+ 'attrs' => [ qw/ISODate time date/ ],
+ 'template' => "__date__",
+ 'format' => 'one line',
+ 'rewrite' => {
+ '&date' => sub {
+ my ($value, $vars) = @_;
+
+ if ($vars->{ISODate} =~ /Z$/) {
+ # 2012-10-17T23:50:08Z
+ my $d = new Date::Manip::Date;
+ $d->parse($vars->{ISODate});
+
+ # Work out our local timezone. The Date::Manip::Date
+ # docs say that convert will default to the local timezone,
+ # this appears to be lies.
+ my $dmb = $d->base();
+ my ($tz) = $dmb->_now('tz',1);
+ $d->convert($tz);
+
+ # Sample of what MythTV uses:
+ # Thu 18 Oct 2012, 10:20
+ return $d->printf("%a %d %b %Y, %H:%M");
+ } else {
+ return $vars->{date} . ", " . $vars->{time};
+ }
+ },
+ },
},
# Info about the encoders before TV OSD Declutter (Changeset 20037).
+mythtv-status (0.10.3) unstable; urgency=low
+
+ * New upstream release (Closes: LP#1096252).
+
+ -- Andrew Ruthven <andrew@etc.gen.nz> Tue, 29 Jan 2013 16:37:53 +1300
+
mythtv-status (0.10.2-3) unstable; urgency=low
* Fix the use of motd as a facility name, shouldn't be $motd.