From: Ed A. <ep...@us...> - 2003-07-31 20:24:33
|
Update of /cvsroot/xmltv/xmltv/grab/uk In directory sc8-pr-cvs1:/tmp/cvs-serv31002 Modified Files: tv_grab_uk.in Log Message: Calculate $now (for the midnight sanity check) at run time, and after Date_Init() has been called. This should fix the bug found by Stephen Foster that the grabber required TZ to be set. Index: tv_grab_uk.in =================================================================== RCS file: /cvsroot/xmltv/xmltv/grab/uk/tv_grab_uk.in,v retrieving revision 1.86 retrieving revision 1.87 diff -C2 -d -r1.86 -r1.87 *** tv_grab_uk.in 19 Jul 2003 16:28:08 -0000 1.86 --- tv_grab_uk.in 31 Jul 2003 20:24:30 -0000 1.87 *************** *** 218,231 **** # # This code shouldn't be affected by the Date::Manip bug with parsing ! # 'now' after setting a different timezone: if the times are one hour ! # later due to being interpreted as UTC instead of BST, then we are ! # effectively checking for a crossing of midnight BST. Which might as ! # well be the time when Ananova switches. I don't know what time they ! # really do it. # our $now; ! BEGIN { $now = ParseDate('now'); die if not defined $now; } END { ! if (UnixDate(ParseDate('now'), '%Q') ne UnixDate($now, '%Q')) { warn "current day has changed, results may be messed up\n"; } --- 218,230 ---- # # This code shouldn't be affected by the Date::Manip bug with parsing ! # 'now' after setting a different timezone: I don't know exactly when ! # the changeover happens, and especially not on a day when clocks ! # shift anyway. So a one hour error matters little. # our $now; ! $now = ParseDate('now'); die if not defined $now; END { ! if (defined $now ! and UnixDate(ParseDate('now'), '%Q') ne UnixDate($now, '%Q')) { warn "current day has changed, results may be messed up\n"; } |