I have just bought a battery backed RTC: http://www.cjemicros.co.uk/micros/products/rpirtc.shtml
It works fine when I enter the commands to load the modules and set hwclock from the command line:
$this->bbcode_second_pass_code('', '
modprobe i2c-bcm2708
echo ds1307 0x68 > /sys/class/i2c-adapter/i2c-1/new_device
modprobe rtc-ds1307
hwclock -s
')
However, I am at a loss how to set this up to run at boot. I tried creating an /etc/rc.local, but as per the wiki this caused boot to hang. I could put the modules in modules-load.d, but am not sure about the echo command. I did think about creating a systemd unit, but it's not really a service. Any suggestions?