add clock to lcd
authorRonny Strutz <ronny.strutz@multimedia-labs.de>
Thu, 1 Sep 2005 02:05:14 +0000 (02:05 +0000)
committerRonny Strutz <ronny.strutz@multimedia-labs.de>
Thu, 1 Sep 2005 02:05:14 +0000 (02:05 +0000)
lib/python/Components/Clock.py

index eba5ea2..d47ac78 100644 (file)
@@ -2,8 +2,10 @@ from HTMLComponent import *
 from GUIComponent import *
 from VariableText import *
 
-from enigma import eTimer
-from enigma import eLabel
+#from enigma import eTimer
+#from enigma import eLabel
+
+from enigma import *
 
 import time
 # now some "real" components:
@@ -22,7 +24,9 @@ class Clock(HTMLComponent, GUIComponent, VariableText):
        def doClock(self):
                t = time.localtime()
                #HACK use timezone settings
-               self.setText("%2d:%02d:%02d" % (t[3] + 2, t[4], t[5]))
+               timestr = "%2d:%02d:%02d" % (t[3] + 2, t[4], t[5])
+               self.setText(timestr)
+               setLCDClock(timestr)
 
 # realisierung als GUI
        def createWidget(self, parent):