use c++-fallback for lack of tzset-python-function
authorStefan Pluecken <stefan.pluecken@multimedia-labs.de>
Thu, 17 Nov 2005 16:28:57 +0000 (16:28 +0000)
committerStefan Pluecken <stefan.pluecken@multimedia-labs.de>
Thu, 17 Nov 2005 16:28:57 +0000 (16:28 +0000)
lib/driver/Makefile.am
lib/driver/etimezone.cpp [new file with mode: 0644]
lib/driver/etimezone.h [new file with mode: 0644]
lib/python/Components/Timezones.py
lib/python/enigma_python.i

index be453fb9b3572f415539ae17f4ef285643fba28a..227d9279a1e8a0d6465f8a18c4d7ac7866bc5d04 100644 (file)
@@ -4,4 +4,4 @@ INCLUDES = \
 noinst_LIBRARIES = libenigma_driver.a
 
 libenigma_driver_a_SOURCES = \
-       rc.cpp rcinput.cpp rcconsole.cpp avswitch.cpp rfmod.cpp
+       rc.cpp rcinput.cpp rcconsole.cpp avswitch.cpp rfmod.cpp etimezone.cpp
diff --git a/lib/driver/etimezone.cpp b/lib/driver/etimezone.cpp
new file mode 100644 (file)
index 0000000..4accdba
--- /dev/null
@@ -0,0 +1,8 @@
+#include "etimezone.h"
+
+#include <time.h>
+
+etimezone::etimezone()
+{
+       tzset();
+}
diff --git a/lib/driver/etimezone.h b/lib/driver/etimezone.h
new file mode 100644 (file)
index 0000000..081bf13
--- /dev/null
@@ -0,0 +1,11 @@
+#ifndef __etimezone_h
+#define __etimezone_h
+
+class etimezone
+{
+public:
+       etimezone();
+};
+
+#endif
+
index 6f71187b9d1dab74d13eccffbc795a1cfd3bafc9..0b6eb79bfe880b896905edf132757ae300ad3f74 100644 (file)
@@ -4,6 +4,8 @@ from xml.sax.handler import ContentHandler
 import os
 import time
 
+from enigma import *
+
 class Timezones:
        class parseTimezones(ContentHandler):
                def __init__(self, timezones):
@@ -30,7 +32,7 @@ class Timezones:
                try:
                        time.tzset()
                except:
-                       print "Timezone NOT set because your python has problems with time.tzset()"
+                       etimezone()
                
        def getTimezoneList(self):
                list = []
index eb814553b7546f38299165a8fb72ef068ff6e90d..a90e2fef707e3d7e25d51c88916ba2ccdca5753c 100644 (file)
@@ -74,6 +74,7 @@ is usually caused by not marking PSignals as immutable.
 #include <lib/dvb/frontendparms.h>
 #include <lib/driver/avswitch.h>
 #include <lib/driver/rfmod.h>
+#include <lib/driver/etimezone.h>
 #include <lib/gdi/lcd.h>
 #include <lib/dvb_ci/dvbci_ui.h>
 
@@ -168,6 +169,7 @@ typedef long time_t;
 %include <lib/dvb/frontendparms.h>
 %include <lib/driver/avswitch.h>
 %include <lib/driver/rfmod.h>
+%include <lib/driver/etimezone.h>
 %include <lib/gdi/lcd.h>
 %include <lib/dvb_ci/dvbci_ui.h>