RPi Meteor Station
You will need:
Connect the RTC module to the GPIO according to this image:

sudo nano <file_name>
where you will replace <file_name> with the name of the file. After you are done, press Ctrl + X and press y when it asks you if you want to save changes.
/boot/config.txt in Raspbian Jessy:dtparam=i2c_arm=on
dtoverlay=i2c-rtc,ds3231
Reboot your Raspberry Pi:
sudo reboot
sudo apt-get remove -y fake-hwclock
sudo update-rc.d hwclock.sh enable
sudo update-rc.d fake-hwclock remove
This module was used to store the current time to the SD card when the RPi was turned off, and it would load that time from the SD card during boot. Now that you have a real clock, you don’t need it anymore.
/lib/udev/hwclock-set by commenting out lines with –systz:if [ yes = “$BADYEAR” ] ; then
    #/sbin/hwclock –rtc=$dev –systz –badyear
    /sbin/hwclock –rtc=$dev –hctosys –badyear
else
    #/sbin/hwclock –rtc=$dev –systz
    /sbin/hwclock –rtc=$dev –hctosys
fi
sudo hwclock -w
sudo dpkg-reconfigure tzdata
sudo apt-get install -y ntp
/etc/rc.local and add the hwclock command above the line that says exit 0:sleep 1
# Read time from hardware clock
hwclock -s
# Pull the time from the internet
ntpd -gq
# Write time to hardware clock
hwclock -w
This will read in the time from the RTC upon boot, and sync the time via Internet (if it is available).
Done! Raspbian will now set the time from the RTC clock during boot even if there is no Internet connectivity available.
These instructions were vaild for old versions of the system, but the problems have been fixed and the NTP deamon is running fine now. Use these instructions only if you have issues with your RTC!
sudo apt-get remove -y ntp
sudo apt-get install -y ntpdate
The NTP daemon tended to corrupt the time on the RTC, so we have to remove it.
After the NTP daemon has been removed, you can still sync the system clock using ntpdate-debian which you might add to /etc/rc.local as well (after the hwclock command though) – just in case there is an Internet connection available during boot.
/etc/rc.local and add the hwclock command above the line that says exit 0:sleep 1
hwclock -s
ntpdate-debian
This will read in the time from the RTC upon boot, and sync the time via Internet (if it is available).
To prevent this from happening, edit /etc/default/hwclock and set HWCLOCKACCESS to no:
HWCLOCKACCESS=no
Edit /lib/systemd/system/hwclock-save.service and comment out this line:
ConditionFileIsExecutable=!/usr/sbin/ntpd
sudo systemctl enable hwclock-save.service
Run:
crontab -e
and add this line at the end:
*/15 * * * * ntpdate-debian >/dev/null 2>&1
Done! Raspbian will now set the time from the RTC clock during boot even if there is no Internet connectivity available.