Update of /cvsroot/freevo/freevo/src/tv
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8048
Modified Files:
epg_xmltv.py
Log Message:
fix for undefined timezone
Index: epg_xmltv.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/tv/epg_xmltv.py,v
retrieving revision 1.41
retrieving revision 1.42
diff -C2 -d -r1.41 -r1.42
*** epg_xmltv.py 5 Feb 2004 19:26:42 -0000 1.41
--- epg_xmltv.py 6 Feb 2004 20:54:26 -0000 1.42
***************
*** 10,13 ****
--- 10,16 ----
# -----------------------------------------------------------------------
# $Log$
+ # Revision 1.42 2004/02/06 20:54:26 dischi
+ # fix for undefined timezone
+ #
# Revision 1.41 2004/02/05 19:26:42 dischi
# fix unicode handling
***************
*** 383,393 ****
# '20020702100000 CDT'
# '200209080000 +0100'
! def timestr2secs_utc(str):
# This is either something like 'EDT', or '+1'
try:
! tval, tz = str.split()
except ValueError:
! # The time value couldn't be decoded
! raise EPG_TIME_EXC
if tz == 'CET':
--- 386,396 ----
# '20020702100000 CDT'
# '200209080000 +0100'
! def timestr2secs_utc(timestr):
# This is either something like 'EDT', or '+1'
try:
! tval, tz = timestr.split()
except ValueError:
! tval = timestr
! tz = str(-time.timezone/3600)
if tz == 'CET':
***************
*** 420,427 ****
try:
! secs = time.mktime(strptime.strptime(str, xmltv.date_format))
except ValueError:
! str = str.replace('EST', '')
! secs = time.mktime(strptime.strptime(str, xmltv.date_format))
return secs
--- 423,430 ----
try:
! secs = time.mktime(strptime.strptime(timestr, xmltv.date_format))
except ValueError:
! timestr = timestr.replace('EST', '')
! secs = time.mktime(strptime.strptime(timestr, xmltv.date_format))
return secs
-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Freevo-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog