Re: [mythtv-users] Incorrect listings after DST clock change (UK)

Neil Bird <[email protected]>
Newsgroups gmane.comp.tv.xmltv.general
Message-ID <[email protected]>
Around about 31/03/11 08:57, Neil Bird typed ...
> I'll try to produce a cut down script that exhibits the fault so I can step
> through it more easily.

   Attached stand-alone[ish] parse tester [no args/network needed], taking 
the bit from the rt grabber's 'start time' code.


   CentOS 5 PVR: [wrong]

Input is '2011033106:00'
First utc_offset call produced '20110331060000 +0100'
   Implicit timezone calculated to be '+0100'
Got '20110331050000 +0100'


   CentOS 5 work: [wrong]

Input is '2011033106:00'
First utc_offset call produced '20110331060000 +0100'
   Implicit timezone calculated to be '+0100'
Got '20110331050000 +0100'


   Fedora 14 desktop: [right]

Input is '2011033106:00'
First utc_offset call produced '20110331060000 +0100'
   Implicit timezone calculated to be '+0100'
Got '20110331060000 +0100'


   Not knowing what utc_offset is supposed to do exactly, I can't say 
whether the fault is in the grabber's assumptions about utc_offset, 
utc_offset's code or the Date::Manip code.


   And I *still* don't understand why I'm the only one seemingly bitten by this.

-- 
[neil@fnx ~]# rm -f .signature
[neil@fnx ~]# ls -l .signature
ls: .signature: No such file or directory
[neil@fnx ~]# exit

------------------------------------------------------------------------------
Create and publish websites with WebMatrix
Use the most popular FREE web apps or write code yourself; 
WebMatrix provides all the features you need to develop and 
publish your website. http://p.sf.net/sfu/ms-webmatrix-sf

_______________________________________________
xmltv-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xmltv-users
tv_grab_uk_rt.edit (text/plain, 1.3 KB)
#!/usr/bin/perl

eval 'exec /usr/bin/perl  -S $0 ${1+"$@"}'
    if 0; # not running under some shell

use warnings;
use strict;
use XMLTV::ProgressBar;
use XMLTV::Memoize; XMLTV::Memoize::check_argv('get_octets');
use XMLTV::DST;
use XMLTV::Supplement qw/GetSupplement SetSupplementRoot/;
use XMLTV::Options qw/ParseOptions/;
use XMLTV::Configure::Writer;
use XMLTV::Ask;
use XMLTV::Lineup;
use File::Path;
use File::Basename;
use LWP::UserAgent;
use HTTP::Cache::Transparent;
use Encode qw/decode encode/;
use Date::Manip;
use HTML::Entities;
use IO::Scalar; # used for configuration to write channels to string

sub t($)
{
    print STDERR $_[0] . "\n";
}

my ($prog__title, $yyyy, $mm, $dd, $prog__start, $base_tz) = ('test', '2011', '03', '31', '06:00', 'UTC');

my $input = "" . $yyyy . $mm . $dd . $prog__start . "";
t("Input is '$input'");

my $prog_start = utc_offset( $input, $base_tz );
t("First utc_offset call produced '$prog_start'");
if ($prog_start !~ m/([+-]\d{4})$/) {
    t("  Bad UTC offset '" . $1 . "' detected for '" . $prog__title . "', skipping");
    exit(1);
}
my $implicit_tz = $1;
t("  Implicit timezone calculated to be '" . $implicit_tz . "'");
my $tz = $implicit_tz;

# Calculate start time with correct UTC offset
$prog_start = utc_offset("" . $yyyy . $mm . $dd . $prog__start . " " . $tz . "", $base_tz);

print "Got '$prog_start'\n";
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.