Talk:LED clock
From Openmoko
(→Problem with LED Clock and US Daylight Savings time: new section) |
(patch for Daylight Savings time) |
||
Line 1: | Line 1: | ||
− | |||
== Proposed icons == | == Proposed icons == | ||
Line 30: | Line 29: | ||
Ken Young | Ken Young | ||
+ | |||
+ | This can be solved with the following simple patch: | ||
+ | --- /usr/local/ledclock/ledclock.py.orig Fri Apr 3 13:19:34 2009 | ||
+ | +++ /usr/local/ledclock/ledclock.py Fri Apr 3 13:34:22 2009 | ||
+ | @@ -328,7 +328,7 @@ | ||
+ | """Draw the current time""" | ||
+ | self.set_time_colour(cr) | ||
+ | self.draw_time(cr, 0,0,w,h, | ||
+ | - int(time.time() - time.timezone), | ||
+ | + int(time.daylight and (time.time() - time.altzone) or (time.time() - time.timezone)), | ||
+ | int(self.options.get('show_seconds', 0)), | ||
+ | int(self.options.get('24_hour', 1)), | ||
+ | ) | ||
+ | |||
+ | Alef |
Latest revision as of 13:45, 3 April 2009
[edit] Proposed icons
1 | |
2 | |
3 | |
4 |
[edit] Problem with LED Clock and US Daylight Savings time
Since the US went on daylight savings time about 1 week ago, LED clock has been displaying the wrong time. It still displays the standard time (one hour before the daylight savings time), even though the phone's own clock display, and the shell "date" command, show the correct, daylight savings time. Do you know why I am having this problem, and how I might fix it?
Thanks for any info!
Ken Young
This can be solved with the following simple patch:
--- /usr/local/ledclock/ledclock.py.orig Fri Apr 3 13:19:34 2009 +++ /usr/local/ledclock/ledclock.py Fri Apr 3 13:34:22 2009 @@ -328,7 +328,7 @@ """Draw the current time""" self.set_time_colour(cr) self.draw_time(cr, 0,0,w,h, - int(time.time() - time.timezone), + int(time.daylight and (time.time() - time.altzone) or (time.time() - time.timezone)), int(self.options.get('show_seconds', 0)), int(self.options.get('24_hour', 1)), )
Alef