Sorry, new patch. There was a small error
On Wed, 2004-12-29 at 18:07 +0100, Bart Heremans wrote:
> Hi,
>
> Attached a small patch that changes the date / time format used in the
> info area of the tv guide (csheluled recordings)
>
> The time format was hard coded : %I:%M%p
> Now it uses the TV_TIMEFORMAT from the config file for the schedules
> of"today" and tomorrow" and the TV_DATETIMEFORMAT for the scheduled
> recordings "This week"
>
> The patch is for freevo cvs version.
>
> Should I send a patch for freevo-1.5.x also (there the file util/misc.py
> has to be patched and not util/tv_util.py)
>
> Bart
diff -Naur freevo/src/util/tv_util.py freevo_new/src/util/tv_util.py
--- freevo/src/util/tv_util.py 2004-12-05 14:01:13.000000000 +0100
+++ freevo_new/src/util/tv_util.py 2004-12-29 17:55:20.144502880 +0100
@@ -191,7 +191,7 @@
sub_title = u' "' + Unicode(m.sub_title) + u'" '
result = result + u"- %s%s at %s\n" % \
( Unicode(m.title), Unicode(sub_title),
- Unicode(time.strftime('%I:%M%p',time.localtime(m.start))) )
+ Unicode(time.strftime(config.TV_TIMEFORMAT,time.localtime(m.start))) )
if len(tomorrow) > 0:
result = result + _('Tomorrow') + u':\n'
@@ -201,7 +201,7 @@
sub_title = ' "' + m.sub_title + '" '
result = result + u"- %s%s at %s\n" % \
( Unicode(m.title), Unicode(sub_title),
- Unicode(time.strftime('%I:%M%p',time.localtime(m.start))) )
+ Unicode(time.strftime(config.TV_TIMEFORMAT,time.localtime(m.start))) )
if len(later) > 0:
result = result + _('This Week') + u':\n'
@@ -211,7 +211,7 @@
sub_title = ' "' + m.sub_title + '" '
result = result + u"- %s%s at %s\n" % \
( Unicode(m.title), Unicode(sub_title),
- Unicode(time.strftime('%I:%M%p',time.localtime(m.start))) )
+ Unicode(time.strftime(config.TV_DATETIMEFORMAT,time.localtime(m.start))) )
if not result:
result = _('No recordings are scheduled')