Update rtc_support.c

I think I fixed the issues. Don't have time to work again till thursday. 
Please try to run it if you can.