[mythtv] Current CVS Doesn't Compile on QT 3.0

Chris Pinkham cpinkham at bc2va.org
Sat Jul 26 13:39:18 EDT 2003


I'd like to keep 3.0 support around for a while longer.  All my 'production'
Myth boxes have 3.0 on them and I don't feel like going around and
upgrading them all for what could be fixed in 4 lines of code. :)

I think the diff below would fix it if anyone wants to give it a shot.
Can someone who needs the "Auto" timezone offset stuff check this out
on their system and see if it works or if localTimezoneOffset needs
to be negated?  My qt 3.1.x machine is down right now or I could check it
out myself.

------cut here--------------
retrieving revision 1.58
diff -u -r1.58 filldata.cpp
--- programs/mythfilldatabase/filldata.cpp  21 Jul 2003 20:01:02 -0000  1.58
+++ programs/mythfilldatabase/filldata.cpp  26 Jul 2003 16:28:26 -0000
@@ -19,6 +19,7 @@
 #include <unistd.h>
 #include <stdlib.h>
 #include <stdio.h>
+#include <time.h>

 #include "libmyth/mythcontext.h"

@@ -509,9 +510,13 @@
     }
     else if (config_offset == "Auto")
     {
-        QDateTime utcdt = QDateTime::currentDateTime(Qt::UTC);
-        QDateTime ldt = QDateTime::currentDateTime();
-        localTimezoneOffset = utcdt.secsTo(ldt) / 3600;
+//        QDateTime utcdt = QDateTime::currentDateTime(Qt::UTC);
+//        QDateTime ldt = QDateTime::currentDateTime();
+//        localTimezoneOffset = utcdt.secsTo(ldt) / 3600;
+        time_t now = time(NULL);
+        struct tm local_tm;
+        localtime_r(&now, &local_tm);
+        localTimezoneOffset = local_tm.tm_gmtoff / 3600;
     }
     else
     {
------cut here--------------

> On Thu, Jul 24, 2003 at 10:32:16AM -0400, Isaac Richards wrote:
> 
> > I'm pondering dropping support for qt 3.0.  Haven't decided yet, but 3.1
> > was released last November, and 3.2 was just put out yesterday.  Seems
> > silly to keep working around things for 3.0.
> 
> FWIW, if myth stops supporting Qt 3.0, I'm not planning to maintain a
> backport of 3.1 to Debian woody, so I would drop the woody packages.
> 
> If someone else wanted to step up to maintain a Qt backport, I would host it
> on my server and continue to build mythtv packages for woody.
> 
> -- 
>  - mdz

-- 

Chris



More information about the mythtv-dev mailing list