2020-01-09, 04:59
I wanted to ask here before submitting a PR (I've kept ksooo far too busy the past few days dealing with me) to make sure this is going to be something valid.
In the GUI, when viewing an EPG Tag's "Program Information", the First Aired date is always wrong. My PVR addon is sending in an accurate UTC value as specified by the PVR API, but my backend always reports this as a date, for example 1578614400 (Friday January 10th, 2020, 12:00:00 AM GMT). When the tag is processed by CPVRGUIInfo, it's being converted into local time, so being in the Eastern Time zone, all my values are shifted to 7:00PM the previous day, making it incorrect. Using the 1578614400 example, I will see "First Aired" as 01/09/2020 instead of 01/10/2020.
Here is where the conversion to local time is taking place:
https://github.com/xbmc/xbmc/blob/master...o.cpp#L614
I think this block should be changed as follows, but don't want to submit a PR if this behavior is expected. I don't want to make any assumptions that would mess up all the official PVR addons. I can just as easily modify my PVR addon to adjust the value in the other direction before reporting it.
Feedback is appreciated, I really don't want to cause ksooo any more grief for a while.
In the GUI, when viewing an EPG Tag's "Program Information", the First Aired date is always wrong. My PVR addon is sending in an accurate UTC value as specified by the PVR API, but my backend always reports this as a date, for example 1578614400 (Friday January 10th, 2020, 12:00:00 AM GMT). When the tag is processed by CPVRGUIInfo, it's being converted into local time, so being in the Eastern Time zone, all my values are shifted to 7:00PM the previous day, making it incorrect. Using the 1578614400 example, I will see "First Aired" as 01/09/2020 instead of 01/10/2020.
Here is where the conversion to local time is taking place:
https://github.com/xbmc/xbmc/blob/master...o.cpp#L614
I think this block should be changed as follows, but don't want to submit a PR if this behavior is expected. I don't want to make any assumptions that would mess up all the official PVR addons. I can just as easily modify my PVR addon to adjust the value in the other direction before reporting it.
cpp:case LISTITEM_PREMIERED:
if (epgTag->FirstAiredAsUTC().IsValid())
{
strValue = epgTag->FirstAiredAsUTC().GetAsLocalizedDate(true);
return true;
}
return false;
Feedback is appreciated, I really don't want to cause ksooo any more grief for a while.