[mythtv-users] Guide data until 2038

Neil Milne neil.milne at gmail.com
Tue Oct 16 09:00:50 UTC 2007


Try this - works for me:

Create a text file using your favourite editor - call it epg_clean.sql
In the file put this:
delete from program where starttime >= adddate(current_date(),interval 14 day);

(I know, it's different from the other sql, as it only clears out
extraneous schedule data in the future).

Then, run this from the command line:
/usr/bin/mysql < epg_clean.sql

Assuming you have a .my.cnf file in your home directory with the
correct username and password settings for your mysql database then
this will run and clear out the dodgy schedule entries.

I actually run this from cron after my manual mythfilldatabase run each night.

HTH
Neil

On 16/10/2007, Ian Hodgson <ian.hodgson at dsl.pipex.com> wrote:
>
>
> Hello,
>     Earlier this year, there was a post asking about a way to solve Myth
> reporting that it had TV guide data until 2038. The solution posted was to
> tidy the database with the following SQL script...
>
>  delete from program where starttime < date_sub(curdate(), interval 1 day)
> or starttime > date_add(curdate(), interval 14 day);
>
> I also have the '2038 problem' but have no idea of how to execute the script
> supplied to the previous poster. Can anyone help with the full sequence of
> commands so that I can correct the error in my database.
>

-- 
Neil Milne


More information about the mythtv-users mailing list