Calendar glitch in webif 1.0.6 EPG?

fenlander

Active Member
When I click the calendar icon in the RS EPG, it defaults to June 2016. It's not my system date.
 

Brian

Administrator
Staff member
I have changed the thread title for you, and can confirm that I get the same "June 2016" as you do.

Edit: The RS EPG Calendar button correctly brings up "September 2013".
 

MymsMan

Ad detector
me too - latest version of webif - not actually tried it before - never noticed there was a calendar!
 

Brian

Administrator
Staff member
I have just checked another box still running 1.0.5-5, and can confirm that the EPG Calendar button correctly brings up "September 2013". So this would appear to be a bug introduced with 1.0.6.
 

prpr

Well-Known Member
June 4th 2016 - Sep 8th 2013 = 1000 days. Looks like there's a forgotten multiplier in somewhere...

...yes. In /mod/var/mongoose/cgi-bin/xepg.js change this:
Code:
        minDate: '[expr $now * 1000]',
        maxDate: '[expr ($now + 7 * 86400) * 1000]',
to this:
Code:
        minDate: '[expr $now]',
        maxDate: '[expr ($now + 7)]',
and you get a normal looking range.
 

af123

Administrator
Staff member
That shouldn't work either (it's trying to embed Jim code in a JS file). Fix will be uploaded shortly.
 

prpr

Well-Known Member
I couldn't work out what or how it was doing it, but it definitely works!
People complain about C/C++ being write-only languages, but the combination of Jim and Javascript has to beat it. It's virtually unfathomable IMHO.
 

Black Hole

May contain traces of nut
Where exactly?

OK, I see it now. The calendar title block says not a number, and there are no days displayed.
 

af123

Administrator
Staff member
An interesting side effect of another change. I'll upload a fix this evening.
 

4291

Well-Known Member
Calendar now showing correct date etc., but selecting the last highlighted day (18th) results in blank schedule. I will try it again later in the day.
 

4291

Well-Known Member
RS EPG calendar works as I would expect, but it does have fewer days highlighted.
 
Top