While OpenELEC is an awesome media center OS for Raspberry Pi, it does come with one minor flaw: incorrect time. This post shows how to fix OpenELEC incorrect time on Raspberry Pi. If you have not yet tried OpenELEC then I strongly suggest you install OpenELEC on Raspberry Pi and give it a try. In my recent comparison of OpenELEC with Xbian and Raspbmc, OpenELEC was the clear winner with ease of installation, speed, and performance. Without further delay, let me show you how to fix the OpenELEC incorrect time problem and set Kodi Timezone.
|Build a Low-Cost Raspberry Pi Media Center||Price|
|Raspberry Pi 4B Starter Kit with case, power adapter, and heat sinks||~$82.00|
|Sandisk Ultra 32GB Micro SDHC UHS-I Card 98 MB/s||~$8.00|
|SANOXY Wireless USB PC Remote Control Mouse for PC||~$8.00|
Fix for OpenELEC Incorrect Time Issue
The main reason for OpenELEC showing wrong time on Raspberry Pi is the lack of real clock on Raspberry Pi board. Because of this you may have to change time on Raspberry Pi every time after boot. There are two ways to fix the incorrect time shown in OpenELEC on Raspberry Pi. You will need an active internet connection for these fixes to work.
Method 1: SSH and Commandline
The first way is using commandline and SSH. While some may find this inconvenient many have found this to be sure-shot. To fix OpenELEC's time problem, SSH into your Raspberry Pi running OpenELEC (ensure that SSH is enabled on your Raspberry Pi. If you do not know how to SSH into Raspberry Pi, then check this guide.
SSH into your OpenELEC using the username "root" and password "openelec" and edit
Add the following content to the file:
#!/bin/sh (sleep 30; \ /usr/sbin/ntpdate pool.ntp.org; \ )&
Save and exit. Assign execute privileges to the file using the following command:
chmod +x /storage/.config/autostart.sh
Your OpenELEC incorrect time issue should be fixed after the next reboot. You may have to wait 30 seconds before time updates after booting. What the autostart script does is it automatically sets the time from the timeserver everytime during boot. [Read: How to run OpenELEC from USB Stick?]
Method 2: Using Kodi Interface
Upadate (4/25/2015): This method has been confirmed to work on Raspberry Pi 2 running OpenELEC.
For many novice Linux / commandline users this might be an easier method as everything is done through the XBMC interface. Navigate to Settings -> Appearance -> International and set Kodi / XBMC time zone for your location as shown in the picture below.
In addition, you may have to set the time server in OpenELEC settings (as shown in the video below, I did not have to do this). Go to
Network and click on
Timeserver #1. Enter
pool.ntp.org and click
Done. As soon as you set it, time should automatically correct itself. Watch this method in action in the video below.
Set OpenELEC Time on Raspberry Pi 1 and 2
After setting the correct time on OpenELEC, I have rebooted my Raspberry Pi multiple times and the Kodi timezone stayed intact. This may or may not work for you but you will lose nothing but a couple minutes in trying this out.
So there you go. If this or some other method worked for you please leave a comment and share with others. Hopefully, one of these methods fixes your OpenELEC incorrect time issue.