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 09:42, Neil Bird typed ...
> Attached stand-alone[ish] parse tester [no args/network needed], taking the
> bit from the rt grabber's 'start time' code.

   I've traced it as far as I can, and it would *seem* to be a bug in XMLTV. 
  I say “seem”, as if it was a legitimate bug, I'd expect others to see it.


   The problem stems from XMLTV.pm's init. of Date::Manip in a BEGIN 
statement (line 2112 of my current version):

   Date::Manip::Date_Init("TZ=UTC");


   This forces *DM5* to set it's TZ config. to UTC, so when it parses 
"20110331060000 +0100" it returns the answer in UTC not localtime, as the 
script expects.  I added printing the $Date::Manip::Cnf{TZ} value in my 
previously posted example:

Input is '2011033106:00'
First utc_offset call produced '20110331060000 +0100'
   Implicit timezone calculated to be '+0100'
Date::Manip::DM5 using TZ=UTC
ParseDate output: 2011033105:00:00
parse_date -> '2011033105:00:00'
parse_local_date -> '2011033105:00:00'
date_to_local -> '2011033105:00:00 +0100'
Got '20110331050000 +0100'


   You can see from the ParseDate output that that's where the rogue 05:00 
appears (the grabber then confuses matters by throwing the current TZ string 
back on the end for re-parsing, getting the time wrong in the process).


   If I stop XMLTV from passing that initial TZ=UTC, it all starts working 
properly:

Input is '2011033106:00'
First utc_offset call produced '20110331060000 +0100'
   Implicit timezone calculated to be '+0100'
Date::Manip::DM5 using TZ=BST
ParseData output: 2011033106:00:00
parse_date -> '2011033106:00:00'
parse_local_date -> '2011033106:00:00'
date_to_local -> '2011033106:00:00 +0100'
Got '20110331060000 +0100'

   Not the correctly calculated (by DM5) TZ=BST now.


   Oddly, the TZ init. in XMLTV must have been added *for* DM5, as that 
setting has no effect in DM6 (in DM5 is sets $Cnf{TZ}, in DM6 I can't see it 
doing anything:  it doesn't match anything so gets ignored).

   Colour me totally confused.

-- 
[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
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.