Synchronize a Linux box to a digital TV signal

I remembered seeing some command which could synchronize the system clock to the digital TV (DVB) signal. This is ideal for a MythTV box which isn’t connected to the internet.  It’s dvbdate. One problem: it ignores the system time zone. It can use the TZ environment variable, whose current value can be obtained using the date command:

date +'%z'

so this will set the date:

sudo TZ=$(date +'%:z') dvbdate --set

so you can put this script in /etc/cron.hourly, and make it executable:

#!/bin/sh -e
TZ=$(date +'%:z') dvbdate --set

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

<span>%d</span> bloggers like this: