The GPS has a built in real time clock, which can keep track of time even when it power is lost and it doesn't have a fix yet. It can also help reduce fix times, if you expect to have a flakey power connection (say you're using solar or similar). To use the RTC, we need to insert a battery. There is holder on the HAT for a CR1220 sized battery holder. We provide the holder but the battery is not included. You can use any 12mm coin cell - these are popular and we also carry them in the Adafruit shop.

Remember, the GPS does not know what time zone you are in (even though it knows your location, there is no easy way to determine time zone without a massive lookup table) so all date/time data is in UTC (aka. Greenwich Mean Time)

The Pi’s system clock can be synchronized from the GPS if no network time server is reachable, but this gets pretty technical and is beyond the scope of this guide. Here’s a tutorial elsewhere that might help…scroll down to section 4, since the GPS hardware is a bit different, just need the software steps.

This guide was first published on Dec 26, 2014. It was last updated on Mar 08, 2024.

This page (Battery Backup) was last updated on Mar 08, 2024.

Text editor powered by tinymce.