[mythtv-users] Real-time-clock question.

Bryan Bennetts bbennetts at blueyonder.co.uk
Wed Sep 27 16:19:56 UTC 2006

On Wednesday 27 Sep 2006 17:05, come se fosse antani wrote:
> the only problem I found is for the BIOS configured to use UTC instead
> of localtime; in such case, you have to tell your linux box your BIOS
> is using UTC.

Not necessarily, you can just set you 'mythsettime' script to do the necessary 
conversion from localtime to UTC.  Mine is like this (there is no doubt an 
easier way)...

stella ~ # cat /usr/bin/mythsettime
# $1 is the redundant --settime switch

# Set the hardware clock to system time here, cause it knackers the alarm
# functionality.
hwclock --systohc

# Write the time to myth.time (why - I dunno)
sudo date -d "1970-01-01 $2 sec" +"%F %H:%M:%S" > /home/mythtv/myth.time

# Now convert that to UTC time (cause I want UTC on the mobo and BST/GMT 
sudo date -d "1970-01-01 $2 sec" +"%F %H:%M:%S" > /proc/acpi/alarm

Note if you are lucky enough to have a system where setting the h/w clock 
knackers the alarm func. you need to configure your ntp stuff to not update 
the clock and then rely on the mythsettime script to do it.

Note : I have this hasn't been tested through a summer/winter time change yet 
so it could cease to work correctly.

HTH, Bryan.

More information about the mythtv-users mailing list