Cubieboard – setting time zone and NTP on ubuntu

I have just bought cubieboard and installed lubuntu and I want to have synchronized time with NTP server. NTP is a TCP/IP protocol for synchronising time over a network – Network Time Protocol.

This post describes:

  • Setting the timezone
  • Configuring NTP for clock synchronization

Setting the timezone

To check the time and timezone:

more /etc/timezone

To configure timezone execute: 

sudo dpkg-reconfigure tzdata




Configuring NTP for clock synchronization

I used NTP server in Europe to synchronize time via the NTP protocol.
You can check the server for you in or just use the main NTP server:

sudo ntpdate

Main ntp servers for continents are listed bellow. If you click on the link, you will see NTP servers for countries.:

Continuously adjusts clock


1. Continuously adjusts clock using cron

To execute ntpdate in cron just create a file /etc/cron.daily/ntpdate with 775 and text /etc/cron.daily/ntpdate.

2. Continuously adjusts clock by ntpd daemon

Use ntpd if you want to have daemon that calculates the drift of your system clock and continuously adjusts it, so there are no large corrections that could lead to inconsistent logs for instance. The cost is a little processing power and memory.

Install ntpd:

sudo apt-get install ntp

Configure NTP servers in config file: /etc/ntp.conf

# Specify one or more NTP servers.

# Use servers from the NTP Pool Project. Approved by Ubuntu Technical Board
# on 2011-02-08 (LP: #104525). See for
# more information.

I made a simple one line command that configures default ubuntu NTP servers to the

sudo sed -i "" /etc/ntp.conf
# After changing the config file you have to reload the ntpd
sudo service ntp reload

You can see the status of the ntpdby ntpq command.

# sudo ntpq -p
     remote           refid      st t when poll reach   delay   offset  jitter
+betelgeuse.retr     2 u   37   64  377   26.840   -4.780   0.391
+    2 u   49   64  377    3.520   -5.018   0.387
-ntp-ext.cosng.n    2 u   45   64  377   46.128   -6.622   0.850    2 u   43   64  377   22.228   -2.890   0.286
*golem.canonical    2 u   33   64  377   29.205   -4.021   0.465

Although, I’m not sure what that status means. 😉