def clock_update(self): if self.clock: timeout_add( clockWaitMilliseconds(), self.clock_update, ) self.set_value(localtime()[3:6])
def update(self): if self.running: timeout_add(clockWaitMilliseconds(), self.update) if self.local: self.set_label(strftime(self.format)) else: self.set_label(strftime(self.format, time.gmtime()))
def update(self): if self.running: timeout_add(clockWaitMilliseconds(), self.update) if self.seconds: l = "%.2d:%.2d:%.2d" % tuple(localtime()[3:6]) else: l = "%.2d:%.2d" % tuple(localtime()[3:5]) if self.bold: l = "<b>%s</b>" % l self.set_label(l)
def updateTimes(self): dt = now() % 1 timeout_add(clockWaitMilliseconds(), self.updateTimes) #print("updateTimes", dt) lt = localtime() self.label_cur.set_label( _("Current:") + " %.4d/%.2d/%.2d - %.2d:%.2d:%.2d" % lt[:6] ) if not self.editTime: self.timeInput.set_value(lt[3:6]) if not self.editDate: self.dateInput.set_value(lt[:3]) return False
def update(self): if self.running: timeout_add(clockWaitMilliseconds(), self.update) self.set_label(strftime(self.format))