Index: libs/libmythtv/channelsettings.cpp
===================================================================
--- libs/libmythtv/channelsettings.cpp	(revision 9270)
+++ libs/libmythtv/channelsettings.cpp	(working copy)
@@ -82,6 +82,19 @@
     };
 };
 
+class TimeOffset: public SpinBoxSetting, public CSetting {
+public:
+    TimeOffset(const ChannelID& id):
+        SpinBoxSetting(-1440, 1440, 1), CSetting(id, "tmoffset") {
+        setLabel(QObject::tr("DataDirect") + " " + QObject::tr("Time Offset"));
+        setHelpText(QObject::tr("Offset (in minutes) to apply to the program "
+                    "guide data during import.  This can be used when the "
+                    "listings for a particular channel are in a different "
+                    "time zone.") + " " +
+                    QObject::tr("(Works for DataDirect listings only.)"));
+    };
+};
+
 class Rank: public SpinBoxSetting, public CSetting {
 public:
     Rank(const ChannelID& id):
@@ -284,6 +297,7 @@
     connect(source,SIGNAL(valueChanged(const QString&)),this,SLOT(sourceChanged(const QString&)));
 #else
     addChild(new XmltvID(id));
+    addChild(new TimeOffset(id));
 #endif
 };
 
@@ -347,3 +361,5 @@
     addChild(new Colour(id));
     addChild(new Hue(id));
 };
+
+/* vim: set expandtab tabstop=4 shiftwidth=4: */
Index: libs/libmythtv/dbcheck.cpp
===================================================================
--- libs/libmythtv/dbcheck.cpp	(revision 9270)
+++ libs/libmythtv/dbcheck.cpp	(working copy)
@@ -10,7 +10,7 @@
 #include "mythdbcon.h"
 
 /// This is the DB schema version expected by the running MythTV instance.
-const QString currentDatabaseVersion = "1129";
+const QString currentDatabaseVersion = "1130";
 
 static bool UpdateDBVersionNumber(const QString &newnumber);
 static bool performActualUpdate(const QString updates[], QString version,
@@ -240,6 +240,11 @@
 The 'xmltvid' field is used to identify this channel to the listings
 provider.
 
+The 'tmoffset' field is used to apply an offset (in minutes) from the listings
+provided by the provider to a new time in the MythTV program guide database.
+This is very handy when the listings provider has listings which are offset
+by a few hours on individual channels with the rest of them being correct.
+
 The 'recpriority' field is used tell the scheduler from which of two 
 otherwise equivalent programs on two different channels should be 
 prefered, a higher number means this channel is more preferred.
@@ -2112,6 +2117,17 @@
             return false;
     }
 
+    if (dbver == "1129")
+    {
+        const QString updates[] = {
+"ALTER TABLE channel ADD COLUMN tmoffset INT NOT NULL default '0';",
+""
+};
+
+        if (!performActualUpdate(updates, "1130", dbver))
+            return false;
+    }
+
 //"ALTER TABLE capturecard DROP COLUMN dvb_recordts;" in 0.21
 //"ALTER TABLE capturecard DROP COLUMN dvb_hw_decoder;" in 0.21
 
Index: programs/mythfilldatabase/filldata.cpp
===================================================================
--- programs/mythfilldatabase/filldata.cpp	(revision 9270)
+++ programs/mythfilldatabase/filldata.cpp	(working copy)
@@ -988,16 +988,19 @@
                     "hdtv, closecaptioned, partnumber, parttotal, seriesid, "
                     "originalairdate, colorcode, syndicatedepisodenumber, "
                     "programid) "
-                    "SELECT chanid, starttime, endtime, "
+                    "SELECT dd_v_program.chanid, "
+                    "DATE_ADD(starttime, INTERVAL channel.tmoffset MINUTE), "
+                    "DATE_ADD(endtime, INTERVAL channel.tmoffset MINUTE), "
                     "title, subtitle, description, "
                     "showtype, dd_genre.class, category_type, "
                     "airdate, stars, previouslyshown, stereo, subtitled, "
                     "hdtv, closecaptioned, partnumber, parttotal, seriesid, "
                     "originalairdate, colorcode, syndicatedepisodenumber, "
-                    "dd_v_program.programid FROM dd_v_program "
+                    "dd_v_program.programid FROM dd_v_program, channel "
                     "LEFT JOIN dd_genre ON ("
                     "dd_v_program.programid = dd_genre.programid AND "
-                    "dd_genre.relevance = '0');"))
+                    "dd_genre.relevance = '0') "
+                    "WHERE dd_v_program.chanid = channel.chanid;"))
         MythContext::DBError("Inserting into program table", query);
 
     //cerr << "Finished adding rows to main program table...\n";
