From: Stefan Pluecken Date: Thu, 17 Nov 2005 16:28:57 +0000 (+0000) Subject: use c++-fallback for lack of tzset-python-function X-Git-Tag: 2.6.0~5110 X-Git-Url: https://git.cweiske.de/enigma2.git/commitdiff_plain/d0ca21133e420f63c90d44e6b8bd23273e2ffd58 use c++-fallback for lack of tzset-python-function --- diff --git a/lib/driver/Makefile.am b/lib/driver/Makefile.am index be453fb9..227d9279 100644 --- a/lib/driver/Makefile.am +++ b/lib/driver/Makefile.am @@ -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 index 00000000..4accdba8 --- /dev/null +++ b/lib/driver/etimezone.cpp @@ -0,0 +1,8 @@ +#include "etimezone.h" + +#include + +etimezone::etimezone() +{ + tzset(); +} diff --git a/lib/driver/etimezone.h b/lib/driver/etimezone.h new file mode 100644 index 00000000..081bf139 --- /dev/null +++ b/lib/driver/etimezone.h @@ -0,0 +1,11 @@ +#ifndef __etimezone_h +#define __etimezone_h + +class etimezone +{ +public: + etimezone(); +}; + +#endif + diff --git a/lib/python/Components/Timezones.py b/lib/python/Components/Timezones.py index 6f71187b..0b6eb79b 100644 --- a/lib/python/Components/Timezones.py +++ b/lib/python/Components/Timezones.py @@ -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 = [] diff --git a/lib/python/enigma_python.i b/lib/python/enigma_python.i index eb814553..a90e2fef 100644 --- a/lib/python/enigma_python.i +++ b/lib/python/enigma_python.i @@ -74,6 +74,7 @@ is usually caused by not marking PSignals as immutable. #include #include #include +#include #include #include @@ -168,6 +169,7 @@ typedef long time_t; %include %include %include +%include %include %include