EPG - wrong time Android vs. Linux
#1
Good evening.

The summary:
EPG shows the wrong time either in Nvidia Shield TV Pro or in Libreelec depending on the TV Headend-server setting.

The long version:
I'm using a TV Headend-server on my NAS (Helios64) and 2 Kodi clients - one on a Libreelec (Raspberry PI) and one on a Nvidia Shield TV Pro (Android TV). Depending on the EPG offset setting in the TV Headend-server I can choose if the Kodi EPG on the Nvidia Shield is one hour ahead or if the EPG on the Libreelec is one hour behind. It took me some time to figure out the guilty one.

The configuration:
All devices get their time synchronization from the same NTP server. Every device shows in Kodi and in the system the correct time.

TV Headend-server (Kobol Helios64)
Timezone on Linux:
  • HW-Clock/RTC: UTC
  • Localtime CET (+0100, Berlin/Europe
TV Headend → Configuration → Networks → EIT time offset
  • UTC: Nvidia shield is correct, Libreelec and Arch are one hour behind.
  • Local server time: Nvidia shield is one hour behind, Libreelec and Arch are correct.

Nvidia Shield TV Pro 2019
  • Timezone setting in Android TV: Europe/Berlin.
  • Timezone setting in Kodi: Europe/Berlin
No other settings possible. I've also search the read out some system setting via Termux - without any success.

Libreelec
There's no timedatectl on Libreelec. To readout the system time:
Code:
connmanctl clock

Time = 1613504668
TimeUpdates = auto
Timezone = Europe/Berlin
TimezoneUpdates = auto
Timeservers = [ 192.168.109.1 ]
Converting the timestamp to a readable date:
Code:
date -d @1613504668
Di 16. Feb 20:44:28 CET 2021
which showed me the time of the local timezone. The Raspberry Pi 4 doesn't have a HW clock. The system timezone is set to Europe/Berlin:
Code:
cat /storage/.cache/timezone
TIMEZONE=Europe/Berlin

Inside Kodi (Settings → Regional) the timezone is set to the correct region. In my case: Europe/Berlin.

The solution:
1. Set the system timezone to UTC
Code:
rm /storage/.cache/timezone
ln -s /usr/share/zoneinfo/UTC /storage/.cache/timezone

2. Clear the EPG data in Kodi
Settings → TV and Radio → Guide → Clear data
Then reboot. When the next EPG data is read from the TV Headend-server it shows the correct time with the matching program.

The system time is set to UTC, the timezone inside Kodi is still set to Europe/Berlin.

Hope it helps anyone else to avoid a headache. The investigation of this problem took me several weeks.
Reply
#2
The first impression was wrong unfortunately.

When I clear the EPG and force a reload of a certain channel, I get the correct time and the correct program title.

But the automatic EPG update in background shows the program one hour behind.

The best thing would be a setting inside the TV-Headend add-on configuration to specify a client specific offset.

What I don't understand:
Independend on the configured system time (UTC, CET) Kodi shows the correct time. Only the EPG differs. Shouldn't it being based both on UTC with calculation of  an offset for the local timezone?
Reply
#3
2nd update
After some days also the automatic EPG update is wrong again. So I only get the correct EPG, when I do a forced update of a certain channel.
Reply
#4
I built a newer version from git in the last weeks. The problem seemed to be fixed now. At least it's working correctly since the update.

Current used version:  4.3-1942~gd67fff914
Reply



Logout Mark Read Team Forum Stats Members Help
EPG - wrong time Android vs. Linux0
This forum uses Lukasz Tkacz MyBB addons.