Airtime for Broadcasters

Setting the server time

Accurate time keeping on your server is vital for optimal Airtime performance. You can confirm that the date and time of your server are set correctly with the date command:

$ date

The server should respond with the date, time, time zone and year in a format similar to the following example:

Mon Mar  7 14:59:17 GMT 2011

The time zone reported should match the continent and city set in the .htaccess file during Airtime installation, such as GMT in the example above matching Europe/London. If not, see the section Adjusting the server time zone below.

Although it is possible to set the date and time of the server manually, this is not recommended because the server clock can drift over time, compromising the accuracy of your broadcast schedule. If your Airtime server is permanently connected to the Internet, you can synchronize your server to a time server with the ntp program. If ntp is not yet installed, you can enter the following command on Debian or Ubuntu:

$ sudo apt-get install ntp

Optionally, open the ntp configuration file in the nano editor to add further time server names:

$ sudo nano /etc/ntp.conf

On Ubuntu GNU/Linux, the default time server is, but there are many other time servers available on the public Internet, including the group of servers listed at for each country. Using a variety of NTP servers located closely to your Airtime server will produce the most accurate results. For example, for a server in the United Kingdom you could use the following list:

# You do need to talk to an NTP server or two (or three).

Enter the server names you require, press Ctrl+O to write out the /etc/ntp.conf file, then Ctrl+X to exit nano. Restart the ntp service with:

$ sudo service ntp restart

The server should respond:

* Stopping NTP server ntpd                                 [ OK ]
* Starting NTP server ntpd                                 [ OK ]

Then use the ntpq -p command to confirm that ntp is working. This command should produce output similar to the following screenshot:

Adjusting the server time zone 

If your server is set to a different time zone than the one that you set during Airtime installation, your broadcast schedule may be played out at incorrect times. The datacenter which hosts your Airtime server could be located anywhere in the world. Some servers are set to Coordinated Universal Time or UTC (similar to Greenwich Mean Time or GMT), regardless of their location. If this is not appropriate for your station, on a Debian or Ubuntu server you can reconfigure the tzdata (time zone data) package with the command:

$ sudo dpkg-reconfigure tzdata

This command opens a menu in which you can select the continent that you require, by pressing the Enter key.


The next step is to select your nearest city, again by pressing the Enter key. The appropriate time zone is selected according to the information that you have entered.


The console output from the dpkg-reconfigure tzdata command will confirm the new setting. 

Current default time zone: 'Europe/London'
Local time is now:      Mon Mar  7 15:04:58 GMT 2011.
Universal Time is now:  Mon Mar  7 15:04:58 UTC 2011.