Clock on Display is from BIOS

All LINUX related questions (Installation & usage)

Moderator: marcus

Clock on Display is from BIOS

Postby El_Matthews » Tue 17. Mar 2009, 20:46

when I start the IRServer with the command irserver -start_clock the time displayed on the display is my bios Clock (GMT time). Does anybody know how to display the local time?
El_Matthews
 
Posts: 6
Joined: Sat 24. Jan 2009, 13:22

Re: Clock on Display is from BIOS

Postby Stefan Mensink » Mon 19. Oct 2009, 20:56

The irserver does not always seem to use the timezone offset correctly. You can change the source code to apply your offset manually.

Download the irserver sources, and open the file. Easiest fix is, below the line that says...

Code: Select all
else *((unsigned int *)irw.data) = tb.tv_sec - 60 * tz.tz_minuteswest;


Add this line:

Code: Select all
*((unsigned int *)irw.data) = tb.tv_sec + XXX


where you replace XXX with the amount of minutes you want the clock to go FORWARD. This means, if you want the clock to go 2 hours forward, you use:

Code: Select all
*((unsigned int *)irw.data) = tb.tv_sec + 120


if you want the clock to go 2 hours backwards, use:

Code: Select all
*((unsigned int *)irw.data) = tb.tv_sec - 120


Then recompile the irserver with: make
If you need a 64 bit binary too, also do: make irserver64

Of course you need the C compiler et cetera for all this. I can't tell you which packages you really need, because I usually install a lot of them and it also depends on your Linux distribution. You should be able to find out about that yourself by googling around.

Hope this helps.

Stefan
Stefan Mensink
 
Posts: 2
Joined: Mon 19. Oct 2009, 20:46


Return to LINUX

Who is online

Users browsing this forum: No registered users and 3 guests