diff options
| author | Stefan Pluecken <stefan.pluecken@multimedia-labs.de> | 2005-11-17 16:28:57 +0000 |
|---|---|---|
| committer | Stefan Pluecken <stefan.pluecken@multimedia-labs.de> | 2005-11-17 16:28:57 +0000 |
| commit | d0ca21133e420f63c90d44e6b8bd23273e2ffd58 (patch) | |
| tree | e9ba59253e9cc7839b7875ea5163a1d318a7d0f9 /lib | |
| parent | a630959f3049fd7dda7d687d0d5dc827ba4cfe2b (diff) | |
| download | enigma2-d0ca21133e420f63c90d44e6b8bd23273e2ffd58.tar.gz enigma2-d0ca21133e420f63c90d44e6b8bd23273e2ffd58.zip | |
use c++-fallback for lack of tzset-python-function
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/driver/Makefile.am | 2 | ||||
| -rw-r--r-- | lib/driver/etimezone.cpp | 8 | ||||
| -rw-r--r-- | lib/driver/etimezone.h | 11 | ||||
| -rw-r--r-- | lib/python/Components/Timezones.py | 4 | ||||
| -rw-r--r-- | lib/python/enigma_python.i | 2 |
5 files changed, 25 insertions, 2 deletions
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 <time.h> + +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 <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> |
