All of a sudden (not sure when, maybe after an update) my time in Kodi is changed. It’s running 2 hours behind. I checked my “International” settings in the setting menu and all were ok.
My locale settings are set to; Region: Central Europe Timezone: Netherlands
Instead of 18.42u it shows 16.42u
When i SSH into my RPI and put in the command “date” it outputs;
Wed Oct 7 16:42:39 UTC 2015
If i’m right this needs to be UTC+2 (because of the summertime)
Is there a way to fix this? For now i’ve chosen a wrong timezone in Kodi to match the correct time. (it works)
When i use the following command with SSH “sudo timedatectl set-timezone CET” it corrects the time. But after a reboot it automatically is changed back when Kodi is launched.
Probably the wrong timezone is linked to my countrie? I’m not sure if this is in OSMC or Kodi?
The fixes described in that thread have been incorporated since RC3 (eg before the first stable release) and should NOT be needed now in fact by following them you are downgrading one of your system packages - so don’t do that…
@DBMandrake do you have another solution? As Mandr statet he had the same problem with the September release. I think mine occurred when updating to this release. (i’m not 100% sure)
The fix discussed in the thread related to the time not being set at all during boot due to port 123 being blocked on the Internet connection.
To work around this we added a redundant method of updating the time from Google, Microsoft or Apple.
This has absolutely nothing to do with time zones or time zones being set wrong - ntp and the hardware clock in Linux always operate in UTC and are translated to your local time by applications when the time is read based on your time zone settings.
What time and time zone does it say if you type date over ssh ?
I though it was a timezone issue, but it wasn’t as it was set to America/Toronto. I changed to a west cost timezone (-3 hours), and it was still 2 hours behind. I changed it back to America/Toronto, and it was still 2 hours behind. So that’s when I did some searching, and ran your 3 steps above and it corrected the time.
FYI, Sorry, I’m not at home and can’t do any testing at this moment in time.
No it doesn’t, otherwise date would be giving you the correct time and time zone rather than being 2 hours behind and saying UTC. (Universal Coordinated time, also known as GMT)
/etc/timezone is not the primary configuration used in Debian for most software, so while it too must be updated for compatibility with all software the primary controlling factor is /etc/localtime, which is a binary file copied from /usr/share/zoneinfo/timezone where timezone is the name of your timezone. (Europe/Amsterdam)
You can see where we do this on Kodi startup in this patch to Kodi:
The point of this patch is that on Kodi startup and also if you change the time zone in the Kodi GUI, both /etc/timezone and /etc/localtime are updated to sync the system timezone settings with the Kodi timezone settings.
Apparently this is not working correctly so it would be interesting to figure out why. Can you check to make sure that the file /usr/share/zoneinfo/Europe/Amsterdam does actually exist ? Also please post your system journal so we can see whether Kodi is running the correct command on startup to copy the localinfo file:
grab-logs -J
If I had to guess what the problem might be, it would be that there could be a slight naming mismatch between your timezone in Kodi and the name/path of the localinfo file in /usr/share/zoneinfo.
I don’t see the issue, but your system is suffering from corruption:
Oct 08 20:05:55 osmc systemd[223]: Failed at step EXEC spawning /usr/sbin/vsftpd: Exec format error
And
Oct 08 20:05:54 osmc kernel: EXT4-fs error (device mmcblk0p2): htree_dirblock_to_tree:987: inode #859: block 8802: comm systemd: bad entry in directory: rec_len is smaller than minimal - offset=0(0), inode=0, rec_len=0, name_len=0