Linux Recordings from 24/3 set from guide are 1 hour out
#1
Running Kodi 16 and MythTV 0.27.6 on a Ubuntu 14.04.4 system. The EPG is picked up from the transmitted streams (Freeview, UK), up to 8 days ahead.

I have just noticed that if I pick a program from the guide on any date from Thursday 24/3 onwards, and then select record, whilst the right program appears to be selected, the program it sets up a timer for is the one an hour earlier.

If I select a later one (by an hour), I then get the program I originally wanted. Having done that, looking at the 'upcoming recordings' in MythWeb I appear to now be getting the right one.

This has only just started from the date above. I note that here (UK) we are about to switch to summer time, but not until the Saturday night 26-27/3. I am wondering if this indicates that somewhere, the wrong summer time date is stored?
Reply
#2
I've had the same issue. Although, it only seemed to be a problem when setting a series recording (Timer type: Record Series). If I used a different type of Timer (Record All, Record Once), the proper program was scheduled; only the series recording was set up for the program 1 hour previous.

This was after the DST change. I had also deleted the PVR caches from Kodi, and done a full guide update in MythTV (mythfilldatabase --dd-grab-all), but series recordings were still set for the wrong program. Eventually I had to set the recording from mythfrontend.

(I remember similar problems back in the fall, but I don't recall what fixed the issue back then ...)
Reply
#3
I'm not setting a series recording, just one off. All caches have been cleared.

I've also noticed that if I set up the recording using the MythTV web interface MythWeb it is set up right, so I assume it must be Kodi that is getting it wrong.

If it all rights itself after 27/3, it'll prove it is DST I guess.
Reply
#4
You have to setup right timezone of your backend and your clients. All time data transfered between backend and addon use UTC values. If your server or your remote client isn't correctly configured then you could have this kind of issue.

Using Mythweb, which is installed in the same host of the backend (so same timezone), you are not able to detect the issue.

You should have a look at MythTV wiki about timezone configuration: server and database have to be setuped.
Using a bad timezone in server side could corrupt utc time values stored in your database. But often users do the misconfiguration at client side which is less critical.
Reply
#5
I can't speak to the OP, but all my systems have the same timezone set, both in the system (whether it's /etc/localtime, ${TZ} or through timedatectl), as well as manually set in Kodi's Settings > Appearance > International.

I believe the issue must be somewhere else. However, to troubleshoot this properly, I suppose I need to check the logs of both Kodi and mythbackend when trying to schedule a recording to see what is being sent ...
Reply
#6
As far as I can tell the time zone is set correctly everywhere (the main backend system is set to Europe/London) and on every system involved, but the problem still persists.

I am using MythWeb on completely different systems (three) and all of them set and show the correct times for recordings. It is only Kodi that doesn't.

I have now also found that if I set a recording / look at the guide for post 27/3 (after British summertime change), every program listed by Kodi is shown an hour too early (eg the Night Manager on Sunday is listed as 20:00 to 21:00, whereas actually it is 21:00 to 22:00). That applies whether Kodi is running on the same (Ubuntu 14.04) system as the MythTV backend, or on a completely separate Windows system.

It seems the common factor here is that Kodi is misdisplaying date/time, not MythTV or the base systems themselves. It is an incompatibility between Kodi and the MythTV backend.

I would raise a bug report on this but the tracker won't let me at the moment. This is the logfile section (with debug logging enabled), actually from a Windows 7 system, but as exactly the same error occurs on the Linux Kodi and the Windows one, I imagine it is relevant:
Code:
11:13:22 T:9056   DEBUG: AddOnLog: MythTV PVR Client: PVRClientMythTV::AddTimer: title: Countryfile - Sussex, start: 1459065300, end: 1459068900, chanID: 1002
11:13:22 T:9056   DEBUG: AddOnLog: MythTV PVR Client: PVRClientMythTV::AddTimer: Creating new recording rule
11:13:22 T:9056    INFO: AddOnLog: MythTV PVR Client: Overriding the rule with template 1 'Default (Template)'
11:13:22 T:9056   DEBUG: AddOnLog: MythTV PVR Client: PVRClientMythTV::PVRtoMythRecordingRule: Found program: 1002 1459065300 Countryfile
11:13:22 T:9056   DEBUG: AddOnLog: MythTV PVR Client: PVRClientMythTV::AddTimer: Done - 45
The program is showing an hour too early in the guide. It is listed as 27/3, 7:55AM to 8:55AM, whereas in reality it is 8:55AM to 9:55AM, but by that date we are in summer time and clocks are forward 1 hour. The start time 1459065300 is actually Sunday, 2016-03-27, 07:55:00 which is exactly what you would expect to see based on the current timezone (GMT) where we are to-day not adjusted for summer time, which is where we will really be on that date. Ie UTC, not Europe/London. The following is what you get from that timestamp from a PHP script using date() setting timezone to UTC and Europe/London respectively:
Code:
Sunday, 2016-03-27, 07:55:00 (UTC) [2016-03-27T07:55:00+00:00]
Sunday, 2016-03-27, 08:55:00 (Europe/London) [2016-03-27T08:55:00+01:00]

So actually, I think there may be two separate things wrong:
- something wrong with the summer time changeover date, which explains the first error occurring from 24/3 to 26/3.
- an error in displaying items whose times are in the summer time region, while we are still in the GMT region (they need to be displayed as if we were in the summer time region).

Probably by next week it will all sort itself out, but it is likely to be wrong again (in the opposite direction) in the autumn.
Reply
#7
Yes i see now what you mean. This concerns futur schedule in summer time range.
Reply
#8
So yes there is an issue. But i cannot fix anything in the addon which transfer the right time to kodi core. The root cause is in conversion to localtime for UI interactions.
Reply
#9
Actually I am not so sure it is the MythTV PVR add on.

I have just connected to an Argus TV (Windows 7) server and the guide for next week displays in exactly the same way - one hour out. The MythTV add-on didn't have anything to do with that. So either there is an identical problem with the Argus TV add-on, or it is Kodi's guide display.

How does one get a login account that allows logging of bugs? I cannot seem to. My normal Kodi login doesn't work for that.
Reply
#10
Did anyone ever find a root cause for this? I'm having the same issue. It seems that series recordings are consistently off by an hour (scheduled is one our earlier than expected). One-offs seem to sometimes be off and others not. I haven't quite tracked down all the instances for each. It seems like when I select a single instance from a search (find similar) and schedule a one off recording for an instance 2 days out it schedules correctly but the same show same search 7 days out scheduled an hour early and actually selected the program name for that time.... All my times and timezones seem correct on my backend and my host system, but I'm not sure I'm looking everywhere. The bios for my server is set correctly as is the host OS (Ubuntu). As near as I can tell there isn't a myth backend configuration for time/zone. My client system is an nVidia Shield TV.

I've got some more research to do, I'm also running a virtual Windows machine on my host system so its possible that Windows and Ubuntu are fighting over the system time and causing some strangeness, but I figured since at least some others have seem similar behavior I'd add myself to the list and ask if anyone every figured this out.
Reply

Logout Mark Read Team Forum Stats Members Help
Recordings from 24/3 set from guide are 1 hour out0