Talk:LED clock

From Openmoko

(Difference between revisions)
Jump to: navigation, search
(patch for Daylight Savings time)
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
It would be nice if you could set this as the default screensaver only between 9pm and 9am or something [[User:Ojw|Ojw]] 16:57, 29 December 2008 (UTC)
 
 
 
== Proposed icons ==
 
== Proposed icons ==
  
Line 18: Line 16:
 
|-
 
|-
 
|}
 
|}
 +
 +
== 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

Latest revision as of 12:45, 3 April 2009

[edit] Proposed icons

1 Ledclock icon1.png
2 Ledclock icon2.png
3 Ledclock icon3.png
4 Ledclock icon4.png

[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

Personal tools

It would be nice if you could set this as the default screensaver only between 9pm and 9am or something Ojw 16:57, 29 December 2008 (UTC)

Proposed icons

1 Ledclock icon1.png
2 Ledclock icon2.png
3 Ledclock icon3.png
4 Ledclock icon4.png