Re: [mythtv-users] Re: DVB summer time
Robin Elvin wrote: On Thursday 31 March 2005 08:34, David Morrison wrote: Robin Elvin wrote: Here in Australia I noticed my time was out by 1 Hr as we just left Summer Time, I went into 'mythsetup' and found that I had the GMT time offset at "+1100", once I changed this to "AUTO" the time offset was corrected. my system clock is setup for UTC and local time for Aust/Vic. ___ mythtv-users mailing list mythtv-users@mythtv.org http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users Excellent thanks! I had mine set to Auto so I changed it to None and all my listings are back to normal. Dave ___ mythtv-users mailing list mythtv-users@mythtv.org http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users Changed mine from Auto to None and it worked for me too. Hey, who is quoting posts here, the original in not a "Robin Elvin" post here but mine, I guess robin's post has ben deleted and my headers ?? ___ mythtv-users mailing list mythtv-users@mythtv.org http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
Re: [mythtv-users] Re: DVB summer time
I had mine set to Auto so I changed it to None and all my listings are back to normal. Dave ___ mythtv-users mailing list mythtv-users@mythtv.org http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users Changed mine from Auto to None and it worked for me too. Well I broke mine again. After finding that I could grab listings over the air using my DVB card I recompiled and now nothing I do can get the times correct. I've tried adjusting the TZ settings within MythTV from None to Auto to +2:00 and nothing seems to change the times. Perhaps it is bypassing this if you grab listings from over the air? Here's some background information to see if anything stands out as being wrong. hwclock: Fri Apr 1 09:51:37 2005 date -R: Fri, 01 Apr 2005 09:51:55 +0100 dvbdate: Fri Apr 1 09:51:42 2005 -0.983842 seconds ls /etc/localtime -l lrwxrwxrwx 1 root root 22 Mar 31 08:17 /etc/localtime - /usr/share/zoneinfo/GB Dave ___ mythtv-users mailing list mythtv-users@mythtv.org http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
[mythtv-users] Re: DVB summer time
When you view the details of a particular channel in mythsetup, there should be a checkbox that says something like 'use on-air guide'. Just make sure that it's enabled - you also need to make sure that the setting for 'use dvb card on demand' is set to off - i.e. the backend always has access to the dvb card. You might have to restart the backend now. Then it's just a case of waiting - within five mins or so, you're guide data will just magically appear. No need to run mythfilldatabase etc - so take it out of the mythfrontend configuration or any cronjobs that you might have setup. Correct me if I'm wrong.. But disenabling 'use dvb card on demand' causes the dvb card(s) to run hot all the time, and that is not good for a quiet, long lasting system. At least this was the case down 0.15. Sami Rppnen ___ mythtv-users mailing list mythtv-users@mythtv.org http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
Re: [mythtv-users] Re: DVB summer time
Jit V wrote: I'm using the on-air dvb stuff that is built into mythtv 0.17, rather than the tv_grab_dvb utility. How does this work and how do I use it?! Dave ___ mythtv-users mailing list mythtv-users@mythtv.org http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
Re: [mythtv-users] Re: DVB summer time
Jit V wrote: I'm using the on-air dvb stuff that is built into mythtv 0.17, rather than the tv_grab_dvb utility. How does this work and how do I use it?! When you view the details of a particular channel in mythsetup, there should be a checkbox that says something like 'use on-air guide'. Just make sure that it's enabled - you also need to make sure that the setting for 'use dvb card on demand' is set to off - i.e. the backend always has access to the dvb card. You might have to restart the backend now. Then it's just a case of waiting - within five mins or so, you're guide data will just magically appear. No need to run mythfilldatabase etc - so take it out of the mythfrontend configuration or any cronjobs that you might have setup. ___ mythtv-users mailing list mythtv-users@mythtv.org http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users Hi, Thanks. I figured out that I didn't have the DVB on air guide setting in settings.pro, added that and recompiled and it's working nicely. Dave ___ mythtv-users mailing list mythtv-users@mythtv.org http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
Re: [mythtv-users] Re: DVB summer time
On Thursday 31 March 2005 08:34, David Morrison wrote: Robin Elvin wrote: Here in Australia I noticed my time was out by 1 Hr as we just left Summer Time, I went into 'mythsetup' and found that I had the GMT time offset at +1100, once I changed this to AUTO the time offset was corrected. my system clock is setup for UTC and local time for Aust/Vic. ___ mythtv-users mailing list mythtv-users@mythtv.org http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users Excellent thanks! I had mine set to Auto so I changed it to None and all my listings are back to normal. Dave ___ mythtv-users mailing list mythtv-users@mythtv.org http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users Changed mine from Auto to None and it worked for me too. -- Rob ___ mythtv-users mailing list mythtv-users@mythtv.org http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
[mythtv-users] Re: DVB summer time
It looks like other people using the new version of QT are having issues, see: http://lists.kde.org/?l=kde-bugs-distm=28897621777w=2 ___ mythtv-users mailing list mythtv-users@mythtv.org http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
Re: [mythtv-users] Re: DVB summer time
Jon Dye wrote: I was running stock 0.17 on gentoo, 2.6.10 kernel, QT 3.3.4 (3.3.4-r2 according to gentoo) and /etc/localtime points to Europe/London. I wonder if it's QT that is causing my problem. My hack for myth has fixed it for me for now so I'll leave it how it is until I get enough time to play with different versions of QT. JD Total shot in the dark here, but how many of the people having problems have got their hardware clock set to local time, rather than UTC/GMT ? J ___ mythtv-users mailing list mythtv-users@mythtv.org http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
[mythtv-users] Re: DVB summer time
Julian Edwards wrote: Total shot in the dark here, but how many of the people having problems have got their hardware clock set to local time, rather than UTC/GMT ? Mine is set to UTC. JD -- At the source of every error which is blamed on the computer you will find at least two human errors, including the error of blaming it on the computer! smime.p7s Description: S/MIME Cryptographic Signature ___ mythtv-users mailing list mythtv-users@mythtv.org http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
Re: [mythtv-users] Re: DVB summer time
On Wed, 30 Mar 2005 21:10:58 +0100, Jon Dye [EMAIL PROTECTED] wrote: Julian Edwards wrote: Total shot in the dark here, but how many of the people having problems have got their hardware clock set to local time, rather than UTC/GMT ? Mine is set to UTC. This probably won't apply to most people either, but if you dual boot with windows it will reset the BIOS to local everytime it boots. This means your local timezone setting is actually correcting a time that is already local and so it's an hour out - basically if you're dual booting on your mythbox (with windows at least) then use local. ___ mythtv-users mailing list mythtv-users@mythtv.org http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
Re: [mythtv-users] Re: DVB summer time
Julian Edwards wrote: Jon Dye wrote: I was running stock 0.17 on gentoo, 2.6.10 kernel, QT 3.3.4 (3.3.4-r2 according to gentoo) and /etc/localtime points to Europe/London. I wonder if it's QT that is causing my problem. My hack for myth has fixed it for me for now so I'll leave it how it is until I get enough time to play with different versions of QT. JD Total shot in the dark here, but how many of the people having problems have got their hardware clock set to local time, rather than UTC/GMT ? J ___ mythtv-users mailing list mythtv-users@mythtv.org http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users I'm seeing this problem too, anyone know how to fix it? My hwclock is set to UTC and my localtime is London. All listings coming out of tv_grab_dvb contain the correct time but listings are out by one hour (too early). Dave ___ mythtv-users mailing list mythtv-users@mythtv.org http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
Re: [mythtv-users] Re: DVB summer time
On Wednesday 30 March 2005 22:30, David Morrison wrote: Julian Edwards wrote: Jon Dye wrote: I was running stock 0.17 on gentoo, 2.6.10 kernel, QT 3.3.4 (3.3.4-r2 according to gentoo) and /etc/localtime points to Europe/London. I wonder if it's QT that is causing my problem. My hack for myth has fixed it for me for now so I'll leave it how it is until I get enough time to play with different versions of QT. JD Total shot in the dark here, but how many of the people having problems have got their hardware clock set to local time, rather than UTC/GMT ? J ___ mythtv-users mailing list mythtv-users@mythtv.org http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users I'm seeing this problem too, anyone know how to fix it? My hwclock is set to UTC and my localtime is London. All listings coming out of tv_grab_dvb contain the correct time but listings are out by one hour (too early). Dave ___ mythtv-users mailing list mythtv-users@mythtv.org http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users Ditto. I've downgraded QT to 3.3.3 and that made no difference. I'm really getting frustrated by this one! Incidentally, how is everyone getting their recordings while this is happening? I have to manually adjust the recording start and end time each time. Is there a better quick hack? -- Rob ___ mythtv-users mailing list mythtv-users@mythtv.org http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
Re: [mythtv-users] Re: DVB summer time
Robin Elvin wrote: On Wednesday 30 March 2005 22:30, David Morrison wrote: Julian Edwards wrote: Jon Dye wrote: I was running stock 0.17 on gentoo, 2.6.10 kernel, QT 3.3.4 (3.3.4-r2 according to gentoo) and /etc/localtime points to Europe/London. I wonder if it's QT that is causing my problem. My hack for myth has fixed it for me for now so I'll leave it how it is until I get enough time to play with different versions of QT. JD Total shot in the dark here, but how many of the people having problems have got their hardware clock set to local time, rather than UTC/GMT ? J ___ mythtv-users mailing list mythtv-users@mythtv.org http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users I'm seeing this problem too, anyone know how to fix it? My hwclock is set to UTC and my localtime is London. All listings coming out of tv_grab_dvb contain the correct time but listings are out by one hour (too early). Dave ___ mythtv-users mailing list mythtv-users@mythtv.org http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users Ditto. I've downgraded QT to 3.3.3 and that made no difference. I'm really getting frustrated by this one! Incidentally, how is everyone getting their recordings while this is happening? I have to manually adjust the recording start and end time each time. Is there a better quick hack? Here in Australia I noticed my time was out by 1 Hr as we just left Summer Time, I went into 'mythsetup' and found that I had the GMT time offset at +1100, once I changed this to AUTO the time offset was corrected. my system clock is setup for UTC and local time for Aust/Vic. ___ mythtv-users mailing list mythtv-users@mythtv.org http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
Re: [mythtv-users] Re: DVB summer time
Robin Elvin wrote: Here in Australia I noticed my time was out by 1 Hr as we just left Summer Time, I went into 'mythsetup' and found that I had the GMT time offset at +1100, once I changed this to AUTO the time offset was corrected. my system clock is setup for UTC and local time for Aust/Vic. ___ mythtv-users mailing list mythtv-users@mythtv.org http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users Excellent thanks! I had mine set to Auto so I changed it to None and all my listings are back to normal. Dave ___ mythtv-users mailing list mythtv-users@mythtv.org http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
[mythtv-users] RE: DVB summer time
I have the same problem, I tried adjusting the timezone back to UTC and clearing the database but it didn't make a difference. I then tried adjusting the TimeOffset setting in the database (XMLTV time offset in the setup program) and that made no difference either. Strange, all I needed to do was change the /etc/localtime to point back to GMT - it looks like the times held in the DB for me are in GMT regardless of what the localtime is set to, which meant that I didn't need to clear out the program table again. As for dvbdate - it seems to work correctly regardless of the timezone settings :) Thanks ___ mythtv-users mailing list mythtv-users@mythtv.org http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
Re: [mythtv-users] Re: DVB summer time
On Mon, 2005-03-28 at 23:32 +0100, Jon Dye wrote: Steve Hayles wrote: I use a CVS version from around two months ago and use the DVBDATE utility from the LinuxTV utilities to set the time. My cron job ran as normal the morning of the clock change and everything continued to work perfectly. Running dvbdate --set within the script that I use to update the EPG and backup the database seems to work perfectly. I am also using dvbdate to set the time on my box. The time is correct, it's only the time of the shows in the EPG that are out by an hour. Are you are using mythfilldatabase to fill the EPG? The issue I am talking about only effects the built in function to pull the EPG data from the the digital TV signal (DVB). mythfilldatabase has it's own correction for daylight saving that is seperate from the built in stuff (and did previously have errors occording to google but I think they are all fixed now). I'm running, stock 0.17, and cvs with the internal DVB EIT stuff. I do not see these problems. John Pullan [EMAIL PROTECTED] ___ mythtv-users mailing list mythtv-users@mythtv.org http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
[mythtv-users] Re: DVB summer time
John Pullan wrote: On Mon, 2005-03-28 at 23:32 +0100, Jon Dye wrote: Steve Hayles wrote: I use a CVS version from around two months ago and use the DVBDATE utility from the LinuxTV utilities to set the time. My cron job ran as normal the morning of the clock change and everything continued to work perfectly. Running dvbdate --set within the script that I use to update the EPG and backup the database seems to work perfectly. I am also using dvbdate to set the time on my box. The time is correct, it's only the time of the shows in the EPG that are out by an hour. Are you are using mythfilldatabase to fill the EPG? The issue I am talking about only effects the built in function to pull the EPG data from the the digital TV signal (DVB). mythfilldatabase has it's own correction for daylight saving that is seperate from the built in stuff (and did previously have errors occording to google but I think they are all fixed now). I'm running, stock 0.17, and cvs with the internal DVB EIT stuff. I do not see these problems. Where are you? The time stuff seems to be a problem in Europe (at least Amsterdam and London that I've tried) but not the US (or at least NY). Having said that it's entirely possible it's a QT bug and you may have a different version. JD ___ mythtv-users mailing list mythtv-users@mythtv.org http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
Re: [mythtv-users] Re: DVB summer time
On Tue, 2005-03-29 at 16:55 +0100, Jon Dye wrote: John Pullan wrote: On Mon, 2005-03-28 at 23:32 +0100, Jon Dye wrote: Steve Hayles wrote: I use a CVS version from around two months ago and use the DVBDATE utility from the LinuxTV utilities to set the time. My cron job ran as normal the morning of the clock change and everything continued to work perfectly. Running dvbdate --set within the script that I use to update the EPG and backup the database seems to work perfectly. I am also using dvbdate to set the time on my box. The time is correct, it's only the time of the shows in the EPG that are out by an hour. Are you are using mythfilldatabase to fill the EPG? The issue I am talking about only effects the built in function to pull the EPG data from the the digital TV signal (DVB). mythfilldatabase has it's own correction for daylight saving that is seperate from the built in stuff (and did previously have errors occording to google but I think they are all fixed now). I'm running, stock 0.17, and cvs with the internal DVB EIT stuff. I do not see these problems. Where are you? The time stuff seems to be a problem in Europe (at least Amsterdam and London that I've tried) but not the US (or at least NY). Having said that it's entirely possible it's a QT bug and you may have a different version. Yorkshire :) After all the dire-warnings earlier on in the week about qt-3.3.4 (?) I stuck with version qt-3.3.3-8 John Pullan [EMAIL PROTECTED] ___ mythtv-users mailing list mythtv-users@mythtv.org http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
Re: [mythtv-users] Re: DVB summer time
I'm in London and everything automagically changed overnight without me touching anything, I wasn't even home to check - I just got back after Easter and all my recordings happened when they should have and the EIT guide isn't offset at all. I'm running stock 0.17 on gentoo, 2.6.7 kernel, QT 3.3.2 and /etc/localtime points to Europe/London. ___ mythtv-users mailing list mythtv-users@mythtv.org http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
[mythtv-users] Re: DVB summer time
Peter Dash wrote: I'm in London and everything automagically changed overnight without me touching anything, I wasn't even home to check - I just got back after Easter and all my recordings happened when they should have and the EIT guide isn't offset at all. I'm running stock 0.17 on gentoo, 2.6.7 kernel, QT 3.3.2 and /etc/localtime points to Europe/London. I was running stock 0.17 on gentoo, 2.6.10 kernel, QT 3.3.4 (3.3.4-r2 according to gentoo) and /etc/localtime points to Europe/London. I wonder if it's QT that is causing my problem. My hack for myth has fixed it for me for now so I'll leave it how it is until I get enough time to play with different versions of QT. JD -- There are two ways of constructing a software design. One way is to make it so simple that there are obviously no deficiencies and the other way is to make it so complicated that there are no obvious deficiancies. - C. A. R. Hoare smime.p7s Description: S/MIME Cryptographic Signature ___ mythtv-users mailing list mythtv-users@mythtv.org http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
[mythtv-users] Re: DVB summer time
I've reverted back to using GMT - all the times being displayed are one hour early, but everything seems to work - i.e. recordings kick off when they're supposed to. Would be nice to be able to get a 'proper' fix for this. ___ mythtv-users mailing list mythtv-users@mythtv.org http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
[mythtv-users] Re: DVB summer time
Verteiler wrote: Jit V wrote: Today I switched my Gentoo box from using a localtime of GMT to London - which now correctly gives the localtime as BST. The time is also correctly displayed in mythtv, but all of the on-air dvb guide data is off by 1 hour. Any ideas on how to fix this? I've already tried to remove all program data, but the newly inserted data is still off by one hour. Same thing here. After adjusting daylight saving time the entire program guide is off by an hour I have the same problem, I tried adjusting the timezone back to UTC and clearing the database but it didn't make a difference. I then tried adjusting the TimeOffset setting in the database (XMLTV time offset in the setup program) and that made no difference either. I then had a look a the code that inserts the DVB EPG information in the database and it appears to be doing a timezone adjustment but I think there may be a bug in Qt or maybe the docs are just unclear. I wrote a small program to compare the results of myth's timezone adjustment (as used in SIParser::ConvertDVBDate) to the localtime and UTC time results returned by QT's QDateTime::currentDateTime and the results were odd: bash-2.05b$ export TZ=Europe/London bash-2.05b$ ./QDateTimetest UTC(qt):Mon Mar 28 17:51:47 2005 Local(qt): Mon Mar 28 18:51:47 2005 Local(myth):Mon Mar 28 17:51:48 2005 Local(custom): Mon Mar 28 18:51:47 2005 bash-2.05b$ export TZ=Europe/Amsterdam bash-2.05b$ ./QDateTimetest UTC(qt):Mon Mar 28 17:51:52 2005 Local(qt): Mon Mar 28 19:51:52 2005 Local(myth):Mon Mar 28 17:51:53 2005 Local(custom): Mon Mar 28 19:51:52 2005 bash-2.05b$ export TZ=America/New_York bash-2.05b$ ./QDateTimetest UTC(qt):Mon Mar 28 17:51:58 2005 Local(qt): Mon Mar 28 12:51:58 2005 Local(myth):Mon Mar 28 12:51:58 2005 Local(custom): Mon Mar 28 12:51:58 2005 Basically I think the way myth uses QT to convert the dates screws up daylight saving time (maybe only for Europe, is the US on daylight saving yet?) The custom lines above are using a conversion I wrote which uses the timezone offset at the current time (as opposed to the time of the scheduled program). This new conversion method has fixed my problem for now and I've attached my test program and a patch for myth to use my routine. JD Index: siparser.cpp === RCS file: /var/lib/mythcvs/mythtv/libs/libmythtv/siparser.cpp,v retrieving revision 1.7 diff -u -r1.7 siparser.cpp --- mythtv/libs/libmythtv/siparser.cpp 23 Feb 2005 05:04:36 - 1.7 +++ mythtv/libs/libmythtv/siparser.cpp 28 Mar 2005 17:59:13 - @@ -931,17 +931,11 @@ QDateTime UTCTime = QDateTime(QDate(year,month,day),QTime(hour,min,sec)); // Convert to localtime -QDateTime EPOCTime = QDateTime(QDate(1970, 1, 1)); -int timesecs = EPOCTime.secsTo(UTCTime); +uint const TimeAdj = +QDateTime::currentDateTime(Qt::LocalTime).toTime_t() +- QDateTime::currentDateTime(Qt::UTC).toTime_t(); -QDateTime LocalTime; - -LocalTime.setTime_t(timesecs); - -QString UTCText = UTCTime.toString(); -QString LocalText = LocalTime.toString(); - -return LocalTime; +return UTCTime.addSecs(TimeAdj); } #include qdatetime.h #include iostream QDateTime GetMythLocalTime(QDateTime const UTCTime) { // Convert to localtime QDateTime EPOCTime = QDateTime(QDate(1970, 1, 1)); int timesecs = EPOCTime.secsTo(UTCTime); QDateTime LocalTime; LocalTime.setTime_t(timesecs); return LocalTime; } QDateTime GetLocalTime(QDateTime const UTCTime) { uint const TimeAdj = QDateTime::currentDateTime(Qt::LocalTime).toTime_t() - QDateTime::currentDateTime(Qt::UTC).toTime_t(); return UTCTime.addSecs(TimeAdj); } int main() { QDateTime const nowUTC = QDateTime::currentDateTime(Qt::UTC); QDateTime const nowLocalTime = QDateTime::currentDateTime(); std::cout UTC(qt): \t nowUTC.toString() \n Local(qt):\t nowLocalTime.toString() \n Local(myth): \t GetMythLocalTime(nowUTC).toString() \n Local(custom):\t GetLocalTime(nowUTC).toString() std::endl; } smime.p7s Description: S/MIME Cryptographic Signature ___ mythtv-users mailing list mythtv-users@mythtv.org http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
Re: [mythtv-users] Re: DVB summer time
FYI, I use a CVS version from around two months ago and use the DVBDATE utility from the LinuxTV utilities to set the time. My cron job ran as normal the morning of the clock change and everything continued to work perfectly. Running dvbdate --set within the script that I use to update the EPG and backup the database seems to work perfectly. If anyone wants any more info about my setup then please let me know On Mon, 28 Mar 2005 23:07:14 +0100, Jon Dye [EMAIL PROTECTED] wrote: Verteiler wrote: Jit V wrote: Today I switched my Gentoo box from using a localtime of GMT to London - which now correctly gives the localtime as BST. The time is also correctly displayed in mythtv, but all of the on-air dvb guide data is off by 1 hour. Any ideas on how to fix this? I've already tried to remove all program data, but the newly inserted data is still off by one hour. Same thing here. After adjusting daylight saving time the entire program guide is off by an hour I have the same problem, I tried adjusting the timezone back to UTC and clearing the database but it didn't make a difference. I then tried adjusting the TimeOffset setting in the database (XMLTV time offset in the setup program) and that made no difference either. I then had a look a the code that inserts the DVB EPG information in the database and it appears to be doing a timezone adjustment but I think there may be a bug in Qt or maybe the docs are just unclear. I wrote a small program to compare the results of myth's timezone adjustment (as used in SIParser::ConvertDVBDate) to the localtime and UTC time results returned by QT's QDateTime::currentDateTime and the results were odd: bash-2.05b$ export TZ=Europe/London bash-2.05b$ ./QDateTimetest UTC(qt):Mon Mar 28 17:51:47 2005 Local(qt): Mon Mar 28 18:51:47 2005 Local(myth):Mon Mar 28 17:51:48 2005 Local(custom): Mon Mar 28 18:51:47 2005 bash-2.05b$ export TZ=Europe/Amsterdam bash-2.05b$ ./QDateTimetest UTC(qt):Mon Mar 28 17:51:52 2005 Local(qt): Mon Mar 28 19:51:52 2005 Local(myth):Mon Mar 28 17:51:53 2005 Local(custom): Mon Mar 28 19:51:52 2005 bash-2.05b$ export TZ=America/New_York bash-2.05b$ ./QDateTimetest UTC(qt):Mon Mar 28 17:51:58 2005 Local(qt): Mon Mar 28 12:51:58 2005 Local(myth):Mon Mar 28 12:51:58 2005 Local(custom): Mon Mar 28 12:51:58 2005 Basically I think the way myth uses QT to convert the dates screws up daylight saving time (maybe only for Europe, is the US on daylight saving yet?) The custom lines above are using a conversion I wrote which uses the timezone offset at the current time (as opposed to the time of the scheduled program). This new conversion method has fixed my problem for now and I've attached my test program and a patch for myth to use my routine. JD Index: siparser.cpp === RCS file: /var/lib/mythcvs/mythtv/libs/libmythtv/siparser.cpp,v retrieving revision 1.7 diff -u -r1.7 siparser.cpp --- mythtv/libs/libmythtv/siparser.cpp 23 Feb 2005 05:04:36 - 1.7 +++ mythtv/libs/libmythtv/siparser.cpp 28 Mar 2005 17:59:13 - @@ -931,17 +931,11 @@ QDateTime UTCTime = QDateTime(QDate(year,month,day),QTime(hour,min,sec)); // Convert to localtime -QDateTime EPOCTime = QDateTime(QDate(1970, 1, 1)); -int timesecs = EPOCTime.secsTo(UTCTime); +uint const TimeAdj = +QDateTime::currentDateTime(Qt::LocalTime).toTime_t() +- QDateTime::currentDateTime(Qt::UTC).toTime_t(); -QDateTime LocalTime; - -LocalTime.setTime_t(timesecs); - -QString UTCText = UTCTime.toString(); -QString LocalText = LocalTime.toString(); - -return LocalTime; +return UTCTime.addSecs(TimeAdj); } #include qdatetime.h #include iostream QDateTime GetMythLocalTime(QDateTime const UTCTime) { // Convert to localtime QDateTime EPOCTime = QDateTime(QDate(1970, 1, 1)); int timesecs = EPOCTime.secsTo(UTCTime); QDateTime LocalTime; LocalTime.setTime_t(timesecs); return LocalTime; } QDateTime GetLocalTime(QDateTime const UTCTime) { uint const TimeAdj = QDateTime::currentDateTime(Qt::LocalTime).toTime_t() - QDateTime::currentDateTime(Qt::UTC).toTime_t(); return UTCTime.addSecs(TimeAdj); } int main() { QDateTime const nowUTC = QDateTime::currentDateTime(Qt::UTC); QDateTime const nowLocalTime = QDateTime::currentDateTime(); std::cout UTC(qt): \t nowUTC.toString() \n Local(qt):\t nowLocalTime.toString() \n Local(myth): \t GetMythLocalTime(nowUTC).toString() \n Local(custom):\t GetLocalTime(nowUTC).toString() std::endl; } ___
[mythtv-users] Re: DVB summer time
Steve Hayles wrote: I use a CVS version from around two months ago and use the DVBDATE utility from the LinuxTV utilities to set the time. My cron job ran as normal the morning of the clock change and everything continued to work perfectly. Running dvbdate --set within the script that I use to update the EPG and backup the database seems to work perfectly. I am also using dvbdate to set the time on my box. The time is correct, it's only the time of the shows in the EPG that are out by an hour. Are you are using mythfilldatabase to fill the EPG? The issue I am talking about only effects the built in function to pull the EPG data from the the digital TV signal (DVB). mythfilldatabase has it's own correction for daylight saving that is seperate from the built in stuff (and did previously have errors occording to google but I think they are all fixed now). JD -- There are two ways of constructing a software design. One way is to make it so simple that there are obviously no deficiencies and the other way is to make it so complicated that there are no obvious deficiancies. - C. A. R. Hoare smime.p7s Description: S/MIME Cryptographic Signature ___ mythtv-users mailing list mythtv-users@mythtv.org http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users